From: Erik V. <ev...@us...> - 2011-12-19 12:01:22
|
rails/game/StockRound.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit db7c6ee7b80a57e88b8008ccec460fb91059ea87 Author: Erik Vos <eri...@xs...> Date: Mon Dec 19 12:59:29 2011 +0100 Fixed initialisation of raiseIfSoldOut attribute. diff --git a/rails/game/StockRound.java b/rails/game/StockRound.java index 3c469c3..03bb17a 100644 --- a/rails/game/StockRound.java +++ b/rails/game/StockRound.java @@ -56,7 +56,7 @@ public class StockRound extends Round { /* Rules */ protected int sequenceRule; - protected boolean raiseIfSoldOut; + protected boolean raiseIfSoldOut = false; /** * Constructor with the GameManager, will call super class (Round's) Constructor to initialize @@ -72,13 +72,15 @@ public class StockRound extends Round { sequenceRule = getGameParameterAsInt(GameDef.Parm.STOCK_ROUND_SEQUENCE); - raiseIfSoldOut = true; - guiHints.setVisibilityHint(GuiDef.Panel.MAP, true); guiHints.setVisibilityHint(GuiDef.Panel.STOCK_MARKET, true); guiHints.setActivePanel(GuiDef.Panel.STATUS); } + /** Start the Stock Round. <p> + * Please note: subclasses that are NOT real stock rounds should NOT call this method + * (or set raiseIfSoldOut to false after calling this method). + */ public void start() { ReportBuffer.add(LocalText.getText("StartStockRound", @@ -91,6 +93,8 @@ public class StockRound extends Round { initPlayer(); + raiseIfSoldOut = true; + } /*----- General methods -----*/ |