From: Erik V. <ev...@us...> - 2009-09-03 18:33:36
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv3885/rails/game Modified Files: OperatingRound.java Player.java Log Message: Certificate limits after CGR formation Index: Player.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Player.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Player.java 30 Aug 2009 18:15:18 -0000 1.17 --- Player.java 3 Sep 2009 18:33:28 -0000 1.18 *************** *** 85,89 **** } ! public static void setShareLimit(int percentage) { playerShareLimit = percentage; } --- 85,94 ---- } ! /** In some games, the cert limit can change during the game (e.g. 1856) */ ! public static void setPlayerCertificateLimit(int playerCertificateLimit) { ! Player.playerCertificateLimit = playerCertificateLimit; ! } ! ! public static void setShareLimit(int percentage) { playerShareLimit = percentage; } Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** OperatingRound.java 2 Sep 2009 21:47:47 -0000 1.64 --- OperatingRound.java 3 Sep 2009 18:33:28 -0000 1.65 *************** *** 1162,1167 **** } ! if (setNextOperatingCompany(false)) { setStep(STEP_INITIAL); } else { --- 1162,1168 ---- } ! if (!finishTurnSpecials()) return; + if (setNextOperatingCompany(false)) { setStep(STEP_INITIAL); } else { *************** *** 1170,1173 **** --- 1171,1183 ---- } + /** Stub, may be overridden in subclasses + * Return value: + * TRUE = normal turn end; + * FALSE = return immediately from finishTurn(). + */ + protected boolean finishTurnSpecials () { + return true; + } + protected boolean setNextOperatingCompany(boolean initial) { |