From: Erik V. <ev...@us...> - 2012-03-13 21:08:07
|
LocalisedText.properties | 5 data/1880/CompanyManager.xml | 54 data/1880/Game.xml | 21 data/1880/Map.xml | 32 data/1880/TileSet.xml | 1 data/1880/Tiles.xml | 2 data/GamesList.xml | 23 rails/game/Company.java | 7 rails/game/CompanyI.java | 4 rails/game/PhaseI.java | 1 rails/game/PublicCompany.java | 7 rails/game/Round.java | 1 rails/game/ShareSellingRound.java | 8 rails/game/Station.java | 1 rails/game/Tile.java | 1 rails/game/TrainManager.java | 2 rails/game/specific/_1880/BuyStartItem_1880.java | 23 rails/game/specific/_1880/GameManager_1880.java | 45 rails/game/specific/_1880/OperatingRound_1880.java | 786 ++++++++--- rails/game/specific/_1880/PublicCompany_1880.java | 201 ++ rails/game/specific/_1880/StartRound_1880.java | 208 ++ rails/game/specific/_1880/StockMarket_1880.java | 158 +- rails/game/specific/_1880/StockRound_1880.java | 359 ++++- rails/ui/swing/RemainingTilesWindow.java | 19 rails/ui/swing/StartRoundWindow.java | 12 rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java | 134 + tiles/Tiles.xml | 4 tiles/svg/tile-9021.svg | 84 + tiles/svg/tile-9031.svg | 80 + tiles/svg/tile455.svg | 2 30 files changed, 1908 insertions(+), 377 deletions(-) New commits: commit 3f9305b21a19c4e254bf3552ca4ce1dfb0a16b6a Author: Martin Brumm <Dr....@t-...> Date: Tue Mar 13 22:04:47 2012 +0100 Added a new patch for 1880 by Martin Brumm. Also added the missing tile 455. diff --git a/LocalisedText.properties b/LocalisedText.properties index 059e471..4eb2d0a 100644 --- a/LocalisedText.properties +++ b/LocalisedText.properties @@ -755,12 +755,13 @@ Version=Version VersionOf=version of {0} WantToReplaceToken=Do you want to replace the {0} home token with one of {1}? WarningNeedCash=Warning: {0} will be deducted from the company revenue or from your personal cash -WHICH_BUILDING_RIGHT={0} please choose the Building Rights for {1} +WhichBuildingRight={0} please choose the Building Rights for {1} WHICH_PRICE=Which price? WHICH_PRIVATE=Which Private? WHICH_PRIVATE_PRICE=Buy {0} for which price (valid range {1} to {2})? WHICH_RIGHT=Which Building Right ? -WHICH_START_PRICE={0} please set the start price for {1} +WHICH_START_PRICE={0} please set the start price for {1} +WhichPresidentShareSize={0} please choose the Size of the Presidents share for {1} WhichStation=Which Station? WHICH_TRAIN=Which train WHICH_TRAIN_EXCHANGE_FOR=Which train to exchange for {0} diff --git a/data/1880/CompanyManager.xml b/data/1880/CompanyManager.xml index c4b55f7..b20e346 100644 --- a/data/1880/CompanyManager.xml +++ b/data/1880/CompanyManager.xml @@ -47,17 +47,14 @@ <Company name="WR" longname="Woosong Railway" type="Private" basePrice="5" revenue="0"> - - <!--SpecialProperty condition="ifOwnedByPlayer" Phasenwechsel-Freie Lok --> <ClosingConditions> - <Phase>4</Phase> <SpecialProperties condition="ifExercised"/> </ClosingConditions> </Company> <Company name="KR" longname="Kaiping Railway" type="Private" basePrice="10" revenue="5"> <ClosingConditions> - <Phase>4</Phase> + <Phase>4+4</Phase> </ClosingConditions> </Company> <Company name="YC" longname="Yanda Ferry Company" type="Private" @@ -65,7 +62,7 @@ <SpecialProperties> <SpecialProperty condition="ifOwnedByPlayer" when="revenueStep" class="rails.game.special.LocatedBonus" transfer="toCompany"> - <LocatedBonus name="Ferry" location="F12,F14,I15" value="10"/> + <LocatedBonus name="Ferry" location="F12,F14,I15,J16" value="10"/> </SpecialProperty> </SpecialProperties> </Company> @@ -81,9 +78,9 @@ <Company name="CC" longname="Chinese Rivers Ferry Company" type="Private" basePrice="70" revenue="20"> <SpecialProperties> - <SpecialProperty condition="ifOwnedByPlayer" when="tileLayingStep" + <SpecialProperty condition="ifOwnedByPlayer" when="tileLayingStep" permanent="true" class="rails.game.special.SpecialTileLay"> - <SpecialTileLay location="M15" extra="no" free="yes"/> + <SpecialTileLay location="G1,G3,G5,G11,H4,H10,I9,I7,I5,J2,I1,K1,O1,O3,N4,N6,M7,L8,L10,L12,K13,J14" extra="no" free="yes"/> </SpecialProperty> </SpecialProperties> </Company> @@ -101,78 +98,79 @@ </Company> <Company name="RC" longname="Rocket Company" type="Private" basePrice="70" revenue="0"> - <!-- SpecialProperties--> - <!-- SpecialProperty condition="ifOwnedByPlayer" when="trainBuyingStep" - class="rails.game.special.SpecialTrainBuy"/--> + <SpecialProperties> + <SpecialProperty condition="ifOwnedByPlayer" when="anyTurn" + class="rails.game.specific._1880.SpecialTrainBuy_1880"> + <SpecialTrainBuy_1880 traintype="2,2+2,3,3+3,4" deduction="100%"></SpecialTrainBuy_1880> <!-- Kostenfreie Lok bei Phasenwechsel durch Lokkauf --> - <!-- Can exchange Certificate for actual train in one phase 2,2+3,3,3+3,4 - as soon as train has been bought --> <!-- The train can be moved upon purchase into one company owned by the owner of the certificate --> <!-- Company must have space for the new train, but can hand back an older train to bank (2+2,3,3+3) --> - <!-- /SpecialProperties--> + </SpecialProperty> + </SpecialProperties> <ClosingConditions> - <Phase>5</Phase> + <SpecialProperties condition="ifExercised"/> + <Phase>4+4</Phase> </ClosingConditions> </Company> <Company name="BCR" longname="Baocheng Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="0000FF"> + fgColour="FFFFFF" bgColour="4A4A97"> <Home hex="M3"/> </Company> <Company name="JHA" longname="Jingha Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="000000" bgColour="E78B01"> <Home hex="F8" city="1"/> </Company> <Company name="JHU" longname="Jinghu Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="FFFFFF" bgColour="000000"> <Home hex="F8" city="2"/> </Company> <Company name="JGG" longname="Jingguang Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="FFFFFF" bgColour="92278A"> <Home hex="F8" city="3"/> </Company> <Company name="JLR" longname="Jinglan Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="000000" bgColour="60B495"> <Home hex="F8" city="4"/> </Company> <Company name="BZU" longname="Binzhou Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="000000" bgColour="EFEBC7"> <Home hex="B8"/> </Company> <Company name="LHR" longname="Longhai Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="000000" bgColour="C0B4B7"> <Home hex="J2"/> </Company> <Company name="SCR" longname="Schichang Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="FFFFFF" bgColour="71B622"> <Home hex="N12"/> </Company> <Company name="CKR" longname="Chengkun Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="000000" bgColour="D24026"> <Home hex="O5"/> </Company> <Company name="NXR" longname="Ningxi Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="000000" bgColour="CF8ABC"> <Home hex="J6"/> </Company> <Company name="HKR" longname="Hukun Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="FFFFFF" bgColour="A3CE06"> <Home hex="K15"/> </Company> <Company name="NJR" longname="Najiang Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="000000" bgColour="DBBC04"> <Home hex="K13"/> </Company> <Company name="QSR" longname="Qinshen Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="000000" bgColour="55B3D7"> <Home hex="D12"/> </Company> <Company name="WNR" longname="Wunan Railway" type="Major" tokens="3" - fgColour="FFFFFF" bgColour="FF0000"> + fgColour="000000" bgColour="EDE201"> <Home hex="L10"/> </Company> <Company name="1" longname="Chinese Eastern Railway" type="Minor" price="0" diff --git a/data/1880/Game.xml b/data/1880/Game.xml index 814f622..47f58c5 100644 --- a/data/1880/Game.xml +++ b/data/1880/Game.xml @@ -2,10 +2,8 @@ <ComponentManager> <Component name="GameManager" class="rails.game.specific._1880.GameManager_1880"> <Game name="1880"/> - <GameOption name="RouteAwareness" values="Highlight,Deactivate" - default="Deactivate"/> - <GameOption name="RevenueCalculation" values="Suggest,Deactivate" - default="Deactivate"/> + <GameOption name="RouteAwareness" values="Highlight,Deactivate" default="Highlight"/> + <GameOption name="RevenueCalculation" values="Suggest,Deactivate" default="Suggest"/> <GameOption name="UnlimitedTiles" values="No,Yellow Plain,Yes" default="No"/> <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> <GameParameters> @@ -16,13 +14,17 @@ </StockRound> <OperatingRound class="rails.game.specific._1880.OperatingRound_1880"> - <EmergencyTrainBuying mayBuyFromCompany="no"/> + <EmergencyTrainBuying mayBuyFromCompany="yes"/> </OperatingRound> + <ShareSellingRound class="rails.game.specific._1880.ShareSellingRound_1880"> + </ShareSellingRound> </GameParameters> <GuiClasses> <StatusWindow class="rails.ui.swing.StatusWindow"/> <StartRoundWindow class="rails.ui.swing.gamespecific._1880.StartRoundWindow_1880"/> + <GameUIManager + class="rails.ui.swing.gamespecific._1880.GameUIManager_1880"/> </GuiClasses> <EndOfGame/> @@ -70,6 +72,8 @@ <TrainType name="6" majorStops="6" cost="600" quantity="5"> <NewPhase phaseName="6"/> </TrainType> + <TrainType name="2R" majorStops="2" cost="250" quantity="10"> + </TrainType> <TrainType name="6e" majorStops="-1" cost="700" quantity="5"> <NewPhase phaseName="6e"/> </TrainType> @@ -83,7 +87,6 @@ <NewPhase phaseName="8e"/> </TrainType> <!-- majorStops="-1" indicates that this not a normally running train--> - <!-- The e-type trains are express trains that can ignore towns/cities on their way for a maximum payout--> <TrainType name="10" majorStops="10" cost="1000" quantity="-1"> <NewPhase phaseName="8e"/> @@ -158,11 +161,9 @@ </Phase> <Phase name="8e" realName="D3"> </Phase> + </Component> <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> - <Modifier class="rails.game.specific._1880.OffBoardRevenueModifier"/> - <Modifier - class="rails.game.specific._1880.ExpressTrainRevenueModifier"/> + <Modifier class="rails.game.specific._1880.OffBoardRevenueModifier"/> </Component> - </Component> </ComponentManager> \ No newline at end of file diff --git a/data/1880/Map.xml b/data/1880/Map.xml index a5f2214..bea9acd 100644 --- a/data/1880/Map.xml +++ b/data/1880/Map.xml @@ -5,8 +5,8 @@ <Hex name="A9" tile="0" /> <Hex name="A11" tile="0" /> <Hex name="A13" tile="0" /> - <Hex name="A15" tile="-902" orientation="2" value="10,20,30,40" /> - <Hex name="B4" tile="0" /> + <Hex name="A15" tile="-902" orientation="2" value="10,20,30,40" city="Vladivostok"/> + <Hex name="B4" tile="0" cost="30"/> <Hex name="B6" tile="0" /> <Hex name="B8" tile="-10" city="Harbin" /> <Hex name="B10" tile="0" /> @@ -32,12 +32,12 @@ <Hex name="E11" tile="0" impassable="E13" /> <Hex name="E13" tile="-10" city="Dalian" impassable="E11" /> <Hex name="F2" tile="0" /> - <Hex name="F4" tile="-80020" city="Hohhot,Datong" /> + <Hex name="F4" tile="-80020" city="Hohhot, Datong" /> <Hex name="F6" tile="-80001" city="Test8" cost="30" /> <Hex name="F8" tile="-80004" city="Beijing" orientation="5" label="Beijing"/> <Hex name="F10" tile="-10" city="Tianjin" /> - <Hex name="F12" tile="-4008" orientation="1"/> - <Hex name="F14" tile="-4008" orientation="6"/> + <Hex name="F12" tile="-4008" orientation="1" value="-10"/> + <Hex name="F14" tile="-4008" orientation="6" value="-10"/> <Hex name="G1" tile="0" cost="20" /> <Hex name="G3" tile="-10" city="Baotou" cost="20" /> <Hex name="G5" tile="0" cost="50" /> @@ -60,8 +60,8 @@ <Hex name="I9" tile="-80020" city="Kaifeng, Zhengzhou" cost="20" /> <Hex name="I11" tile="0" /> <Hex name="I13" tile="0" /> - <Hex name="I15" tile="-4009" orientation="2"/> - <Hex name="J2" tile="-10" city="Lhasa" cost="50"/> + <Hex name="I15" tile="-4009" orientation="2" value="-10"/> + <Hex name="J2" tile="-10" city="Lanzhou" cost="50"/> <Hex name="J4" tile="0" cost="30"/> <Hex name="J6" tile="-10" cost="30" city="Xian" /> <Hex name="J8" tile="-2" cost="30" /> @@ -76,10 +76,10 @@ <Hex name="K9" tile="0" cost="30" /> <Hex name="K11" tile="0" /> <Hex name="K13" tile="-10" cost="20" city="Nanjing" /> - <Hex name="K15" tile="-10" city="Shanghai" label="S"/> - <Hex name="L2" tile="0" /> - <Hex name="L4" tile="0" /> - <Hex name="L6" tile="0" /> + <Hex name="K15" tile="-80003" city="Shanghai" label="Shanghai"/> + <Hex name="L2" tile="0" cost="40"/> + <Hex name="L4" tile="0" cost="30"/> + <Hex name="L6" tile="0" cost="30"/> <Hex name="L8" tile="0" cost="50"/> <Hex name="L10" tile="-10" city="Wuhan" cost="20"/> <Hex name="L12" tile="-2" cost="20"/> @@ -100,7 +100,9 @@ <Hex name="N10" tile="-80001" city="Test3" /> <Hex name="N12" tile="-80020" city="Changsha, Nanchang" /> <Hex name="N14" tile="0" /> - <Hex name="N16" tile="-903" orientation="2" value="30,30,0,0" city="Taiwan" /> + <Hex name="N16" tile="-903" pic="-9031" orientation="2" value="30,30,0,0" city="Taiwan"> + <Access type="town" score="minor" /> + </Hex> <Hex name="O1" tile="0" cost="60" /> <Hex name="O3" tile="-2" cost="20"/> <Hex name="O5" tile="-10" city="Kunming" /> @@ -115,8 +117,10 @@ <Hex name="P8" tile="-10" city="Nanning" /> <Hex name="P10" tile="-1" cost="30" /> <Hex name="P12" tile="-10" city="Macau" /> - <Hex name="P14" tile="-10" city="Guangzhu" /> + <Hex name="P14" tile="-10" city="Guangzhou" /> <Hex name="Q7" tile="-902" orientation="4" value="30,40,50,60" city="French Indochina" /> - <Hex name="Q13" tile="-902" orientation="4" value="20,30,40,50" city="Haikou" /> + <Hex name="Q13" tile="-902" pic="-9021" orientation="4" value="20,30,40,50" city="Haikou" > + <Access type="town" score="minor"/> + </Hex> <Hex name="Q15" tile="-901" orientation="3" value="20,30,10,70" city="Hongkong"/> </Map> \ No newline at end of file diff --git a/data/1880/TileSet.xml b/data/1880/TileSet.xml index fdcf3a8..c894950 100644 --- a/data/1880/TileSet.xml +++ b/data/1880/TileSet.xml @@ -32,7 +32,6 @@ <Tile id="-901"/> <Tile id="-902"/> <Tile id="-903"/> - <!-- Yellow --> <Tile id="5" quantity="6"> <Upgrade id="14,15,619" /> diff --git a/data/1880/Tiles.xml b/data/1880/Tiles.xml index 6ed5fd7..6dcd97a 100644 --- a/data/1880/Tiles.xml +++ b/data/1880/Tiles.xml @@ -318,7 +318,7 @@ <Track from="city3" gauge="normal" to="side2"/> <Track from="city4" gauge="normal" to="side1"/> <Track from="city5" gauge="normal" to="side0"/> - </Tile><Tile colour="gray" id="455" name="495"> + </Tile><Tile colour="gray" id="455" name="455"> <Station id="city1" position="0" slots="3" type="City" value="50"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side4"/> diff --git a/data/GamesList.xml b/data/GamesList.xml index 3b6b2c5..488fe3f 100644 --- a/data/GamesList.xml +++ b/data/GamesList.xml @@ -299,14 +299,21 @@ Known Issues: <Players minimum="2" maximum="5" /> </Game> - <Game name="1880"> - <Note>Prototype</Note> - <Description>1880 - China - (c) 2010 Double O Games Mayfair Games, Inc. - Designed by Leonhard Ogler and Helmut Ohley - Limitations: - All aspects not present in 1880 have not been implemented yet.</Description> - <Players minimum="3" maximum="7"/> + <Game name="1880"> + <Note>Almost Playable</Note> + <Description>1880 - China + (c) 2010 Double O Games Mayfair Games, Inc. + Designed by Leonhard Ogler and Helmut Ohley + Limitations: + After the End of the StartRound the Playerorder in the Statuswindow is switched but not the Values + Workaround: Please save the game and reload it to fix this. + Not yet Implemented: + Automatic Deduction of Ferry Fees, please adjust manually or disable automatic RevenueCalculation + The Investor will be closed and the cash will go to the original company, the owner will receive 50 Yuan. + </Description> + <Players minimum="3" maximum="7"/> + <Option name="RouteAwareness" values="Highlight,Deactivate" default="Highlight" /> + <Option name="RevenueCalculation" values="Suggest,Deactivate" default="Suggest" /> </Game> <Game name="18Scan"> <Note>Prototype</Note> diff --git a/rails/game/Company.java b/rails/game/Company.java index 0b2aa2f..cc59d5f 100644 --- a/rails/game/Company.java +++ b/rails/game/Company.java @@ -260,4 +260,11 @@ Cloneable, Comparable<Company> { } return b.toString(); } + + /** + * @param infoText the infoText to set + */ + public void setInfoText(String infoText) { + this.infoText = infoText; + } } diff --git a/rails/game/CompanyI.java b/rails/game/CompanyI.java index 8759c8c..e7646f5 100644 --- a/rails/game/CompanyI.java +++ b/rails/game/CompanyI.java @@ -111,4 +111,8 @@ public interface CompanyI extends ConfigurableComponentI, MoveableHolder { public String toString(); public boolean equals(CompanyI company); + /** + * @param string + */ + public void setInfoText(String string); } diff --git a/rails/game/PhaseI.java b/rails/game/PhaseI.java index d877c4f..e6b548b 100644 --- a/rails/game/PhaseI.java +++ b/rails/game/PhaseI.java @@ -17,6 +17,7 @@ public interface PhaseI extends ConfigurableComponentI { public int getIndex(); public String getName(); + public String getRealName(); public boolean doPrivatesClose(); public void addObjectToClose(Closeable object); diff --git a/rails/game/PublicCompany.java b/rails/game/PublicCompany.java index 3a8377c..48c56ed 100644 --- a/rails/game/PublicCompany.java +++ b/rails/game/PublicCompany.java @@ -2100,4 +2100,11 @@ public class PublicCompany extends Company implements PublicCompanyI { return true; } + /** + * @param destinationHex the destinationHex to set + */ + public void setDestinationHex(MapHex destinationHex) { + this.destinationHex = destinationHex; + } + } diff --git a/rails/game/Round.java b/rails/game/Round.java index 0dcfd98..6e113ae 100644 --- a/rails/game/Round.java +++ b/rails/game/Round.java @@ -13,7 +13,6 @@ import rails.common.*; import rails.game.action.*; import rails.game.move.*; import rails.game.special.SpecialPropertyI; -import rails.game.specific._1880.PublicCompany_1880; import rails.game.state.BooleanState; /** diff --git a/rails/game/ShareSellingRound.java b/rails/game/ShareSellingRound.java index d8a015d..a5e9115 100644 --- a/rails/game/ShareSellingRound.java +++ b/rails/game/ShareSellingRound.java @@ -20,9 +20,9 @@ public class ShareSellingRound extends StockRound { RoundI parentRound; Player sellingPlayer; - IntegerState cashToRaise; - PublicCompanyI cashNeedingCompany; - boolean dumpOtherCompaniesAllowed; + protected IntegerState cashToRaise; + protected PublicCompanyI cashNeedingCompany; + protected boolean dumpOtherCompaniesAllowed; private List<SellShares> sellableShares; @@ -94,7 +94,7 @@ public class ShareSellingRound extends StockRound { * Create a list of certificates that a player may sell in an emergency * share selling round, taking all rules taken into account. */ - private List<SellShares> getSellableShares () { + protected List<SellShares> getSellableShares () { sellableShares = new ArrayList<SellShares> (); diff --git a/rails/game/Station.java b/rails/game/Station.java index 634fe2d..35c1e62 100644 --- a/rails/game/Station.java +++ b/rails/game/Station.java @@ -45,6 +45,7 @@ public class Station { private static final String[] types = { CITY, TOWN, HALT, OFF_MAP_AREA, PORT, PASS, JUNCTION }; private static final List<String> validTypes = Arrays.asList(types); + protected static Logger log = Logger.getLogger(Station.class.getPackage().getName()); diff --git a/rails/game/Tile.java b/rails/game/Tile.java index d36365e..a838490 100644 --- a/rails/game/Tile.java +++ b/rails/game/Tile.java @@ -92,6 +92,7 @@ public class Tile extends ModelObject implements TileI, StationHolder, Comparabl public static final String GREY_COLOUR_NAME = "grey"; public static final int GREY_COLOUR_NUMBER = 4; + protected static final List<String> VALID_COLOUR_NAMES = Arrays.asList(new String[] { RED_COLOUR_NAME, FIXED_COLOUR_NAME, WHITE_COLOUR_NAME, YELLOW_COLOUR_NAME, GREEN_COLOUR_NAME, diff --git a/rails/game/TrainManager.java b/rails/game/TrainManager.java index 2b18b83..cfa95f8 100644 --- a/rails/game/TrainManager.java +++ b/rails/game/TrainManager.java @@ -1 +1 @@ -/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/TrainManager.java,v 1.28 2010/04/21 21:25:50 evos Exp $ */ package rails.game; import java.util.*; import org.apache.log4j.Logger; import rails.common.LocalText; import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; import rails.game.move.ObjectMove; import rails.game.state.BooleanState; import rails.game.state.IntegerState; public class TrainManager implements ConfigurableComponentI { // Static attributes protected List<TrainType> lTrainTypes = new ArrayList<TrainType>(); protected Map<String, TrainType> mTrainTypes = new HashMap<String, TrainType>(); protected List<TrainCertificateType> trainCertTypes = new ArrayList<TrainCertificateType>(); protected Map<String, TrainCertificateType> trainCertTypeMap = new HashMap<String, TrainCertificateType>(); protected Map<String, TrainI> trainMap = new HashMap<String, TrainI>(); protected Map<TrainCertificateType, List<TrainI>> trainsPerCertType = new HashMap<TrainCertificateType, List<TrainI>>(); protected TrainType defaultType = null; // Only required locally and in ChoiceType private boolean removeTrain = false; // Dynamic attributes protected IntegerState newTypeIndex; protected Map<String, Integer> lastIndexPerType = new HashMap<String, Integer>(); protected boolean trainsHaveRusted = false; protected boolean phaseHasChanged = false; protected boolean trainAvailabilityChanged = false; protected List<PublicCompanyI> companiesWithExcessTrains; protected GameManagerI gameManager = null; protected Bank bank = null; /** Required for the sell-train-to-foreigners feature of some games */ protected BooleanState anyTrainBought = new BooleanState ("AnyTrainBought", false); // Triggered phase changes protected Map<TrainCertificateType, Map<Integer, |