From: Erik V. <ev...@us...> - 2009-11-17 22:38:41
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv23270/rails/game Modified Files: StartItem.java StartRound.java Log Message: Fixed prioritysetting bug during start round Index: StartItem.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StartItem.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** StartItem.java 17 Nov 2009 19:31:24 -0000 1.19 --- StartItem.java 17 Nov 2009 22:38:29 -0000 1.20 *************** *** 376,391 **** /** - * Get the last Bid done by a given player. - * - * @param playerName The name of the player. - * @return His latest Bid object. - */ - //public int getBidForPlayer(String playerName) { - // Player player = Game.getPlayerManager().getPlayerByName(playerName); - // int index = player.getIndex(); - // return bids[index].intValue(); - //} - - /** * Check if the start item has been sold. * --- 376,379 ---- Index: StartRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StartRound.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** StartRound.java 29 Oct 2009 19:41:28 -0000 1.29 --- StartRound.java 17 Nov 2009 22:38:29 -0000 1.30 *************** *** 174,177 **** --- 174,178 ---- protected boolean buy(String playerName, BuyStartItem boughtItem) { StartItem item = boughtItem.getStartItem(); + int lastBid = item.getBid(); String errMsg = null; Player player = getCurrentPlayer(); *************** *** 229,234 **** assignItem(player, item, price, sharePrice); ! // Set priority ! gameManager.setPriorityPlayer(); setNextPlayer(); --- 230,238 ---- assignItem(player, item, price, sharePrice); ! // Set priority (only if the item was not auctioned) ! // ASSUMPTION: getting an item in auction mode never changes priority ! if (lastBid == 0) { ! gameManager.setPriorityPlayer(); ! } setNextPlayer(); |