From: Erik V. <ev...@us...> - 2009-12-28 14:53:15
|
Update of /cvsroot/rails/18xx/rails/game/special In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27496/rails/game/special Modified Files: SellBonusToken.java Log Message: 1856: allowing unlimited Bridge/Tunnel bonus tokens as a game option Index: SellBonusToken.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/special/SellBonusToken.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SellBonusToken.java 28 Dec 2009 13:21:12 -0000 1.4 --- SellBonusToken.java 28 Dec 2009 14:53:00 -0000 1.5 *************** *** 44,48 **** throw new ConfigurationException("Price invalid ["+price+"] or missing"); ! maxNumberToSell = sellBonusTokenTag.getAttributeAsInteger("number", 1); seller = new State ("SellerOf_"+name+"_Bonus", CashHolder.class); --- 44,48 ---- throw new ConfigurationException("Price invalid ["+price+"] or missing"); ! maxNumberToSell = sellBonusTokenTag.getAttributeAsInteger("amount", 1); seller = new State ("SellerOf_"+name+"_Bonus", CashHolder.class); *************** *** 55,58 **** --- 55,60 ---- locations = gameManager.getMapManager().parseLocations(locationCodes); + + } *************** *** 66,69 **** --- 68,72 ---- } + @Override public boolean isExercised () { return maxNumberToSell >= 0 && numberSold.intValue() >= maxNumberToSell; *************** *** 106,110 **** return "SellBonusToken comp=" + privateCompany.getName() + " hex=" + locationCodes + " value=" + value + " price=" + price ! + " sold="+numberSold.intValue(); } --- 109,113 ---- return "SellBonusToken comp=" + privateCompany.getName() + " hex=" + locationCodes + " value=" + value + " price=" + price ! + " max="+maxNumberToSell+" sold="+numberSold.intValue(); } |