From: Erik V. <ev...@us...> - 2010-02-06 23:48:34
|
Update of /cvsroot/rails/18xx/rails/game/specific/_1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9732/rails/game/specific/_1856 Modified Files: OperatingRound_1856.java Log Message: Allow special token lays at any time during OR. This has changed the way that OR steps are handled. These can now be used again in the UI. Goal was to enable the extra NF token lay in 1835 Index: OperatingRound_1856.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1856/OperatingRound_1856.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** OperatingRound_1856.java 31 Jan 2010 22:22:32 -0000 1.29 --- OperatingRound_1856.java 6 Feb 2010 23:48:26 -0000 1.30 *************** *** 20,37 **** private Player playerToStartLoanRepayment = null; - public static final int STEP_REPAY_LOANS = 6; - static { - STEP_FINAL = 7; ! steps = ! new int[] { STEP_LAY_TRACK, STEP_LAY_TOKEN, STEP_CALC_REVENUE, ! STEP_PAYOUT, STEP_BUY_TRAIN, STEP_TRADE_SHARES, ! STEP_REPAY_LOANS, STEP_FINAL }; ! ! stepNames = ! new String[] { "LayTrack", "LayToken", "EnterRevenue", "Payout", ! "BuyTrain", "TradeShares", "RepayLoans", "Final" }; ! } public OperatingRound_1856 (GameManagerI gameManager) { --- 20,37 ---- private Player playerToStartLoanRepayment = null; static { ! steps = new GameDef.OrStep[] { ! GameDef.OrStep.INITIAL, ! GameDef.OrStep.LAY_TRACK, ! GameDef.OrStep.LAY_TOKEN, ! GameDef.OrStep.CALC_REVENUE, ! GameDef.OrStep.PAYOUT, ! GameDef.OrStep.BUY_TRAIN, ! GameDef.OrStep.TRADE_SHARES, ! GameDef.OrStep.REPAY_LOANS, ! GameDef.OrStep.FINAL ! }; ! } public OperatingRound_1856 (GameManagerI gameManager) { *************** *** 319,323 **** } ! if (getStep() == STEP_REPAY_LOANS) { // Has company any outstanding loans to repay? --- 319,323 ---- } ! if (getStep() == GameDef.OrStep.REPAY_LOANS) { // Has company any outstanding loans to repay? *************** *** 421,425 **** // Deduct interest immediately? ! if (stepObject.intValue() > STEP_PAYOUT) { amount -= calculateLoanInterest(numberOfLoans); } --- 421,425 ---- // Deduct interest immediately? ! if (((GameDef.OrStep) stepObject.getObject()).compareTo(GameDef.OrStep.PAYOUT) > 0) { amount -= calculateLoanInterest(numberOfLoans); } *************** *** 436,442 **** @Override ! protected boolean gameSpecificNextStep (int step) { ! if (step == STEP_REPAY_LOANS) { // Has company any outstanding loans to repay? --- 436,442 ---- @Override ! protected boolean gameSpecificNextStep (GameDef.OrStep step) { ! if (step == GameDef.OrStep.REPAY_LOANS) { // Has company any outstanding loans to repay? *************** *** 469,473 **** if (!resetOperatingCompanies(mergingCompanies)) return; if (operatingCompany != null) { ! setStep(STEP_INITIAL); } else { finishOR(); --- 469,473 ---- if (!resetOperatingCompanies(mergingCompanies)) return; if (operatingCompany != null) { ! setStep(GameDef.OrStep.INITIAL); } else { finishOR(); |