From: Erik V. <ev...@us...> - 2010-02-05 19:58:26
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6144/rails/game Modified Files: StartRound_1835.java Log Message: Fixed hung state when start packet not sold out Index: StartRound_1835.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StartRound_1835.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** StartRound_1835.java 31 Jan 2010 22:22:28 -0000 1.23 --- StartRound_1835.java 5 Feb 2010 19:58:18 -0000 1.24 *************** *** 55,65 **** } - /** - * 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. - */ - // public StartItem[] getBuyableItems() {return null;} @Override public boolean setPossibleActions() { --- 55,58 ---- *************** *** 131,139 **** DisplayBuffer.add(message); numPasses.add(1); ! if (numPasses.intValue() == numPlayers) { /* * No-one has enough cash left to buy anything, so close the * Start Round. */ return false; } --- 124,139 ---- DisplayBuffer.add(message); numPasses.add(1); ! if (numPasses.intValue() >= numPlayers) { /* * No-one has enough cash left to buy anything, so close the * Start Round. */ + numPasses.set(0); + finishRound(); + + // This code may be called recursively. + // Jump out as soon as we have something to do + if (!possibleActions.isEmpty()) break; + return false; } |