From: Erik V. <ev...@us...> - 2009-07-14 20:49:37
|
Update of /cvsroot/rails/18xx/rails/game/specific/_1856 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9599/rails/game/specific/_1856 Modified Files: CGRFormationRound.java OperatingRound_1856.java Log Message: Fixes to CGR formation Index: CGRFormationRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1856/CGRFormationRound.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CGRFormationRound.java 12 Jul 2009 21:06:18 -0000 1.4 --- CGRFormationRound.java 14 Jul 2009 20:49:33 -0000 1.5 *************** *** 71,74 **** --- 71,79 ---- } } + + if (companiesToRepayLoans == null) { + finishRound(); + return; + } setStep(STEP_REPAY_LOANS); *************** *** 76,80 **** setCurrentPlayer (startingPlayer); ! setNextCompanyNeedingPresidentIntervention(); } --- 81,88 ---- setCurrentPlayer (startingPlayer); ! if (!setNextCompanyNeedingPresidentIntervention()) { ! finishRound(); ! return; ! } } Index: OperatingRound_1856.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1856/OperatingRound_1856.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** OperatingRound_1856.java 4 May 2009 20:29:14 -0000 1.9 --- OperatingRound_1856.java 14 Jul 2009 20:49:33 -0000 1.10 *************** *** 458,462 **** PublicCompanyI cgr = companyManager.getCompanyByName("CGR"); int index = 0; ! boolean cgrCanOperate = true; for (Iterator<PublicCompanyI> it = companies.iterator(); it.hasNext(); ) { --- 458,462 ---- PublicCompanyI cgr = companyManager.getCompanyByName("CGR"); int index = 0; ! boolean cgrCanOperate = cgr.hasStarted(); for (Iterator<PublicCompanyI> it = companies.iterator(); it.hasNext(); ) { *************** *** 477,487 **** String message; ! if (cgrCanOperate) { ! operatingCompanyIndex = Math.max (0, operatingCompanyIndex); ! companies.add(operatingCompanyIndex, cgr); ! operatingCompany = cgr; ! message = LocalText.getText("CanOperate", cgr.getName()); } else { ! message = LocalText.getText("CannotOperate", cgr.getName()); } ReportBuffer.add (message); --- 477,491 ---- String message; ! if (cgr.hasStarted()) { ! if (cgrCanOperate) { ! operatingCompanyIndex = Math.max (0, operatingCompanyIndex); ! companies.add(operatingCompanyIndex, cgr); ! operatingCompany = cgr; ! message = LocalText.getText("CanOperate", cgr.getName()); ! } else { ! message = LocalText.getText("CannotOperate", cgr.getName()); ! } } else { ! message = LocalText.getText("DoesNotForm", cgr.getName()); } ReportBuffer.add (message); |