From: Erik V. <ev...@us...> - 2012-02-07 22:02:17
|
rails/game/StartRound.java | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) New commits: commit c60ac2a448bd5b3d727673a23fa879da839c4d54 Author: Erik Vos <eri...@xs...> Date: Tue Feb 7 23:01:08 2012 +0100 Fix for 1835 bug: BY presidency not transferred during start round. Presidency check was missing and has now been added in the start round. diff --git a/rails/game/StartRound.java b/rails/game/StartRound.java index c9ab5b6..73008d1 100644 --- a/rails/game/StartRound.java +++ b/rails/game/StartRound.java @@ -3,9 +3,7 @@ package rails.game; import java.util.ArrayList; import java.util.List; -import rails.common.DisplayBuffer; -import rails.common.GuiDef; -import rails.common.LocalText; +import rails.common.*; import rails.common.parser.GameOption; import rails.game.action.*; import rails.game.model.ModelObject; @@ -18,7 +16,7 @@ public abstract class StartRound extends Round { protected int[] itemIndex; protected List<StartItem> itemsToSell = null; protected State auctionItemState = - new State("AuctionItem", StartItem.class); + new State("AuctionItem", StartItem.class); protected IntegerState numPasses = new IntegerState("StartRoundPasses"); protected int numPlayers; protected String variant; @@ -120,7 +118,7 @@ public abstract class StartRound extends Round { BuyStartItem buyAction = (BuyStartItem) startItemAction; if (buyAction.hasSharePriceToSet() - && buyAction.getAssociatedSharePrice() == 0) { + && buyAction.getAssociatedSharePrice() == 0) { // We still need a share price for this item startItemAction.getStartItem().setStatus( StartItem.NEEDS_SHARE_PRICE); @@ -138,7 +136,7 @@ public abstract class StartRound extends Round { DisplayBuffer.add(LocalText.getText("UnexpectedAction", action.toString())); } - + startPacketChecks(); if (startPacket.areAllSold()) { @@ -210,14 +208,14 @@ public abstract class StartRound extends Round { sharePrice = boughtItem.getAssociatedSharePrice(); if (sharePrice == 0) { errMsg = - LocalText.getText("NoSharePriceSet", shareCompName); + LocalText.getText("NoSharePriceSet", shareCompName); break; } if ((stockMarket.getStartSpace(sharePrice)) == null) { errMsg = - LocalText.getText("InvalidStartPrice", - Bank.format(sharePrice), - shareCompName ); + LocalText.getText("InvalidStartPrice", + Bank.format(sharePrice), + shareCompName ); break; } } @@ -302,7 +300,7 @@ public abstract class StartRound extends Round { if (comp.hasStarted() && !comp.hasFloated()) { checkFlotation(comp); } - + if (comp.hasStarted()) comp.checkPresidency(); // Needed for 1835 BY } } @@ -318,9 +316,9 @@ public abstract class StartRound extends Round { super.finishRound(); } - /*----- Setting up the UI for the next action -----*/ + /*----- Setting up the UI for the next action -----*/ - /** + /** * Get the currentPlayer index in the player list (starting at 0). * * @return The index of the current Player. |