From: Erik V. <ev...@us...> - 2009-09-25 19:13:16
|
Update of /cvsroot/rails/18xx/rails/game/specific/_18EU In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv5549/rails/game/specific/_18EU Modified Files: OperatingRound_18EU.java StockRound_18EU.java Log Message: Rationalised Bank, removing statics Removed two unnecessary Util methods Index: StockRound_18EU.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_18EU/StockRound_18EU.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** StockRound_18EU.java 4 Sep 2009 18:56:16 -0000 1.23 --- StockRound_18EU.java 25 Sep 2009 19:13:01 -0000 1.24 *************** *** 104,108 **** (PublicCompanyI) companyBoughtThisTurnWrapper.getObject(); if (companyBoughtThisTurn == null) { ! from = Bank.getIpo(); Map<String, List<PublicCertificateI>> map = from.getCertsPerCompanyMap(); --- 104,108 ---- (PublicCompanyI) companyBoughtThisTurnWrapper.getObject(); if (companyBoughtThisTurn == null) { ! from = ipo; Map<String, List<PublicCertificateI>> map = from.getCertsPerCompanyMap(); *************** *** 157,161 **** /* Get the unique Pool certificates and check which ones can be bought */ ! from = Bank.getPool(); Map<String, List<PublicCertificateI>> map = from.getCertsPerCompanyMap(); --- 157,161 ---- /* Get the unique Pool certificates and check which ones can be bought */ ! from = pool; Map<String, List<PublicCertificateI>> map = from.getCertsPerCompanyMap(); *************** *** 385,389 **** homeCityNumber = homeHex.getCityOfBaseToken(minor); } else if (selectedHomeCity != null) { ! homeHex = (MapHex) selectedHomeCity.getHolder(); homeCityNumber = selectedHomeCity.getNumber(); } --- 385,389 ---- homeCityNumber = homeHex.getCityOfBaseToken(minor); } else if (selectedHomeCity != null) { ! homeHex = selectedHomeCity.getHolder(); homeCityNumber = selectedHomeCity.getNumber(); } *************** *** 443,447 **** // TODO must get this amount from XML int tokensCost = 100; ! new CashMove(company, null, tokensCost); ReportBuffer.add(LocalText.getText("PaysForTokens", company.getName(), --- 443,447 ---- // TODO must get this amount from XML int tokensCost = 100; ! new CashMove(company, bank, tokensCost); ReportBuffer.add(LocalText.getText("PaysForTokens", company.getName(), *************** *** 511,515 **** if (cashDestination == null) { // Assets go to the bank ! if (minorCash > 0) new CashMove(minor, null, minorCash); pool.transferAssetsFrom(minor.getPortfolio()); } else { --- 511,515 ---- if (cashDestination == null) { // Assets go to the bank ! if (minorCash > 0) new CashMove(minor, bank, minorCash); pool.transferAssetsFrom(minor.getPortfolio()); } else { *************** *** 585,589 **** company.getName()), pool); int cash = 5 * company.getMarketPrice(); ! new CashMove(null, company, cash); ReportBuffer.add(LocalText.getText("MonetiseTreasuryShares", company.getName(), --- 585,589 ---- company.getName()), pool); int cash = 5 * company.getMarketPrice(); ! new CashMove(bank, company, cash); ReportBuffer.add(LocalText.getText("MonetiseTreasuryShares", company.getName(), *************** *** 640,644 **** if (action.isForced()) MoveSet.setLinkedToPrevious(); ! Bank.getPool().buyTrain(train, 0); ReportBuffer.add(LocalText.getText("CompanyDiscardsTrain", companyName, --- 640,644 ---- if (action.isForced()) MoveSet.setLinkedToPrevious(); ! pool.buyTrain(train, 0); ReportBuffer.add(LocalText.getText("CompanyDiscardsTrain", companyName, Index: OperatingRound_18EU.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_18EU/OperatingRound_18EU.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OperatingRound_18EU.java 24 Jan 2009 15:10:29 -0000 1.6 --- OperatingRound_18EU.java 25 Sep 2009 19:13:01 -0000 1.7 *************** *** 58,63 **** TrainI cheapestTrain = null; int costOfCheapestTrain = 0; - Portfolio ipo = Bank.getIpo(); - Portfolio pool = Bank.getPool(); // Check if the company already has a Pullmann --- 58,61 ---- *************** *** 210,214 **** if ((numberOfTrains > comp.getTrainLimit(currentPhase.getIndex()) || numberOfTrains == 1) && pullmann != null) { ! pullmann.moveTo(Bank.getPool()); } --- 208,212 ---- if ((numberOfTrains > comp.getTrainLimit(currentPhase.getIndex()) || numberOfTrains == 1) && pullmann != null) { ! pullmann.moveTo(pool); } |