From: Erik V. <ev...@us...> - 2009-11-25 18:44:29
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13792/rails/game Modified Files: OperatingRound.java Log Message: Check on honouring a fixed train price Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** OperatingRound.java 20 Nov 2009 20:56:50 -0000 1.78 --- OperatingRound.java 25 Nov 2009 18:44:17 -0000 1.79 *************** *** 1306,1309 **** --- 1306,1317 ---- break; } + + // Fixed price must be honoured + int fixedPrice = action.getFixedCost(); + if (fixedPrice != 0 && fixedPrice != price) { + errMsg = LocalText.getText("FixedPriceNotPaid", + Bank.format(price), + Bank.format(fixedPrice)); + } // Does the company have room for another train? *************** *** 1360,1363 **** --- 1368,1372 ---- break; } + if (errMsg != null) { DisplayBuffer.add(LocalText.getText("CannotBuyTrainFor", *************** *** 2349,2351 **** --- 2358,2365 ---- } + @Override + public String getRoundName() { + return toString(); + } + } |