From: Erik V. <ev...@us...> - 2009-09-03 21:37:07
|
Update of /cvsroot/rails/18xx/rails/game/specific/_18EU In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21151/rails/game/specific/_18EU Modified Files: StockRound_18EU.java Log Message: Implemented the certificate limit change after CGR formation. Have moved the initial limits out of Player into PlayerManager. PlayerManager is now a configurable component; this has affected all Game.xml files. The above has has effects on other classes, in particular StockRound. Index: StockRound_18EU.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_18EU/StockRound_18EU.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** StockRound_18EU.java 15 Jan 2009 20:53:28 -0000 1.20 --- StockRound_18EU.java 3 Sep 2009 21:36:54 -0000 1.21 *************** *** 196,205 **** cert = certs.get(0); if (isSaleRecorded(currentPlayer, company)) continue; ! if (!currentPlayer.mayBuyCompanyShare(company, 1)) continue; 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, --- 196,205 ---- cert = certs.get(0); if (isSaleRecorded(currentPlayer, company)) continue; ! if (!playerMayBuyCompanyShare(currentPlayer, company, 1)) continue; if (currentPlayer.maxAllowedNumberOfSharesToBuy(company, certs.get(0).getShare()) < 1) continue; stockSpace = company.getCurrentSpace(); if (!stockSpace.isNoCertLimit() ! && !playerMayBuyCertificate(currentPlayer, company, 1)) continue; if (company.getMarketPrice() <= playerCash) { possibleActions.add(new BuyCertificate(cert, *************** *** 318,322 **** numberOfCertsToBuy = shares - (cert.getShares() - 1); // Check if the player may buy that many certificates. ! if (!currentPlayer.mayBuyCertificate(company, numberOfCertsToBuy)) { errMsg = LocalText.getText("CantBuyMoreCerts"); break; --- 318,322 ---- numberOfCertsToBuy = shares - (cert.getShares() - 1); // Check if the player may buy that many certificates. ! if (!playerMayBuyCertificate(currentPlayer, company, numberOfCertsToBuy)) { errMsg = LocalText.getText("CantBuyMoreCerts"); break; |