From: Erik V. <ev...@us...> - 2008-12-24 14:52:54
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2737/rails/game Modified Files: TileI.java Tile.java Log Message: New <AllowsMultipleBasesOfOneCompany> property to deal with 18EU Paris/Berlin/Vienna allowances. Index: TileI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/TileI.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TileI.java 29 Nov 2008 20:01:33 -0000 1.14 --- TileI.java 24 Dec 2008 14:52:47 -0000 1.15 *************** *** 38,41 **** --- 38,43 ---- public boolean isUpgradeable(); + + public boolean allowsMultipleBasesOfOneCompany(); public List<TileI> getUpgrades(MapHex hex, PhaseI phase); Index: Tile.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Tile.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Tile.java 11 Dec 2008 20:12:07 -0000 1.25 --- Tile.java 24 Dec 2008 14:52:47 -0000 1.26 *************** *** 42,45 **** --- 42,47 ---- private int quantity; private boolean unlimited = false; + private boolean allowsMultipleBasesOfOneCompany = false; + public static final int UNLIMITED_TILES = -1; *************** *** 198,201 **** --- 200,206 ---- unlimited = (quantity == 99 || quantity == UNLIMITED_TILES); if (unlimited) quantity = UNLIMITED_TILES; + /* Multiple base tokens of one company allowed */ + allowsMultipleBasesOfOneCompany = setTag.hasChild( + "AllowsMultipleBasesOfOneCompany"); /* Upgrades */ *************** *** 336,339 **** --- 341,348 ---- } + public boolean allowsMultipleBasesOfOneCompany() { + return allowsMultipleBasesOfOneCompany; + } + /** * Get the valid upgrades if this tile on a certain hex (restrictions per |