From: Erik V. <ev...@us...> - 2008-12-11 20:12:40
|
Update of /cvsroot/rails/18xx/rails/game/specific/_1856 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21068/rails/game/specific/_1856 Modified Files: StockRound_1856.java Log Message: Cleanups, annotations, formatting Index: StockRound_1856.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1856/StockRound_1856.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** StockRound_1856.java 4 Dec 2008 01:20:13 -0000 1.5 --- StockRound_1856.java 11 Dec 2008 20:12:30 -0000 1.6 *************** *** 1,14 **** package rails.game.specific._1856; ! import rails.game.Bank; ! import rails.game.CashHolder; ! import rails.game.Certificate; ! import rails.game.GameManager; ! import rails.game.Portfolio; ! import rails.game.PublicCertificateI; ! import rails.game.PublicCompanyI; ! import rails.game.ReportBuffer; ! import rails.game.StockRound; ! import rails.game.move.CashMove; import rails.util.LocalText; --- 1,5 ---- package rails.game.specific._1856; ! import rails.game.*; import rails.util.LocalText; *************** *** 27,33 **** /** * Special 1856 code to check for company flotation. ! * * @param company */ protected void checkFlotation(PublicCompanyI company) { --- 18,25 ---- /** * Special 1856 code to check for company flotation. ! * * @param company */ + @Override protected void checkFlotation(PublicCompanyI company) { *************** *** 35,50 **** int unsoldPercentage = company.getUnsoldPercentage(); ! PublicCompany_1856 comp = (PublicCompany_1856) company; int trainNumberAtStart = comp.getTrainNumberAvailableAtStart(); int floatPercentage = 10 * trainNumberAtStart; ! log.debug ("Floatpercentage is "+floatPercentage); ! if (unsoldPercentage <= 100 - floatPercentage) { // Company floats. // In 1856 this does not mean that the company will operate, // only that it will be added to the list of companies ! // being considered for an OR turn. // See OperatingRound_1856 for the actual check. if (!company.hasFloated()) { --- 27,42 ---- int unsoldPercentage = company.getUnsoldPercentage(); ! PublicCompany_1856 comp = (PublicCompany_1856) company; int trainNumberAtStart = comp.getTrainNumberAvailableAtStart(); int floatPercentage = 10 * trainNumberAtStart; ! log.debug ("Floatpercentage is "+floatPercentage); ! if (unsoldPercentage <= 100 - floatPercentage) { // Company floats. // In 1856 this does not mean that the company will operate, // only that it will be added to the list of companies ! // being considered for an OR turn. // See OperatingRound_1856 for the actual check. if (!company.hasFloated()) { *************** *** 54,62 **** } protected CashHolder getSharePriceRecipient(Certificate cert, int price) { CashHolder recipient; Portfolio oldHolder = (Portfolio) cert.getHolder(); ! if (price != 0 && cert instanceof PublicCertificateI --- 46,55 ---- } + @Override protected CashHolder getSharePriceRecipient(Certificate cert, int price) { CashHolder recipient; Portfolio oldHolder = (Portfolio) cert.getHolder(); ! if (price != 0 && cert instanceof PublicCertificateI *************** *** 76,80 **** ReportBuffer.addWaiting(LocalText.getText("HoldMoneyInEscrow", new String[] { Bank.format(comp.getMoneyInEscrow()), ! comp.getName() })); break; --- 69,73 ---- ReportBuffer.addWaiting(LocalText.getText("HoldMoneyInEscrow", new String[] { Bank.format(comp.getMoneyInEscrow()), ! comp.getName() })); break; |