From: Erik V. <ev...@us...> - 2010-01-14 20:55:22
|
Update of /cvsroot/rails/18xx/rails/game/specific/_18EU In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5344/rails/game/specific/_18EU Modified Files: OperatingRound_18EU.java Log Message: Abstracted some variables into methods, taking info from GameUIManager Index: OperatingRound_18EU.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_18EU/OperatingRound_18EU.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** OperatingRound_18EU.java 17 Nov 2009 19:31:27 -0000 1.9 --- OperatingRound_18EU.java 14 Jan 2010 20:55:13 -0000 1.10 *************** *** 121,125 **** /* Other company trains, sorted by president (current player first) */ ! if (currentPhase.isTrainTradingAllowed()) { PublicCompanyI c; BuyTrain bt; --- 121,125 ---- /* Other company trains, sorted by president (current player first) */ ! if (getCurrentPhase().isTrainTradingAllowed()) { PublicCompanyI c; BuyTrain bt; *************** *** 127,130 **** --- 127,132 ---- Portfolio pf; int index; + int numberOfPlayers = getNumberOfPlayers(); + // Set up a list per player of presided companies List<List<PublicCompanyI>> companiesPerPlayer = *************** *** 206,217 **** // A Pullmann always goes first, and automatically. // If the last train is a Pullmann, discard it. ! if ((numberOfTrains > comp.getTrainLimit(currentPhase.getIndex()) || numberOfTrains == 1) && pullmann != null) { pullmann.moveTo(pool); } // If we are still above the limit, make the list // of trains to select the discarded one from ! if (numberOfTrains > comp.getTrainLimit(currentPhase.getIndex())) { player = comp.getPresident(); if (!excessTrainCompanies.containsKey(player)) { --- 208,220 ---- // A Pullmann always goes first, and automatically. // If the last train is a Pullmann, discard it. ! if ((numberOfTrains > comp.getTrainLimit(getCurrentPhase().getIndex()) || numberOfTrains == 1) && pullmann != null) { pullmann.moveTo(pool); + numberOfTrains--; } // If we are still above the limit, make the list // of trains to select the discarded one from ! if (numberOfTrains > comp.getTrainLimit(getCurrentPhase().getIndex())) { player = comp.getPresident(); if (!excessTrainCompanies.containsKey(player)) { |