From: Erik V. <ev...@us...> - 2010-04-30 09:35:43
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv10874/rails/game Modified Files: OperatingRound.java Log Message: Removed use of redundant 'forcedExchange' TrainBuy attribute Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.123 retrieving revision 1.124 diff -C2 -d -r1.123 -r1.124 *** OperatingRound.java 21 Apr 2010 19:16:44 -0000 1.123 --- OperatingRound.java 30 Apr 2010 09:35:35 -0000 1.124 *************** *** 1465,1469 **** // Does the company have room for another train? int trainLimit = operatingCompany.getCurrentTrainLimit(); ! if (!canBuyTrainNow() && !action.isForcedExchange()) { errMsg = LocalText.getText("WouldExceedTrainLimit", --- 1465,1469 ---- // Does the company have room for another train? int trainLimit = operatingCompany.getCurrentTrainLimit(); ! if (!canBuyTrainNow() && !action.isForExchange()) { errMsg = LocalText.getText("WouldExceedTrainLimit", *************** *** 2341,2346 **** boolean hasTrains = operatingCompany.getPortfolio().getNumberOfTrains() > 0; - boolean atTrainLimit = - operatingCompany.getNumberOfTrains() >= operatingCompany.getCurrentTrainLimit(); boolean canBuyTrainNow = canBuyTrainNow(); boolean presidentMayHelp = !hasTrains && operatingCompany.mustOwnATrain(); --- 2341,2344 ---- *************** *** 2383,2387 **** BuyTrain action = new BuyTrain(train, ipo, cost); action.setTrainsForExchange(exchangeableTrains); ! if (atTrainLimit) action.setForcedExchange(true); possibleActions.add(action); canBuyTrainNow = true; --- 2381,2385 ---- BuyTrain action = new BuyTrain(train, ipo, cost); action.setTrainsForExchange(exchangeableTrains); ! //if (atTrainLimit) action.setForcedExchange(true); possibleActions.add(action); canBuyTrainNow = true; |