From: Erik V. <ev...@us...> - 2008-12-23 19:59:15
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv27252/rails/game Modified Files: StartRoundI.java StartRound_1835.java StartRound.java Log Message: Apply new round initialisation logic Index: StartRoundI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StartRoundI.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** StartRoundI.java 4 Jun 2008 19:00:31 -0000 1.5 --- StartRoundI.java 23 Dec 2008 19:59:06 -0000 1.6 *************** *** 9,13 **** public interface StartRoundI extends RoundI { ! public void start(StartPacket startPacket); public List<StartItem> getStartItems(); --- 9,13 ---- public interface StartRoundI extends RoundI { ! public void start(); public List<StartItem> getStartItems(); Index: StartRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StartRound.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** StartRound.java 20 Nov 2008 21:49:38 -0000 1.21 --- StartRound.java 23 Dec 2008 19:59:06 -0000 1.22 *************** *** 41,56 **** /** * Will be created dynamically. ! * */ ! public StartRound() {} /** * Start the start round. ! * * @param startPacket The startpacket to be sold in this start round. */ ! public void start(StartPacket startPacket) { - this.startPacket = startPacket; this.variant = Game.getGameOption(GameManager.VARIANT_KEY); if (variant == null) variant = ""; --- 41,59 ---- /** * Will be created dynamically. ! * */ ! public StartRound(GameManagerI gameManager) { ! ! super (gameManager); ! this.startPacket = gameManager.getStartPacket(); ! } /** * Start the start round. ! * * @param startPacket The startpacket to be sold in this start round. */ ! public void start() { this.variant = Game.getGameOption(GameManager.VARIANT_KEY); if (variant == null) variant = ""; *************** *** 73,77 **** auctionItemState.set(null); - gameManager.setRound(this); setCurrentPlayerIndex(gameManager.getPriorityPlayer().getIndex()); currentPlayer = getCurrentPlayer(); --- 76,79 ---- *************** *** 153,157 **** /** * The current player bids on a given start item. ! * * @param playerName The name of the current player (for checking purposes). * @param itemName The name of the start item on which the bid is placed. --- 155,159 ---- /** * The current player bids on a given start item. ! * * @param playerName The name of the current player (for checking purposes). * @param itemName The name of the start item on which the bid is placed. *************** *** 162,166 **** /** * Buy a start item against the base price. ! * * @param playerName Name of the buying player. * @param itemName Name of the bought start item. --- 164,168 ---- /** * Buy a start item against the base price. ! * * @param playerName Name of the buying player. * @param itemName Name of the bought start item. *************** *** 238,242 **** /** * This method executes the start item buy action. ! * * @param player Buying player. * @param item Start item being bought. --- 240,244 ---- /** * This method executes the start item buy action. ! * * @param player Buying player. * @param item Start item being bought. *************** *** 292,296 **** /** * Process a player's pass. ! * * @param playerName The name of the current player (for checking purposes). */ --- 294,298 ---- /** * Process a player's pass. ! * * @param playerName The name of the current player (for checking purposes). */ *************** *** 301,308 **** /** * Get the currentPlayer index in the player list (starting at 0). ! * * @return The index of the current Player. * @see GameManager.getCurrentPlayerIndex(). */ public int getCurrentPlayerIndex() { return gameManager.getCurrentPlayerIndex(); --- 303,311 ---- /** * Get the currentPlayer index in the player list (starting at 0). ! * * @return The index of the current Player. * @see GameManager.getCurrentPlayerIndex(). */ + @Override public int getCurrentPlayerIndex() { return gameManager.getCurrentPlayerIndex(); *************** *** 326,330 **** /** * Get a list of items that may be bought immediately. ! * * @return An array of start items, possibly empry. */ --- 329,333 ---- /** * Get a list of items that may be bought immediately. ! * * @return An array of start items, possibly empry. */ *************** *** 334,338 **** /** * Get a list of items that the current player may bid upon. ! * * @return An array of start items, possibly empty. */ --- 337,341 ---- /** * Get a list of items that the current player may bid upon. ! * * @return An array of start items, possibly empty. */ Index: StartRound_1835.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StartRound_1835.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** StartRound_1835.java 19 Oct 2008 17:04:48 -0000 1.14 --- StartRound_1835.java 23 Dec 2008 19:59:06 -0000 1.15 *************** *** 28,33 **** * Constructor, only to be used in dynamic instantiation. */ ! public StartRound_1835() { ! super(); hasBidding = false; } --- 28,33 ---- * Constructor, only to be used in dynamic instantiation. */ ! public StartRound_1835(GameManagerI gameManager) { ! super(gameManager); hasBidding = false; } *************** *** 35,44 **** /** * Start the 1835-style start round. ! * * @param startPacket The startpacket to be sold in this start round. */ @Override ! public void start(StartPacket startPacket) { ! super.start(startPacket); startRoundNumber.add(1); --- 35,44 ---- /** * Start the 1835-style start round. ! * * @param startPacket The startpacket to be sold in this start round. */ @Override ! public void start() { ! super.start(); startRoundNumber.add(1); *************** *** 58,62 **** * Get a list of items that may be bought immediately. <p> In an 1835-style * auction this method will usually return several items. ! * * @return An array of start items that can be bought. */ --- 58,62 ---- * Get a list of items that may be bought immediately. <p> In an 1835-style * auction this method will usually return several items. ! * * @return An array of start items that can be bought. */ *************** *** 194,198 **** /** * Set the next player turn. ! * */ @Override --- 194,198 ---- /** * Set the next player turn. ! * */ @Override *************** *** 250,254 **** /** * Process a player's pass. ! * * @param playerName The name of the current player (for checking purposes). */ --- 250,254 ---- /** * Process a player's pass. ! * * @param playerName The name of the current player (for checking purposes). */ |