Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10234/rails/game Modified Files: StartRound_1830.java Round.java StartRound_1835.java StartRound.java RoundI.java OperatingRound.java Log Message: Fixes to CGR formation. Consistent use of the new Round.finishRound() method. Index: StartRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StartRound.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** StartRound.java 15 Jan 2009 20:53:28 -0000 1.24 --- StartRound.java 19 Jul 2009 19:24:21 -0000 1.25 *************** *** 137,141 **** */ possibleActions.clear(); ! gameManager.nextRound(this); } else if (!setPossibleActions()) { /* --- 137,142 ---- */ possibleActions.clear(); ! //gameManager.nextRound(this); ! finishRound(); } else if (!setPossibleActions()) { /* *************** *** 145,149 **** * ultimately be possible. */ ! gameManager.nextRound(this); } --- 146,151 ---- * ultimately be possible. */ ! //gameManager.nextRound(this); ! finishRound(); } Index: RoundI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/RoundI.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RoundI.java 4 Feb 2009 20:36:39 -0000 1.10 --- RoundI.java 19 Jul 2009 19:24:21 -0000 1.11 *************** *** 25,27 **** --- 25,28 ---- public boolean setPossibleActions(); + public boolean wasInterrupted (); } Index: Round.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Round.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Round.java 14 Jul 2009 20:49:34 -0000 1.18 --- Round.java 19 Jul 2009 19:24:21 -0000 1.19 *************** *** 17,20 **** --- 17,21 ---- import rails.game.move.MoveSet; import rails.game.special.SpecialPropertyI; + import rails.game.state.BooleanState; import rails.util.LocalText; *************** *** 33,36 **** --- 34,38 ---- protected Class<? extends RoundI> roundTypeForUI = null; + protected BooleanState wasInterrupted = new BooleanState ("RoundInterrupted", false); /** Default constructor cannot be used */ *************** *** 324,327 **** --- 326,333 ---- gameManager.nextRound(this); } + + public boolean wasInterrupted () { + return wasInterrupted.booleanValue(); + } @Override Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** OperatingRound.java 17 Jul 2009 21:40:39 -0000 1.60 --- OperatingRound.java 19 Jul 2009 19:24:21 -0000 1.61 *************** *** 176,180 **** ReportBuffer.add(text); DisplayBuffer.add(text); ! gameManager.nextRound(this); } --- 176,181 ---- ReportBuffer.add(text); DisplayBuffer.add(text); ! //gameManager.nextRound(this); ! finishRound(); } *************** *** 1199,1203 **** // OR done. Inform GameManager. ReportBuffer.add(LocalText.getText("EndOfOperatingRound", thisOrNumber)); ! gameManager.nextRound(this); } --- 1200,1205 ---- // OR done. Inform GameManager. ReportBuffer.add(LocalText.getText("EndOfOperatingRound", thisOrNumber)); ! //gameManager.nextRound(this); ! finishRound(); } *************** *** 1404,1407 **** --- 1406,1410 ---- } savedAction = null; + wasInterrupted.set(true); } Index: StartRound_1830.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StartRound_1830.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** StartRound_1830.java 15 Jan 2009 20:53:28 -0000 1.18 --- StartRound_1830.java 19 Jul 2009 19:24:21 -0000 1.19 *************** *** 335,339 **** } else { numPasses.set(0); ! gameManager.nextRound(this); } --- 335,340 ---- } else { numPasses.set(0); ! //gameManager.nextRound(this); ! finishRound(); } Index: StartRound_1835.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StartRound_1835.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** StartRound_1835.java 15 Jan 2009 20:53:28 -0000 1.19 --- StartRound_1835.java 19 Jul 2009 19:24:21 -0000 1.20 *************** *** 50,54 **** * ultimately be possible. */ ! gameManager.nextRound(this); } --- 50,55 ---- * ultimately be possible. */ ! //gameManager.nextRound(this); ! finishRound(); } *************** *** 249,253 **** ReportBuffer.add(LocalText.getText("ALL_PASSED")); numPasses.set(0); ! gameManager.nextRound(this); } else { setNextPlayer(); --- 250,255 ---- ReportBuffer.add(LocalText.getText("ALL_PASSED")); numPasses.set(0); ! //gameManager.nextRound(this); ! finishRound(); } else { setNextPlayer(); |