From: Erik V. <ev...@us...> - 2008-11-02 19:52:58
|
Update of /cvsroot/rails/18xx/rails/game/specific/_18EU In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv7890/rails/game/specific/_18EU Modified Files: StockRound_18EU.java Log Message: Reorganized "getPrice" methods of PublicCompany. Index: StockRound_18EU.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_18EU/StockRound_18EU.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** StockRound_18EU.java 8 Jul 2008 19:54:09 -0000 1.13 --- StockRound_18EU.java 2 Nov 2008 19:52:48 -0000 1.14 *************** *** 138,143 **** possibleActions.add(action); } ! } else if (cert.getCertificatePrice() <= playerCash) { ! possibleActions.add(new BuyCertificate(cert, from)); } --- 138,144 ---- possibleActions.add(action); } ! } else if (comp.getMarketPrice() <= playerCash) { ! possibleActions.add(new BuyCertificate(cert, from, ! comp.getMarketPrice())); } *************** *** 159,164 **** if (currentPlayer.maxAllowedNumberOfSharesToBuy(comp, cert.getShare()) < 1) continue; ! stockSpace = comp.getCurrentPrice(); ! price = stockSpace.getPrice(); if (companyBoughtThisTurn != null) { --- 160,165 ---- if (currentPlayer.maxAllowedNumberOfSharesToBuy(comp, cert.getShare()) < 1) continue; ! //stockSpace = comp.getCurrentSpace(); ! price = comp.getMarketPrice(); if (companyBoughtThisTurn != null) { *************** *** 189,198 **** if (currentPlayer.maxAllowedNumberOfSharesToBuy(company, certs.get(0).getShare()) < 1) continue; ! stockSpace = company.getCurrentPrice(); if (!stockSpace.isNoCertLimit() && !currentPlayer.mayBuyCertificate(company, 1)) continue; ! if (cert.getCertificatePrice() <= playerCash) { possibleActions.add(new BuyCertificate(cert, ! company.getPortfolio())); } } --- 190,200 ---- if (currentPlayer.maxAllowedNumberOfSharesToBuy(company, certs.get(0).getShare()) < 1) continue; ! stockSpace = company.getCurrentSpace(); if (!stockSpace.isNoCertLimit() && !currentPlayer.mayBuyCertificate(company, 1)) continue; ! if (company.getMarketPrice() <= playerCash) { possibleActions.add(new BuyCertificate(cert, ! company.getPortfolio(), ! company.getMarketPrice())); } } *************** *** 556,560 **** Util.moveObjects(company.getPortfolio().getCertificatesPerCompany( company.getName()), pool); ! int cash = 5 * company.getCurrentPrice().getPrice(); new CashMove(null, company, cash); ReportBuffer.add(LocalText.getText("MonetiseTreasuryShares", --- 558,562 ---- Util.moveObjects(company.getPortfolio().getCertificatesPerCompany( company.getName()), pool); ! int cash = 5 * company.getMarketPrice(); new CashMove(null, company, cash); ReportBuffer.add(LocalText.getText("MonetiseTreasuryShares", |