Update of /cvsroot/rails/18xx/rails/game
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6270/rails/game
Modified Files:
StockRound.java
Log Message:
Added GUIHints
Changed some attributes into game parameters
Index: StockRound.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/game/StockRound.java,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** StockRound.java 7 Dec 2009 17:50:16 -0000 1.53
--- StockRound.java 14 Jan 2010 20:58:39 -0000 1.54
***************
*** 3,6 ****
--- 3,7 ----
import java.util.*;
+ import rails.common.GuiDef;
import rails.game.action.*;
import rails.game.move.CashMove;
***************
*** 47,51 ****
static protected final int SELL_BUY_OR_BUY_SELL = 2;
! /* Action comnstants */
static public final int BOUGHT = 0;
static public final int SOLD = 1;
--- 48,52 ----
static protected final int SELL_BUY_OR_BUY_SELL = 2;
! /* Action constants */
static public final int BOUGHT = 0;
static public final int SOLD = 1;
***************
*** 53,59 ****
/* Rules */
protected int sequenceRule;
- static protected boolean buySellInSameRound = true;
- static protected boolean noSaleInFirstSR = false;
- static protected boolean noSaleIfNotOperated = false;
/**
--- 54,57 ----
***************
*** 71,74 ****
--- 69,75 ----
sequenceRule = gameManager.getStockRoundSequenceRule();
+ guiHints.setVisibilityHint(GuiDef.Panel.MAP, true);
+ guiHints.setVisibilityHint(GuiDef.Panel.STOCK_MARKET, true);
+ guiHints.setActivePanel(GuiDef.Panel.STATUS);
}
***************
*** 843,847 ****
// Check everything
! if (getStockRoundNumber() == 1 && noSaleInFirstSR) {
errMsg = LocalText.getText("FirstSRNoSell");
break;
--- 844,848 ----
// Check everything
! if (getStockRoundNumber() == 1 && noSaleInFirstSR()) {
errMsg = LocalText.getText("FirstSRNoSell");
break;
***************
*** 1222,1226 ****
public boolean mayCurrentPlayerSellAnything() {
! if (getStockRoundNumber() == 1 && noSaleInFirstSR) return false;
if (companyBoughtThisTurnWrapper.getObject() != null
--- 1223,1227 ----
public boolean mayCurrentPlayerSellAnything() {
! if (getStockRoundNumber() == 1 && noSaleInFirstSR()) return false;
if (companyBoughtThisTurnWrapper.getObject() != null
***************
*** 1317,1326 ****
! public static void setNoSaleInFirstSR() {
! noSaleInFirstSR = true;
}
! public static void setNoSaleIfNotOperated() {
! noSaleIfNotOperated = true;
}
--- 1318,1335 ----
! //public static void setNoSaleInFirstSR() {
! // noSaleInFirstSR = true;
! //}
!
! //public static void setNoSaleIfNotOperated() {
! // noSaleIfNotOperated = true;
! //}
!
! protected boolean noSaleInFirstSR() {
! return (Boolean) gameManager.getGameParameter(GameDef.Parm.NO_SALE_IN_FIRST_SR);
}
! protected boolean noSaleIfNotOperated() {
! return (Boolean) gameManager.getGameParameter(GameDef.Parm.NO_SALE_IF_NOT_OPERATED);
}
|