You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(46) |
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(51) |
Feb
(10) |
Mar
|
Apr
|
May
(14) |
Jun
|
Jul
(13) |
Aug
(30) |
Sep
(83) |
Oct
(56) |
Nov
(148) |
Dec
(107) |
2010 |
Jan
(260) |
Feb
(164) |
Mar
(183) |
Apr
(99) |
May
(160) |
Jun
(40) |
Jul
(33) |
Aug
(48) |
Sep
(22) |
Oct
(24) |
Nov
(1) |
Dec
(12) |
2011 |
Jan
(6) |
Feb
(15) |
Mar
(13) |
Apr
(37) |
May
(27) |
Jun
(29) |
Jul
(33) |
Aug
(20) |
Sep
(17) |
Oct
(20) |
Nov
(33) |
Dec
(17) |
2012 |
Jan
(39) |
Feb
(38) |
Mar
(20) |
Apr
(21) |
May
(17) |
Jun
(22) |
Jul
(16) |
Aug
(3) |
Sep
(9) |
Oct
(10) |
Nov
|
Dec
|
From: <ev...@us...> - 2011-06-22 11:57:01
|
Revision: 1582 http://rails.svn.sourceforge.net/rails/?rev=1582&view=rev Author: evos Date: 2011-06-22 11:56:55 +0000 (Wed, 22 Jun 2011) Log Message: ----------- Fixed 1830 PM config bug, and added a check for this and related errors. Modified Paths: -------------- trunk/18xx/data/1830/Game.xml trunk/18xx/rails/game/TrainManager.java Modified: trunk/18xx/data/1830/Game.xml =================================================================== --- trunk/18xx/data/1830/Game.xml 2011-06-21 21:25:49 UTC (rev 1581) +++ trunk/18xx/data/1830/Game.xml 2011-06-22 11:56:55 UTC (rev 1582) @@ -173,13 +173,13 @@ <IfOption name="WithOptional6Train" value="no"> <Attributes quantity="2"/> </IfOption> - <IfOption name="Variant" value="Pere Marquette,Coalfields,Reading"> + <IfOption name="Variant" value="Coalfields,Reading"> <Attributes quantity="3" releasedTrain="7,D"/> </IfOption> <IfOption name="Variant" value="Coalfields&Reading"> <Attributes quantity="4" releasedTrain="7,D"/> </IfOption> - <IfOption name="Variant" value="Simple,Wabash"> + <IfOption name="Variant" value="Pere Marquette,Simple,Wabash"> <Attributes quantity="3"/> </IfOption> </TrainType> Modified: trunk/18xx/rails/game/TrainManager.java =================================================================== --- trunk/18xx/rails/game/TrainManager.java 2011-06-21 21:25:49 UTC (rev 1581) +++ trunk/18xx/rails/game/TrainManager.java 2011-06-22 11:56:55 UTC (rev 1582) @@ -138,11 +138,15 @@ // Finish initialisation of the train types Map<Integer, String> rustedTrainTypeNames; - TrainCertificateType rustedType; + TrainCertificateType releasedType, rustedType; for (TrainCertificateType type : trainCertTypes) { if (type.getReleasedTrainTypeNames() != null) { List<TrainCertificateType> rtts = new ArrayList<TrainCertificateType>(2); for (String ttName : type.getReleasedTrainTypeNames().split(",")) { + releasedType = trainCertTypeMap.get(ttName); + if (releasedType == null) { + throw new ConfigurationException ("Train type "+type.getName()+" releases undefined type "+ttName); + } rtts.add (trainCertTypeMap.get(ttName)); } type.setReleasedTrainTypes(rtts); @@ -150,7 +154,11 @@ rustedTrainTypeNames = type.getRustedTrainTypeNames(); if (rustedTrainTypeNames != null) { for (int index : rustedTrainTypeNames.keySet()) { - rustedType = trainCertTypeMap.get(rustedTrainTypeNames.get(index)); + String ttName = rustedTrainTypeNames.get(index); + rustedType = trainCertTypeMap.get(ttName); + if (rustedType == null) { + throw new ConfigurationException ("Train type "+type.getName()+" rusts undefined type "+ttName); + } type.setRustedTrainType(index, rustedType); rustedType.setPermanent(false); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-06-21 21:25:57
|
Revision: 1581 http://rails.svn.sourceforge.net/rails/?rev=1581&view=rev Author: evos Date: 2011-06-21 21:25:49 +0000 (Tue, 21 Jun 2011) Log Message: ----------- Train management refactoring II - game Major overhaul of train management. TrainCertificateType describes buyable trains, single or dual TrainType describes a singe train type Train describes separate train certificate objects. It contains a reference to the current TrainType, which is null as long as it is owned by the Bank. Modified Paths: -------------- trunk/18xx/LocalisedText.properties trunk/18xx/rails/algorithms/NetworkTrain.java trunk/18xx/rails/algorithms/RevenueAdapter.java trunk/18xx/rails/algorithms/RevenueBonus.java trunk/18xx/rails/algorithms/RevenueBonusTemplate.java trunk/18xx/rails/game/OperatingRound.java trunk/18xx/rails/game/Portfolio.java trunk/18xx/rails/game/PublicCompany.java trunk/18xx/rails/game/Train.java trunk/18xx/rails/game/TrainI.java trunk/18xx/rails/game/TrainManager.java trunk/18xx/rails/game/TrainType.java trunk/18xx/rails/game/action/BuyTrain.java trunk/18xx/rails/game/model/TrainsModel.java trunk/18xx/rails/game/specific/_1856/CGRFormationRound.java trunk/18xx/rails/game/specific/_1856/PublicCompany_1856.java trunk/18xx/rails/game/specific/_1856/PublicCompany_CGR.java trunk/18xx/rails/game/specific/_18AL/NameableTrain.java trunk/18xx/rails/game/specific/_18EU/OperatingRound_18EU.java trunk/18xx/rails/game/state/GenericState.java trunk/18xx/rails/ui/swing/ORPanel.java trunk/18xx/rails/ui/swing/ORUIManager.java Added Paths: ----------- trunk/18xx/rails/game/TrainCertificateType.java Removed Paths: ------------- trunk/18xx/rails/game/TrainTypeI.java Modified: trunk/18xx/LocalisedText.properties =================================================================== --- trunk/18xx/LocalisedText.properties 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/LocalisedText.properties 2011-06-21 21:25:49 UTC (rev 1581) @@ -322,13 +322,10 @@ InvalidAction=Invalid action in this game InvalidAllocationTypeIndex=Invalid allocation type index: {0} InvalidBid=Invalid bid by {0} on {1}: {2} -InvalidCost=Invalid or zero cost specified InvalidDoneAction=Invalid Done action InvalidParPriceSetting=Invalid par price {0} set by {1} for {2}: {3} InvalidPass=Invalid pass by {0}: {1} -InvalidQuantity=Invalid quantity specified: {0} InvalidStartPrice=Invalid start price {0} for {1} -InvalidStops=Invalid or zero major stops specified InvalidTileColourName=Invalid colour name {1} for tile {0} InvalidTileLay=Invalid tile lay InvalidTrackEnd=Invalid track end @@ -401,7 +398,6 @@ NoIncomeForPreviousOperation={0} gets no income for {1}% {2} shares as precursors have operated NoMapMode=No map mode (for ftf play) NoMoney=Not enough money -NoNameSpecified=No name specified None=None NoPriceToSet=No price to be set # Texts with lowercase keys are intended to be inserted into other messages Modified: trunk/18xx/rails/algorithms/NetworkTrain.java =================================================================== --- trunk/18xx/rails/algorithms/NetworkTrain.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/algorithms/NetworkTrain.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -3,7 +3,7 @@ import org.apache.log4j.Logger; import rails.game.TrainI; -import rails.game.TrainTypeI; +import rails.game.TrainType; public final class NetworkTrain { @@ -118,7 +118,7 @@ return railsTrain; } - public TrainTypeI getRailsTrainType() { + public TrainType getRailsTrainType() { if (railsTrain == null) return null; return railsTrain.getType(); Modified: trunk/18xx/rails/algorithms/RevenueAdapter.java =================================================================== --- trunk/18xx/rails/algorithms/RevenueAdapter.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/algorithms/RevenueAdapter.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -22,7 +22,7 @@ import rails.game.PhaseI; import rails.game.PublicCompanyI; import rails.game.TrainI; -import rails.game.TrainTypeI; +import rails.game.TrainType; import rails.ui.swing.hexmap.HexMap; import rails.util.LocalText; @@ -172,10 +172,10 @@ } public boolean addTrainByString(String trainString) { - TrainTypeI trainType = gameManager.getTrainManager().getTypeByName(trainString.trim()); + TrainType trainType = gameManager.getTrainManager().getTypeByName(trainString.trim()); if (trainType != null) { // string defines available trainType log.info("RA: found trainType" + trainType); - TrainI railsTrain = gameManager.getTrainManager().cloneTrain(trainType); + TrainI railsTrain = gameManager.getTrainManager().cloneTrain(trainType.getCertificateType()); return addTrain(railsTrain); } else { // otherwise interpret the train NetworkTrain train = NetworkTrain.createFromString(trainString); Modified: trunk/18xx/rails/algorithms/RevenueBonus.java =================================================================== --- trunk/18xx/rails/algorithms/RevenueBonus.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/algorithms/RevenueBonus.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -10,7 +10,7 @@ import rails.game.PhaseI; import rails.game.TrainI; -import rails.game.TrainTypeI; +import rails.game.TrainType; public final class RevenueBonus { @@ -25,7 +25,7 @@ // internal attributes private List<NetworkVertex> vertices; - private List<TrainTypeI> trainTypes; + private List<TrainType> trainTypes; private List<TrainI> trains; private List<PhaseI> phases; @@ -34,7 +34,7 @@ this.name = name; vertices = new ArrayList<NetworkVertex>(); - trainTypes = new ArrayList<TrainTypeI>(); + trainTypes = new ArrayList<TrainType>(); trains = new ArrayList<TrainI>(); phases = new ArrayList<PhaseI>(); } @@ -47,7 +47,7 @@ this.vertices.addAll(vertices); } - public void addTrainType(TrainTypeI trainType) { + public void addTrainType(TrainType trainType) { trainTypes.add(trainType); } @@ -71,7 +71,7 @@ return vertices; } - public List<TrainTypeI> getTrainTypes() { + public List<TrainType> getTrainTypes() { return trainTypes; } Modified: trunk/18xx/rails/algorithms/RevenueBonusTemplate.java =================================================================== --- trunk/18xx/rails/algorithms/RevenueBonusTemplate.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/algorithms/RevenueBonusTemplate.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -12,7 +12,7 @@ import rails.game.PhaseI; import rails.game.PhaseManager; import rails.game.TrainManager; -import rails.game.TrainTypeI; +import rails.game.TrainType; import rails.util.Tag; /** @@ -117,7 +117,7 @@ private void convertTrainTypes(RevenueBonus bonus, TrainManager tm) { for (String identTrainType:identTrainTypes) { - TrainTypeI trainType = tm.getTypeByName(identTrainType); + TrainType trainType = tm.getTypeByName(identTrainType); if (trainType != null) { bonus.addTrainType(trainType); } Modified: trunk/18xx/rails/game/OperatingRound.java =================================================================== --- trunk/18xx/rails/game/OperatingRound.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/game/OperatingRound.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -58,8 +58,8 @@ /** A List per player with owned companies that have excess trains */ protected Map<Player, List<PublicCompanyI>> excessTrainCompanies = null; - protected List<TrainTypeI> trainsBoughtThisTurn = - new ArrayList<TrainTypeI>(4); + protected List<TrainCertificateType> trainsBoughtThisTurn = + new ArrayList<TrainCertificateType>(4); protected Map<PublicCompanyI, Integer> loansThisRound = null; @@ -1763,7 +1763,7 @@ //exchangedTrain = operatingCompany.getObject().getPortfolio().getTrainList().get(0); //action.setExchangedTrain(exchangedTrain); break; - } else if (operatingCompany.get().getPortfolio().getTrainOfType(exchangedTrain.getType()) == null) { + } else if (operatingCompany.get().getPortfolio().getTrainOfType(exchangedTrain.getCertType()) == null) { errMsg = LocalText.getText("CompanyDoesNotOwnTrain", operatingCompany.get().getName(), exchangedTrain.getName()); @@ -1812,7 +1812,7 @@ if (exchangedTrain != null) { TrainI oldTrain = operatingCompany.get().getPortfolio().getTrainOfType( - exchangedTrain.getType()); + exchangedTrain.getCertType()); oldTrain.moveTo(train.isObsolete() ? scrapHeap : pool); ReportBuffer.add(LocalText.getText("ExchangesTrain", companyName, @@ -1835,18 +1835,20 @@ stb.getOriginalCompany().getName() )); } + train.setType(action.getType()); // Needed for dual trains bought from the Bank + operatingCompany.get().buyTrain(train, price); if (oldHolder == ipo) { - train.getType().addToBoughtFromIPO(); + train.getCertType().addToBoughtFromIPO(); trainManager.setAnyTrainBought(true); // Clone the train if infinitely available - if (train.getType().hasInfiniteQuantity()) { - ipo.addTrain(trainManager.cloneTrain(train.getType())); + if (train.getCertType().hasInfiniteQuantity()) { + ipo.addTrain(trainManager.cloneTrain(train.getCertType())); } } if (oldHolder.getOwner() instanceof Bank) { - trainsBoughtThisTurn.add(train.getType()); + trainsBoughtThisTurn.add(train.getCertType()); } if (stb != null) { @@ -1957,6 +1959,11 @@ // if (action.isForced()) moveStack.linkToPreviousMoveSet(); + // Reset type of dual trains + if (train.getCertType().getPotentialTrainTypes().size() > 1) { + train.setType(null); + } + train.moveTo(train.isObsolete() ? scrapHeap : pool); ReportBuffer.add(LocalText.getText("CompanyDiscardsTrain", companyName, @@ -2623,7 +2630,7 @@ int cash = operatingCompany.get().getCash(); - int cost; + int cost = 0; List<TrainI> trains; boolean hasTrains = @@ -2650,24 +2657,30 @@ for (TrainI train : trains) { if (!operatingCompany.get().mayBuyTrainType(train)) continue; if (!mayBuyMoreOfEachType - && trainsBoughtThisTurn.contains(train.getType())) { + && trainsBoughtThisTurn.contains(train.getCertType())) { continue; } - cost = train.getCost(); - if (cost <= cash) { - if (canBuyTrainNow) { - BuyTrain action = new BuyTrain(train, ipo, cost); - action.setForcedBuyIfNoRoute(presidentMayHelp); // TEMPORARY - possibleActions.add(action); + + // Allow dual trains (since jun 2011) + List<TrainType> types = train.getCertType().getPotentialTrainTypes(); + for (TrainType type : types) { + cost = type.getCost(); + if (cost <= cash) { + if (canBuyTrainNow) { + BuyTrain action = new BuyTrain(train, type, ipo, cost); + action.setForcedBuyIfNoRoute(presidentMayHelp); // TEMPORARY + possibleActions.add(action); + } + } else if (costOfCheapestTrain == 0 + || cost < costOfCheapestTrain) { + cheapestTrain = train; + costOfCheapestTrain = cost; } - } else if (costOfCheapestTrain == 0 - || cost < costOfCheapestTrain) { - cheapestTrain = train; - costOfCheapestTrain = cost; } + // Even at train limit, exchange is allowed (per 1856) if (train.canBeExchanged() && hasTrains) { - cost = train.getType().getExchangeCost(); + cost = train.getCertType().getExchangeCost(); if (cost <= cash) { List<TrainI> exchangeableTrains = operatingCompany.get().getPortfolio().getUniqueTrains(); @@ -2683,8 +2696,8 @@ // Can a special property be used? // N.B. Assume that this never occurs in combination with - // a train exchange, otherwise the below code must be duplicated - // above. + // dual trains or train exchanges, + // otherwise the below code must be duplicated above. for (SpecialTrainBuy stb : getSpecialProperties(SpecialTrainBuy.class)) { int reducedPrice = stb.getPrice(cost); if (reducedPrice > cash) continue; @@ -2701,7 +2714,7 @@ trains = pool.getUniqueTrains(); for (TrainI train : trains) { if (!mayBuyMoreOfEachType - && trainsBoughtThisTurn.contains(train.getType())) { + && trainsBoughtThisTurn.contains(train.getCertType())) { continue; } cost = train.getCost(); @@ -2895,7 +2908,7 @@ if (getGameParameterAsBoolean(GameDef.Parm.REMOVE_TRAIN_BEFORE_SR) && trainManager.isAnyTrainBought()) { TrainI train = trainManager.getAvailableNewTrains().get(0); - if (train.getType().hasInfiniteQuantity()) return; + if (train.getCertType().hasInfiniteQuantity()) return; new ObjectMove (train, ipo, scrapHeap); ReportBuffer.add(LocalText.getText("RemoveTrain", train.getName())); } Modified: trunk/18xx/rails/game/Portfolio.java =================================================================== --- trunk/18xx/rails/game/Portfolio.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/game/Portfolio.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -51,8 +51,10 @@ /** Owned trains */ protected List<TrainI> trains = new ArrayList<TrainI>(); - protected Map<TrainTypeI, List<TrainI>> trainsPerType = - new HashMap<TrainTypeI, List<TrainI>>(); + protected Map<TrainType, List<TrainI>> trainsPerType = + new HashMap<TrainType, List<TrainI>>(); + protected Map<TrainCertificateType, List<TrainI>> trainsPerCertType = + new HashMap<TrainCertificateType, List<TrainI>>(); protected TrainsModel trainsModel = new TrainsModel(this); /** Owned tokens */ @@ -73,6 +75,8 @@ protected String name; /** Unique name (including owner class name) */ protected String uniqueName; + + GameManagerI gameManager; /** Specific portfolio names */ public static final String IPO_NAME = "IPO"; @@ -88,7 +92,8 @@ this.owner = holder; this.uniqueName = holder.getClass().getSimpleName() + "_" + name; - GameManager.getInstance().addPortfolio(this); + gameManager = GameManager.getInstance(); + gameManager.addPortfolio(this); if (owner instanceof PublicCompanyI) { trainsModel.setOption(TrainsModel.FULL_LIST); @@ -390,24 +395,33 @@ } public void addTrain (TrainI train) { - addTrain (train, new int[] {-1,-1}); + addTrain (train, new int[] {-1,-1,-1}); } public void addTrain(TrainI train, int[] position) { Util.addToList(trains, train, position[0]); - TrainTypeI type = train.getType(); + + TrainType type = train.getType(); if (!trainsPerType.containsKey(type)) { trainsPerType.put(type, new ArrayList<TrainI>()); } - Util.addToList(trainsPerType.get(train.getType()), train, position[1]); + Util.addToList(trainsPerType.get(type), train, position[1]); + + TrainCertificateType certType = train.getCertType(); + if (!trainsPerCertType.containsKey(certType)) { + trainsPerCertType.put(certType, new ArrayList<TrainI>()); + } + Util.addToList(trainsPerCertType.get(certType), train, position[2]); + train.setHolder(this); trainsModel.update(); } public void removeTrain(TrainI train) { trains.remove(train); - trainsPerType.get(train.getType()).remove(train); + trainsPerType.get(train.getPreviousType()).remove(train); + trainsPerCertType.get(train.getCertType()).remove(train); train.setHolder(null); trainsModel.update(); } @@ -436,7 +450,7 @@ return trains; } - public TrainI[] getTrainsPerType(TrainTypeI type) { + public TrainI[] getTrainsPerType(TrainType type) { List<TrainI> trainsFound = new ArrayList<TrainI>(); for (TrainI train : trains) { @@ -454,8 +468,8 @@ public List<TrainI> getUniqueTrains() { List<TrainI> trainsFound = new ArrayList<TrainI>(); - Map<TrainTypeI, Object> trainTypesFound = - new HashMap<TrainTypeI, Object>(); + Map<TrainType, Object> trainTypesFound = + new HashMap<TrainType, Object>(); for (TrainI train : trains) { if (!trainTypesFound.containsKey(train.getType())) { trainsFound.add(train); @@ -466,9 +480,9 @@ } - public TrainI getTrainOfType(TrainTypeI type) { + public TrainI getTrainOfType(TrainCertificateType type) { for (TrainI train : trains) { - if (train.getType() == type) return train; + if (train.getCertType() == type) return train; } return null; } @@ -478,19 +492,19 @@ * IPO. */ - public String makeAbbreviatedListOfTrains() { + public String makeListOfTrainCertificates() { if (trains == null || trains.isEmpty()) return ""; - StringBuffer b = new StringBuffer(); + StringBuilder b = new StringBuilder(); List<TrainI> trainsOfType; - for (TrainTypeI type : GameManager.getInstance().getTrainManager().getTrainTypes()) { - trainsOfType = trainsPerType.get(type); + for (TrainCertificateType certType : gameManager.getTrainManager().getTrainCertTypes()) { + trainsOfType = trainsPerCertType.get(certType); if (trainsOfType != null && !trainsOfType.isEmpty()) { if (b.length() > 0) b.append(" "); - b.append(type.getName()).append("("); - if (type.hasInfiniteQuantity()) { + b.append(certType.getName()).append("("); + if (certType.hasInfiniteQuantity()) { b.append("+"); } else { b.append(trainsOfType.size()); @@ -506,14 +520,14 @@ * Make a full list of trains, like "2 2 3 3", to show in any field * describing train possessions, except the IPO. */ - public String makeFullListOfTrains() { + public String makeListOfTrains() { if (trains == null || trains.isEmpty()) return ""; List<TrainI> trainsOfType; - StringBuffer b = new StringBuffer(); + StringBuilder b = new StringBuilder(); - for (TrainTypeI type : GameManager.getInstance().getTrainManager().getTrainTypes()) { + for (TrainType type : gameManager.getTrainManager().getTrainTypes()) { trainsOfType = trainsPerType.get(type); if (trainsOfType != null && !trainsOfType.isEmpty()) { for (TrainI train : trainsOfType) { @@ -603,7 +617,7 @@ addPrivate((PrivateCompanyI) object, position == null ? -1 : position[0]); return true; } else if (object instanceof TrainI) { - if (position == null) position = new int[] {-1, -1}; + if (position == null) position = new int[] {-1, -1, -1}; addTrain((TrainI) object, position); return true; } else if (object instanceof SpecialPropertyI) { @@ -654,7 +668,8 @@ TrainI train = (TrainI) object; return new int[] { trains.indexOf(train), - trainsPerType.get(train.getType()).indexOf(train) + train.getPreviousType() != null ? trainsPerType.get(train.getPreviousType()).indexOf(train) : -1, + trainsPerCertType.get(train.getCertType()).indexOf(train) }; } else if (object instanceof SpecialPropertyI) { return new int[] {specialProperties.indexOf(object)}; Modified: trunk/18xx/rails/game/PublicCompany.java =================================================================== --- trunk/18xx/rails/game/PublicCompany.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/game/PublicCompany.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -973,7 +973,7 @@ if (initialTrainType != null) { TrainManager trainManager = gameManager.getTrainManager(); - TrainTypeI type = trainManager.getTypeByName(initialTrainType); + TrainCertificateType type = trainManager.getCertTypeByName(initialTrainType); TrainI train = bank.getIpo().getTrainOfType(type); buyTrain(train, initialTrainCost); train.setTradeable(initialTrainTradeable); Modified: trunk/18xx/rails/game/Train.java =================================================================== --- trunk/18xx/rails/game/Train.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/game/Train.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -6,10 +6,16 @@ import rails.game.move.MoveableHolder; import rails.game.move.ObjectMove; import rails.game.state.BooleanState; +import rails.game.state.GenericState; public class Train implements TrainI { - protected TrainTypeI type; + protected TrainCertificateType certificateType; + + protected GenericState<TrainType> type; + + /** Temporary variable, only used during moves. */ + protected TrainType previousType = null; /** Some specific trains cannot be traded between companies */ protected boolean tradeable = true; @@ -24,14 +30,36 @@ public Train() {} - public void init(TrainTypeI type, String uniqueId) { + public void init(TrainCertificateType certType, TrainType type, String uniqueId) { - this.type = type; + this.certificateType = certType; this.uniqueId = uniqueId; + this.type = new GenericState<TrainType>(certType.getName()+"_CurrentType", type); + this.previousType = type; obsolete = new BooleanState(uniqueId, false); } + + public void setType (TrainType type) { + previousType = this.type.get(); + this.type.set(type); + } + /** + * @return Returns the type. + */ + public TrainCertificateType getCertType() { + return certificateType; + } + + public TrainType getType() { + return isAssigned() ? type.get() : null; + } + + public TrainType getPreviousType() { + return previousType; + } + public String getUniqueId() { return uniqueId; } @@ -40,53 +68,54 @@ * @return Returns the cityScoreFactor. */ public int getCityScoreFactor() { - return type.getCityScoreFactor(); + return getType().getCityScoreFactor(); } /** * @return Returns the cost. */ public int getCost() { - return type.getCost(); + return getType().getCost(); } /** * @return Returns the majorStops. */ public int getMajorStops() { - return type.getMajorStops(); + return getType().getMajorStops(); } /** * @return Returns the minorStops. */ public int getMinorStops() { - return type.getMinorStops(); + return getType().getMinorStops(); } /** * @return Returns the townCountIndicator. */ public int getTownCountIndicator() { - return type.getTownCountIndicator(); + return getType().getTownCountIndicator(); } /** * @return Returns the townScoreFactor. */ public int getTownScoreFactor() { - return type.getTownScoreFactor(); + return getType().getTownScoreFactor(); } - /** - * @return Returns the type. - */ - public TrainTypeI getType() { - return type; + public boolean isAssigned() { + return type.get() != null; } - + + public boolean isPermanent() { + return certificateType.isPermanent(); + } + public String getName() { - return type.getName(); + return isAssigned() ? type.get().getName() : certificateType.getName(); } public Portfolio getHolder() { @@ -123,7 +152,7 @@ } public boolean canBeExchanged() { - return type.nextCanBeExchanged(); + return certificateType.nextCanBeExchanged(); } public String toDisplay() { @@ -138,4 +167,11 @@ this.tradeable = tradeable; } + public String toString() { + StringBuilder b = new StringBuilder(uniqueId); + b.append(" certType=").append(getCertType()); + b.append(" type=").append(getType()); + b.append(" holder=").append(holder.getName()); + return b.toString(); + } } Added: trunk/18xx/rails/game/TrainCertificateType.java =================================================================== --- trunk/18xx/rails/game/TrainCertificateType.java (rev 0) +++ trunk/18xx/rails/game/TrainCertificateType.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -0,0 +1,316 @@ +package rails.game; + +import java.util.*; + +import org.apache.log4j.Logger; + +import rails.game.state.BooleanState; +import rails.game.state.IntegerState; +import rails.util.*; + +public class TrainCertificateType { + + protected String name; + protected int quantity = 0; + protected boolean infiniteQuantity = false; + + protected String startedPhaseName = null; + // Phase startedPhase; + + protected List<TrainType> potentialTrainTypes = new ArrayList<TrainType>(2); + + protected Map<Integer, String> rustedTrainTypeNames = null; + protected Map<Integer, TrainCertificateType> rustedTrainType = null; + + protected boolean permanent = true; + protected boolean obsoleting = false; + + protected String releasedTrainTypeNames = null; + protected List<TrainCertificateType> releasedTrainTypes = null; + + protected boolean canBeExchanged = false; + protected int cost; + protected int exchangeCost; + + protected String trainClassName = "rails.game.Train"; + protected Class<? extends Train> trainClass; + + + protected int lastIndex = 0; + + // State variables + protected IntegerState numberBoughtFromIPO; + protected BooleanState available; + protected BooleanState rusted; + + // References + protected TrainManager trainManager; + + /** In some cases, trains start their life in the Pool */ + protected String initialPortfolio = "IPO"; + + protected static Logger log = + Logger.getLogger(TrainCertificateType.class.getPackage().getName()); + + public TrainCertificateType () { + } + + public void configureFromXML(Tag tag) throws ConfigurationException { + + trainClassName = tag.getAttributeAsString("class", trainClassName); + try { + trainClass = Class.forName(trainClassName).asSubclass(Train.class); + } catch (ClassNotFoundException e) { + throw new ConfigurationException("Class " + trainClassName + + "not found", e); + } + + // Name + name = tag.getAttributeAsString("name"); + + // Quantity + quantity = tag.getAttributeAsInteger("quantity", quantity); + quantity += tag.getAttributeAsInteger("quantityIncrement", 0); + + // Phase started + startedPhaseName = tag.getAttributeAsString("startPhase", ""); + + // Train type rusted + String rustedTrainTypeName1 = tag.getAttributeAsString("rustedTrain"); + if (Util.hasValue(rustedTrainTypeName1)) { + rustedTrainTypeNames = new HashMap<Integer, String>(); + rustedTrainTypeNames.put(1, rustedTrainTypeName1); + } + + // Other train type released for buying + releasedTrainTypeNames = tag.getAttributeAsString("releasedTrain"); + + // From where is this type initially available + initialPortfolio = + tag.getAttributeAsString("initialPortfolio", + initialPortfolio); + + // Configure any actions on other than the first train of a type + List<Tag> subs = tag.getChildren("Sub"); + if (subs != null) { + for (Tag sub : tag.getChildren("Sub")) { + int index = sub.getAttributeAsInteger("index"); + rustedTrainTypeName1 = sub.getAttributeAsString("rustedTrain"); + if (rustedTrainTypeNames == null) { + rustedTrainTypeNames = new HashMap<Integer, String>(); + } + rustedTrainTypeNames.put(index, rustedTrainTypeName1); + } + } + + // Exchangeable + Tag swapTag = tag.getChild("Exchange"); + if (swapTag != null) { + exchangeCost = swapTag.getAttributeAsInteger("cost", 0); + canBeExchanged = (exchangeCost > 0); + } + + // Can run as obsolete train + obsoleting = tag.getAttributeAsBoolean("obsoleting"); + + // Final initialisations + numberBoughtFromIPO = new IntegerState(name + "-trains_Bought", 0); + available = new BooleanState(name + "-trains_Available", false); + rusted = new BooleanState(name + "-trains_Rusted", false); + + } + + public void finishConfiguration (GameManagerI gameManager) + throws ConfigurationException { + + trainManager = gameManager.getTrainManager(); + + if (name == null) { + throw new ConfigurationException("No name specified for TrainType"); + } + + if (quantity == -1) { + infiniteQuantity = true; + } else if (quantity <= 0) { + throw new ConfigurationException("Invalid quantity "+quantity+" for train cert type "+name); + } + } + + public TrainI createTrain () throws ConfigurationException { + + TrainI train; + try { + train = trainClass.newInstance(); + } catch (InstantiationException e) { + throw new ConfigurationException( + "Cannot instantiate class " + trainClassName, e); + } catch (IllegalAccessException e) { + throw new ConfigurationException("Cannot access class " + + trainClassName + + "constructor", e); + } + return train; + } + + public List<TrainType> getPotentialTrainTypes() { + return potentialTrainTypes; + } + + protected void addPotentialTrainType (TrainType type) { + potentialTrainTypes.add(type); + } + + /** + * @return Returns the available. + */ + public boolean isAvailable() { + return available.booleanValue(); + } + + /** + * Make a train type available for buying by public companies. + */ + public void setAvailable() { + available.set(true); + } + + public void setRusted() { + rusted.set(true); + } + + public boolean hasRusted() { + return rusted.booleanValue(); + } + + /** + * @return Returns the name. + */ + public String getName() { + return name; + } + + /** + * @return Returns the releasedTrainTypeName. + */ + public String getReleasedTrainTypeNames() { + return releasedTrainTypeNames; + } + + /** + * @return Returns the rustedTrainTypeName. + */ + public Map<Integer,String> getRustedTrainTypeNames() { + return rustedTrainTypeNames; + } + + /** + * @param releasedTrainType The releasedTrainType to set. + */ + public void setReleasedTrainTypes(List<TrainCertificateType> releasedTrainTypes) { + this.releasedTrainTypes = releasedTrainTypes; + } + + /** + * @param rustedTrainType The rustedTrainType to set. + */ + public void setRustedTrainType(int index, TrainCertificateType rustedTrainType) { + if (this.rustedTrainType == null) { + this.rustedTrainType = new HashMap<Integer, TrainCertificateType>(); + } + this.rustedTrainType.put(index, rustedTrainType); + } + + public boolean isPermanent() { + return permanent; + } + + public boolean isObsoleting() { + return obsoleting; + } + + public void setPermanent(boolean permanent) { + this.permanent = permanent; + } + + /** + * @return Returns the releasedTrainTypes. + */ + public List<TrainCertificateType> getReleasedTrainTypes() { + return releasedTrainTypes; + } + + /** + * @return Returns the rustedTrainType. + */ + public TrainCertificateType getRustedTrainType(int index) { + if (rustedTrainType == null) return null; + return rustedTrainType.get(index); + } + + /** + * @return Returns the startedPhaseName. + */ + public String getStartedPhaseName() { + return startedPhaseName; + } + + public int getQuantity() { + return quantity; + } + + public boolean hasInfiniteQuantity() { + return infiniteQuantity; + } + + public boolean nextCanBeExchanged() { + return canBeExchanged; + } + + public void addToBoughtFromIPO() { + numberBoughtFromIPO.add(1); + } + + public int getNumberBoughtFromIPO() { + return numberBoughtFromIPO.intValue(); + } + + public int getCost() { + return cost; + } + + public int getExchangeCost() { + return exchangeCost; + } + + public String getInitialPortfolio() { + return initialPortfolio; + } + + public String getInfo() { + StringBuilder b = new StringBuilder ("<html>"); + b.append(LocalText.getText("TrainInfo", name, Bank.format(cost), quantity)); + if (Util.hasValue(startedPhaseName)) { + appendInfoText(b, LocalText.getText("StartsPhase", startedPhaseName)); + } + if (rustedTrainTypeNames != null) { + appendInfoText(b, LocalText.getText("RustsTrains", rustedTrainTypeNames.get(1))); + // Ignore any 'Sub' cases for now + } + if (releasedTrainTypeNames != null) { + appendInfoText(b, LocalText.getText("ReleasesTrains", releasedTrainTypeNames)); + } + if (b.length() == 6) b.append(LocalText.getText("None")); + + return b.toString(); + } + + private void appendInfoText (StringBuilder b, String text) { + if (text == null || text.length() == 0) return; + if (b.length() > 6) b.append("<br>"); + b.append(text); + } + + public String toString() { + return name; + } +} Property changes on: trunk/18xx/rails/game/TrainCertificateType.java ___________________________________________________________________ Added: svn:mime-type + text/plain Modified: trunk/18xx/rails/game/TrainI.java =================================================================== --- trunk/18xx/rails/game/TrainI.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/game/TrainI.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -5,7 +5,7 @@ public interface TrainI extends Moveable { - public void init(TrainTypeI type, String uniqueId); + public void init(TrainCertificateType certType, TrainType type, String uniqueId); /** * @return Returns the cost. @@ -38,10 +38,13 @@ */ public int getTownScoreFactor(); + public void setType (TrainType type); /** * @return Returns the train type. */ - public TrainTypeI getType(); + public TrainType getType(); + public TrainCertificateType getCertType(); + public TrainType getPreviousType(); public String getName(); @@ -52,6 +55,7 @@ public CashHolder getOwner(); public boolean isObsolete(); + public boolean isPermanent(); public void setHolder(Portfolio newHolder); Modified: trunk/18xx/rails/game/TrainManager.java =================================================================== --- trunk/18xx/rails/game/TrainManager.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/game/TrainManager.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -5,6 +5,7 @@ import org.apache.log4j.Logger; +import rails.game.move.ObjectMove; import rails.game.state.BooleanState; import rails.game.state.IntegerState; import rails.util.LocalText; @@ -12,25 +13,32 @@ public class TrainManager implements ConfigurableComponentI { // Static attributes - protected List<TrainTypeI> lTrainTypes = new ArrayList<TrainTypeI>(); + protected List<TrainType> lTrainTypes = new ArrayList<TrainType>(); - protected Map<String, TrainTypeI> mTrainTypes = - new HashMap<String, TrainTypeI>(); + protected Map<String, TrainType> mTrainTypes + = new HashMap<String, TrainType>(); - protected Map<String, TrainI> trainMap = - new HashMap<String, TrainI>(); + 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<TrainTypeI, List<TrainI>> trainsPerType = new HashMap<TrainTypeI, List<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 Portfolio unavailable = null; - protected IntegerState newTypeIndex; - protected Map<TrainTypeI, Integer> lastIndexPerType = new HashMap<TrainTypeI, Integer>(); + protected Map<String, Integer> lastIndexPerType = new HashMap<String, Integer>(); protected boolean trainsHaveRusted = false; protected boolean phaseHasChanged = false; @@ -46,7 +54,7 @@ protected BooleanState anyTrainBought = new BooleanState ("AnyTrainBought", false); // Non-game attributes - protected Portfolio ipo = null; + protected Portfolio ipo, pool, unavailable; // For initialisation only boolean trainPriceAtFaceValueIfDifferentPresidents = false; @@ -66,31 +74,43 @@ * @see rails.game.ConfigurableComponentI#configureFromXML(org.w3c.dom.Element) */ public void configureFromXML(Tag tag) throws ConfigurationException { - TrainType defaultType = null; + TrainType newType; Tag defaultsTag = tag.getChild("Defaults"); - if (defaultsTag != null) { - defaultType = new TrainType(false); - defaultType.configureFromXML(defaultsTag); - } + // We will use this tag later, to preconfigure TrainCertType and TrainType. - List<Tag> typeTags = tag.getChildren("Train"); + List<Tag> typeTags; - for (Tag typeTag : typeTags) { - if (defaultType != null) { - newType = (TrainType) defaultType.clone(); - if (newType == null) { - throw new ConfigurationException("Cannot clone traintype " - + defaultType.getName()); + // Choice train types (new style) + List<Tag> trainTypeTags = tag.getChildren("TrainType"); + + if (trainTypeTags != null) { + for (Tag trainTypeTag : trainTypeTags) { + TrainCertificateType certType = new TrainCertificateType(); + if (defaultsTag != null) certType.configureFromXML(defaultsTag); + certType.configureFromXML(trainTypeTag); + trainCertTypes.add(certType); + trainCertTypeMap.put(certType.getName(), certType); + + // The potential train types + typeTags = trainTypeTag.getChildren("Train"); + if (typeTags == null) { + // That's OK, all properties are in TrainType, to let's reuse that tag + typeTags = Arrays.asList(trainTypeTag); } - } else { - newType = new TrainType(true); + for (Tag typeTag : typeTags) { + newType = new TrainType(); + if (defaultsTag != null) newType.configureFromXML(defaultsTag); + newType.configureFromXML(trainTypeTag); + newType.configureFromXML(typeTag); + lTrainTypes.add(newType); + mTrainTypes.put(newType.getName(), newType); + certType.addPotentialTrainType(newType); + } } - lTrainTypes.add(newType); - newType.configureFromXML(typeTag); - mTrainTypes.put(newType.getName(), newType); } + // Special train buying rules Tag rulesTag = tag.getChild("TrainBuyingRules"); @@ -99,54 +119,63 @@ trainPriceAtFaceValueIfDifferentPresidents = rulesTag.getChild("FaceValueIfDifferentPresidents") != null; } + // Are trains sold to foreigners? + Tag removeTrainTag = tag.getChild("RemoveTrainBeforeSR"); + if (removeTrainTag != null) { + // Trains "bought by foreigners" (1844, 1824) + removeTrain = true; // completed in finishConfiguration() + } + + } + + public void finishConfiguration (GameManagerI gameManager) + throws ConfigurationException { + this.gameManager = gameManager; + bank = gameManager.getBank(); + ipo = bank.getIpo(); + pool = bank.getPool(); + unavailable = bank.getUnavailable(); + // Finish initialisation of the train types Map<Integer, String> rustedTrainTypeNames; - TrainTypeI rustedType; - for (TrainTypeI type : lTrainTypes) { + TrainCertificateType rustedType; + for (TrainCertificateType type : trainCertTypes) { if (type.getReleasedTrainTypeNames() != null) { - List<TrainTypeI> rtts = new ArrayList<TrainTypeI>(2); + List<TrainCertificateType> rtts = new ArrayList<TrainCertificateType>(2); for (String ttName : type.getReleasedTrainTypeNames().split(",")) { - rtts.add (mTrainTypes.get(ttName)); + rtts.add (trainCertTypeMap.get(ttName)); } type.setReleasedTrainTypes(rtts); } rustedTrainTypeNames = type.getRustedTrainTypeNames(); if (rustedTrainTypeNames != null) { for (int index : rustedTrainTypeNames.keySet()) { - rustedType = mTrainTypes.get(rustedTrainTypeNames.get(index)); + rustedType = trainCertTypeMap.get(rustedTrainTypeNames.get(index)); type.setRustedTrainType(index, rustedType); rustedType.setPermanent(false); } } } - // Are trains sold to foreigners? - Tag removeTrainTag = tag.getChild("RemoveTrainBeforeSR"); - if (removeTrainTag != null) { - // Trains "bought by foreigners" (1844, 1824) - removeTrain = true; // completed in finishConfiguration() - } - - } - - public void finishConfiguration (GameManagerI gameManager) - throws ConfigurationException { - this.gameManager = gameManager; - bank = gameManager.getBank(); - ipo = bank.getIpo(); - unavailable = bank.getUnavailable(); - - for (TrainTypeI type : lTrainTypes) { - type.finishConfiguration(gameManager); + for (TrainCertificateType certType : trainCertTypes) { + certType.finishConfiguration(gameManager); + List<TrainType> types = certType.getPotentialTrainTypes(); + for (TrainType type : types) { + type.finishConfiguration(gameManager, certType); + } + // Now create the trains of this type TrainI train; - /* If the amount is infinite, only one trains is created. + // Multi-train certificates cannot yet be assigned a type + TrainType initialType = types.size() == 1 ? types.get(0) : null; + + /* If the amount is infinite, only one train is created. * Each time this train is bought, another one is created. */ - for (int i = 0; i < (type.hasInfiniteQuantity() ? 1 : type.getQuantity()); i++) { - train = type.createTrain (); - train.init(type, getNewUniqueId(type)); + for (int i = 0; i < (certType.hasInfiniteQuantity() ? 1 : certType.getQuantity()); i++) { + train = certType.createTrain (); + train.init(certType, initialType, getNewUniqueId(certType.getName())); addTrain(train); unavailable.addTrain(train); } @@ -155,7 +184,7 @@ // By default, set the first train type to "available". newTypeIndex.set(0); - lTrainTypes.get(newTypeIndex.intValue()).setAvailable(bank); + makeTrainAvailable(trainCertTypes.get(newTypeIndex.intValue())); // Trains "bought by foreigners" (1844, 1824) if (removeTrain) { @@ -172,14 +201,16 @@ * i.e. in cloning infinitely available trains. */ - public TrainI cloneTrain (TrainTypeI type) { + public TrainI cloneTrain (TrainCertificateType certType) { TrainI train = null; + List<TrainType> types = certType.getPotentialTrainTypes(); + TrainType initialType = types.size() == 1 ? types.get(0) : null; try { - train = type.createTrain(); + train = certType.createTrain(); } catch (ConfigurationException e) { log.warn("Unexpected exception", e); } - train.init(type, getNewUniqueId(type)); + train.init(certType, initialType, getNewUniqueId(certType.getName())); addTrain(train); return train; } @@ -187,27 +218,23 @@ public void addTrain (TrainI train) { trainMap.put(train.getUniqueId(), train); - TrainTypeI type = train.getType(); - if (!trainsPerType.containsKey(type)) { - trainsPerType.put (type, new ArrayList<TrainI>()); + TrainCertificateType type = train.getCertType(); + if (!trainsPerCertType.containsKey(type)) { + trainsPerCertType.put (type, new ArrayList<TrainI>()); } - trainsPerType.get(type).add(train); + trainsPerCertType.get(type).add(train); } public TrainI getTrainByUniqueId(String id) { return trainMap.get(id); } - public String getNewUniqueId (TrainTypeI type) { - int newIndex = lastIndexPerType.containsKey(type) ? lastIndexPerType.get(type) + 1 : 0; - lastIndexPerType.put (type, newIndex); - return type.getName() + "_"+ newIndex; + public String getNewUniqueId (String typeName) { + int newIndex = lastIndexPerType.containsKey(typeName) ? lastIndexPerType.get(typeName) + 1 : 0; + lastIndexPerType.put (typeName, newIndex); + return typeName + "_"+ newIndex; } - public List<TrainI> getTrainsOfType (TrainTypeI type) { - return trainsPerType.get(type); - } - /** * This method handles any consequences of new train buying (from the IPO), * such as rusting and phase changes. It must be called <b>after</b> the @@ -220,17 +247,17 @@ phaseHasChanged = false; if (from != ipo) return; - TrainTypeI boughtType, nextType; - boughtType = train.getType(); - if (boughtType == (lTrainTypes.get(newTypeIndex.intValue())) + TrainCertificateType boughtType, nextType; + boughtType = train.getCertType(); + if (boughtType == (trainCertTypes.get(newTypeIndex.intValue())) && ipo.getTrainOfType(boughtType) == null) { // Last train bought, make a new type available. newTypeIndex.add(1); if (newTypeIndex.intValue() < lTrainTypes.size()) { - nextType = (lTrainTypes.get(newTypeIndex.intValue())); + nextType = (trainCertTypes.get(newTypeIndex.intValue())); if (nextType != null) { if (!nextType.isAvailable()) { - nextType.setAvailable(bank); + makeTrainAvailable(nextType); trainAvailabilityChanged = true; ReportBuffer.add("All " + boughtType.getName() + "-trains are sold out, " @@ -252,11 +279,11 @@ phaseHasChanged = true; } - List<TrainTypeI> releasedTypes = boughtType.getReleasedTrainTypes(); + List<TrainCertificateType> releasedTypes = boughtType.getReleasedTrainTypes(); if (releasedTypes != null) { - for (TrainTypeI releasedType : releasedTypes) { + for (TrainCertificateType releasedType : releasedTypes) { if (!releasedType.isAvailable()) { - releasedType.setAvailable(bank); + makeTrainAvailable(releasedType); ReportBuffer.add(LocalText.getText("TrainsAvailable", releasedType.getName())); } @@ -265,10 +292,9 @@ } } - TrainTypeI rustedType = boughtType.getRustedTrainType(trainIndex); + TrainCertificateType rustedType = boughtType.getRustedTrainType(trainIndex); if (rustedType != null && !rustedType.hasRusted()) { - rustedType.setRusted(train.getHolder()); // Or obsolete, - // where applicable + rustTrainType (rustedType, train.getHolder()); if (rustedType.isObsoleting()) { ReportBuffer.add(LocalText.getText("TrainsObsolete", rustedType.getName())); @@ -280,14 +306,46 @@ trainAvailabilityChanged = true; } -} + } + + protected void makeTrainAvailable (TrainCertificateType type) { + type.setAvailable(); + + Portfolio to = + (type.getInitialPortfolio().equalsIgnoreCase("Pool") ? bank.getPool() + : bank.getIpo()); + + for (TrainI train : trainsPerCertType.get(type)) { + new ObjectMove(train, unavailable, to); + } + } + + protected void rustTrainType (TrainCertificateType type, Portfolio lastBuyingCompany) { + type.setRusted(); + for (TrainI train : trainsPerCertType.get(type)) { + Portfolio holder = train.getHolder(); + if (type.isObsoleting() && holder.getOwner() instanceof PublicCompanyI + && holder != lastBuyingCompany) { + log.debug("Train " + train.getUniqueId() + " (owned by " + + holder.getName() + ") obsoleted"); + train.setObsolete(); + holder.getTrainsModel().update(); + } else { + log.debug("Train " + train.getUniqueId() + " (owned by " + + holder.getName() + ") rusted"); + train.setRusted(); + } + } + + } + public List<TrainI> getAvailableNewTrains() { List<TrainI> availableTrains = new ArrayList<TrainI>(); TrainI train; - for (TrainTypeI type : lTrainTypes) { + for (TrainCertificateType type : trainCertTypes) { if (type.isAvailable()) { train = ipo.getTrainOfType(type); if (train != null) { @@ -299,25 +357,40 @@ } public String getTrainCostOverview() { - StringBuffer b = new StringBuffer(); - for (TrainTypeI type : lTrainTypes) { - if (b.length() > 1) b.append(" "); - b.append(type.getName()).append(":").append(Bank.format(type.getCost())); - if (type.getExchangeCost() > 0) { - b.append("(").append(Bank.format(type.getExchangeCost())).append(")"); + StringBuilder b = new StringBuilder(); + for (TrainCertificateType certType : trainCertTypes) { + if (certType.getCost() > 0) { + if (b.length() > 1) b.append(" "); + b.append(certType.getName()).append(":").append(Bank.format(certType.getCost())); + if (certType.getExchangeCost() > 0) { + b.append("(").append(Bank.format(certType.getExchangeCost())).append(")"); + } + } else { + for (TrainType type : certType.getPotentialTrainTypes()) { + if (b.length() > 1) b.append(" "); + b.append(type.getName()).append(":").append(Bank.format(type.getCost())); + } } } return b.toString(); } - public TrainTypeI getTypeByName(String name) { + public TrainType getTypeByName(String name) { return mTrainTypes.get(name); } - public List<TrainTypeI> getTrainTypes() { + public List<TrainType> getTrainTypes() { return lTrainTypes; } + public List<TrainCertificateType> getTrainCertTypes() { + return trainCertTypes; + } + + public TrainCertificateType getCertTypeByName (String name) { + return trainCertTypeMap.get(name); + } + public boolean hasAvailabilityChanged() { return trainAvailabilityChanged; } Modified: trunk/18xx/rails/game/TrainType.java =================================================================== --- trunk/18xx/rails/game/TrainType.java 2011-06-21 21:21:43 UTC (rev 1580) +++ trunk/18xx/rails/game/TrainType.java 2011-06-21 21:25:49 UTC (rev 1581) @@ -1,67 +1,38 @@ /* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/TrainType.java,v 1.32 2010/05/11 21:47:21 stefanfrey Exp $ */ package rails.game; -import java.util.*; - import org.apache.log4j.Logger; -import rails.game.move.ObjectMove; import rails.game.state.BooleanState; -import rails.game.state.IntegerState; import rails.util.*; -public class TrainType implements TrainTypeI { +public class TrainType implements Cloneable { public final static int TOWN_COUNT_MAJOR = 2; public final static int TOWN_COUNT_MINOR = 1; public final static int NO_TOWN_COUNT = 0; - protected String trainClassName = "rails.game.Train"; - protected Class<? extends Train> trainClass; - protected String name; - protected int quantity; - protected boolean infiniteQuantity = false; + protected TrainCertificateType certificateType; - private String reachBasis = "stops"; + protected String reachBasis = "stops"; protected boolean countHexes = false; - private String countTowns = "major"; + protected String countTowns = "major"; protected int townCountIndicator = TOWN_COUNT_MAJOR; - private String scoreTowns = "yes"; + protected String scoreTowns = "yes"; protected int townScoreFactor = 1; - private String scoreCities = "single"; + protected String scoreCities = "single"; protected int cityScoreFactor = 1; - protected boolean canBeExchanged = false; - protected IntegerState numberBoughtFromIPO; - - protected boolean obsoleting = false; - - protected boolean permanent = true; - - private boolean real; // Only to determine if top-level attributes must be - // read. - protected int cost; protected int majorStops; protected int minorStops; - protected int exchangeCost; - protected String startedPhaseName = null; - // Phase startedPhase; - - private Map<Integer, String> rustedTrainTypeNames = null; - protected Map<Integer, TrainTypeI> rustedTrainType = null; - - private String releasedTrainTypeNames = null; - protected List<TrainTypeI> releasedTrainTypes = null; - protected int lastIndex = 0; - protected BooleanState available; protected BooleanState rusted; protected TrainManager trainManager; @@ -76,96 +47,26 @@ * @param real False for the default type, else real. The default type does * not have top-level attributes. */ - public TrainType(boolean real) { - this.real = real; + public TrainType() { } /** * @see rails.game.ConfigurableComponentI#configureFromXML(org.w3c.dom.Element) */ public void configureFromXML(Tag tag) throws ConfigurationException { - trainClassName = tag.getAttributeAsString("class", trainClassName); - try { - trainClass = Class.forName(trainClassName).asSubclass(Train.class); - } catch (ClassNotFoundException e) { - throw new ConfigurationException("Class " + trainClassName - + "not found", e); - } - if (real) { - // Name - name = tag.getAttributeAsString("name"); - if (name == null) { - throw new ConfigurationException( - LocalText.getText("NoNameSpecified")); - } + // Name + name = tag.getAttributeAsString("name"); - // Cost - cost = tag.getAttributeAsInteger("cost"); - if (cost == 0) { - throw new ConfigurationException( - LocalText.getText("InvalidCost")); - } + // Cost + cost = tag.getAttributeAsInteger("cost"); - // Amount - quantity = tag.getAttributeAsInteger("quantity"); - if (quantity == -1) { - infiniteQuantity = true; - } else if (quantity <= 0) { - throw new ConfigurationException( - LocalText.getText("InvalidQuantity", String.valueOf(quantity))); - } else { - quantity += tag.getAttributeAsInteger("quantityIncrement", 0); - } + // Major stops + majorStops = tag.getAttributeAsInteger("majorStops"); - // Major stops - majorStops = tag.getAttributeAsInteger("majorStops"); - if (majorStops == 0) { - throw new ConfigurationException( - LocalText.getText("InvalidStops")); - } + // Minor stops + minorStops = tag.getAttributeAsInteger("minorStops"); - // Minor stops - minorStops = tag.getAttributeAsInteger("minorStops"); - - // Phase started - startedPhaseName = tag.getAttributeAsString("startPhase", ""); - - // Train type rusted - String rustedTrainTypeName1 = tag.getAttributeAsString("rustedTrain"); - if (Util.hasValue(rustedTrainTypeName1)) { - rustedTrainTypeNames = new HashMap<Integer, String>(); - rustedTrainTypeNames.put(1, rustedTrainTypeName1); - } - - // Other train type released for buying - releasedTrainTypeNames = tag.get... [truncated message content] |
From: <ev...@us...> - 2011-06-21 21:21:50
|
Revision: 1580 http://rails.svn.sourceforge.net/rails/?rev=1580&view=rev Author: evos Date: 2011-06-21 21:21:43 +0000 (Tue, 21 Jun 2011) Log Message: ----------- Train management refactoring II - data <Train> is now <TrainType> and represents train certificate types <Train> is used for the types of a dual train certificate Modified Paths: -------------- trunk/18xx/data/1825/Game.xml trunk/18xx/data/1830/Game.xml trunk/18xx/data/1835/Game.xml trunk/18xx/data/1851/Game.xml trunk/18xx/data/1856/Game.xml trunk/18xx/data/1870/Game.xml trunk/18xx/data/1880/Game.xml trunk/18xx/data/1889/Game.xml trunk/18xx/data/18AL/Game.xml trunk/18xx/data/18EU/Game.xml trunk/18xx/data/18GA/Game.xml trunk/18xx/data/18Scan/CompanyManager.xml trunk/18xx/data/18Scan/Game.xml trunk/18xx/data/18TN/Game.xml trunk/18xx/data/18VA/Game.xml Modified: trunk/18xx/data/1825/Game.xml =================================================================== --- trunk/18xx/data/1825/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/1825/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -70,14 +70,14 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="180" quantity="6"/> - <Train name="3" majorStops="3" cost="300" quantity="4" startPhase="2"/> - <Train name="4" majorStops="4" cost="430" quantity="3"/> - <Train name="5" majorStops="5" cost="550" quantity="4" + <TrainType name="2" majorStops="2" cost="180" quantity="6"/> + <TrainType name="3" majorStops="3" cost="300" quantity="4" startPhase="2"/> + <TrainType name="4" majorStops="4" cost="430" quantity="3"/> + <TrainType name="5" majorStops="5" cost="550" quantity="4" startPhase="3" rustedTrain="2" /> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> - <!-- Note: released and rusted trains are now specified per Train + <!-- Note: released and rusted trains are now specified per TrainType but could as well be moved here. To be sorted out when we do 18US. --> <!-- Each Phase's defaults are the previous one's values --> <Phase name="1" > Modified: trunk/18xx/data/1830/Game.xml =================================================================== --- trunk/18xx/data/1830/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/1830/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -130,7 +130,7 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="80" quantity="6"> + <TrainType name="2" majorStops="2" cost="80" quantity="6"> <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading"> <Attributes obsoleting="yes"/> </IfOption> @@ -139,16 +139,16 @@ <!-- NOTE: An alternative way to configure an extra train is: quantityIncrement="+1" (the '+' is optional) --> </IfOption> - </Train> - <Train name="3" majorStops="3" cost="180" quantity="5" startPhase="3"> + </TrainType> + <TrainType name="3" majorStops="3" cost="180" quantity="5" startPhase="3"> <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading"> <Attributes obsoleting="yes"/> </IfOption> <IfOption name="Variant" value="Wabash"> <Attributes quantity="6"/> </IfOption> - </Train> - <Train name="4" majorStops="4" cost="300" quantity="4" startPhase="4" + </TrainType> + <TrainType name="4" majorStops="4" cost="300" quantity="4" startPhase="4" rustedTrain="2"> <IfOption name="Variant" value="Coalfields,Reading"> <Attributes obsoleting="yes" quantity="5"/> @@ -159,13 +159,13 @@ <IfOption name="Variant" value="Wabash"> <Attributes quantity="5"/> </IfOption> - </Train> - <Train name="5" majorStops="5" cost="450" quantity="3" startPhase="5"> + </TrainType> + <TrainType name="5" majorStops="5" cost="450" quantity="3" startPhase="5"> <IfOption name="Variant" value="Wabash"> <Attributes quantity="4"/> </IfOption> - </Train> - <Train name="6" majorStops="6" cost="630" startPhase="6" + </TrainType> + <TrainType name="6" majorStops="6" cost="630" startPhase="6" rustedTrain="3" releasedTrain="D"> <IfOption name="WithOptional6Train" value="yes"> <Attributes quantity="3"/> @@ -182,15 +182,15 @@ <IfOption name="Variant" value="Simple,Wabash"> <Attributes quantity="3"/> </IfOption> - </Train> + </TrainType> <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading"> - <Train name="7" majorStops="7" cost="710" quantity="2"/> + <TrainType name="7" majorStops="7" cost="710" quantity="2"/> </IfOption> <IfOption name="Variant" value="Wabash"> - <Train name="7" majorStops="7" cost="830" quantity="-1"/> + <TrainType name="7" majorStops="7" cost="830" quantity="-1"/> </IfOption> <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading,Simple"> - <Train name="D" majorStops="99" startPhase="D" rustedTrain="4"> + <TrainType name="D" majorStops="99" startPhase="D" rustedTrain="4"> <IfOption name="Variant" value="Basegame,Pere Marquette,Simple"> <Attributes cost="1100"/> <Exchange cost="800"/> @@ -206,11 +206,11 @@ <Attributes quantity="6"/> </IfOption> <Exchange cost="800"/> - </Train> + </TrainType> </IfOption> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> - <!-- Note: released and rusted trains are now specified per Train + <!-- Note: released and rusted trains are now specified per TrainType but could as well be moved here. To be sorted out when we do 18US. --> <!-- Each Phase's defaults are the previous one's values --> <Phase name="2" > Modified: trunk/18xx/data/1835/Game.xml =================================================================== --- trunk/18xx/data/1835/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/1835/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -53,19 +53,19 @@ <Reach base="stops" countTowns="yes"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="80" quantity="9"/> - <Train name="2+2" majorStops="2" minorStops="2" cost="120" quantity="4"/> - <Train name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> - <Train name="3+3" majorStops="3" minorStops="3" cost="270" quantity="3"/> - <Train name="4" majorStops="4" cost="360" quantity="3" startPhase="4" + <TrainType name="2" majorStops="2" cost="80" quantity="9"/> + <TrainType name="2+2" majorStops="2" minorStops="2" cost="120" quantity="4"/> + <TrainType name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> + <TrainType name="3+3" majorStops="3" minorStops="3" cost="270" quantity="3"/> + <TrainType name="4" majorStops="4" cost="360" quantity="3" startPhase="4" rustedTrain="2"/> - <Train name="4+4" majorStops="4" minorStops="4" cost="440" quantity="1" + <TrainType name="4+4" majorStops="4" minorStops="4" cost="440" quantity="1" startPhase="4+4" rustedTrain="2+2"/> - <Train name="5" majorStops="5" cost="500" quantity="2" startPhase="5"/> - <Train name="5+5" majorStops="5" minorStops="5" cost="600" quantity="1"/> - <Train name="6" majorStops="6" cost="600" quantity="2" startPhase="6" + <TrainType name="5" majorStops="5" cost="500" quantity="2" startPhase="5"/> + <TrainType name="5+5" majorStops="5" minorStops="5" cost="600" quantity="1"/> + <TrainType name="6" majorStops="6" cost="600" quantity="2" startPhase="6" rustedTrain="3"/> - <Train name="6+6" majorStops="6" minorStops="6" cost="720" quantity="4" + <TrainType name="6+6" majorStops="6" minorStops="6" cost="720" quantity="4" rustedTrain="3+3"/> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> Modified: trunk/18xx/data/1851/Game.xml =================================================================== --- trunk/18xx/data/1851/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/1851/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -54,14 +54,14 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="100" quantity="5"/> - <Train name="3" majorStops="3" cost="200" quantity="4" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" quantity="3" startPhase="4" + <TrainType name="2" majorStops="2" cost="100" quantity="5"/> + <TrainType name="3" majorStops="3" cost="200" quantity="4" startPhase="3"/> + <TrainType name="4" majorStops="4" cost="300" quantity="3" startPhase="4" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="500" quantity="2" startPhase="5"/> - <Train name="6" majorStops="6" cost="600" quantity="2" startPhase="6" + <TrainType name="5" majorStops="5" cost="500" quantity="2" startPhase="5"/> + <TrainType name="6" majorStops="6" cost="600" quantity="2" startPhase="6" rustedTrain="3"/> - <Train name="8" majorStops="8" cost="800" startPhase="8" + <TrainType name="8" majorStops="8" cost="800" startPhase="8" rustedTrain="4"> <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> @@ -69,13 +69,13 @@ <IfOption name="UnlimitedTopTrains" value="no"> <Attributes quantity="4"/> </IfOption> - </Train> + </TrainType> <TrainBuyingRules> <FaceValueIfDifferentPresidents/> </TrainBuyingRules> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> - <!-- Note: released and rusted trains are now specified per Train + <!-- Note: released and rusted trains are now specified per TrainType but could as well be moved here. To be sorted out when we do 18US. --> <!-- Each Phase's defaults are the previous one's values --> <Phase name="2" > Modified: trunk/18xx/data/1856/Game.xml =================================================================== --- trunk/18xx/data/1856/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/1856/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -51,17 +51,17 @@ <Reach base="stops" countTowns="major"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" quantity="6"/> - <Train name="3" majorStops="3" cost="225" quantity="5" startPhase="2"/> - <Train name="4" majorStops="4" cost="350" quantity="4" startPhase="3" + <TrainType name="2" majorStops="2" cost="100" quantity="6"/> + <TrainType name="3" majorStops="3" cost="225" quantity="5" startPhase="2"/> + <TrainType name="4" majorStops="4" cost="350" quantity="4" startPhase="3" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="550" quantity="3" startPhase="4"/> - <Train name="6" majorStops="6" cost="700" quantity="2" startPhase="5" + <TrainType name="5" majorStops="5" cost="550" quantity="3" startPhase="4"/> + <TrainType name="6" majorStops="6" cost="700" quantity="2" startPhase="5" rustedTrain="3" releasedTrain="D"/> - <Train name="D" majorStops="99" cost="1100" quantity="-1" startPhase="6" + <TrainType name="D" majorStops="99" cost="1100" quantity="-1" startPhase="6" rustedTrain="4"> <Exchange cost="750"/> - </Train> + </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="1"> Modified: trunk/18xx/data/1870/Game.xml =================================================================== --- trunk/18xx/data/1870/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/1870/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -43,17 +43,17 @@ <Reach base="stops" countTowns="major"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="80" quantity="7"/> - <Train name="3" majorStops="3" cost="180" quantity="6" startPhase="2"/> - <Train name="4" majorStops="4" cost="300" quantity="5" startPhase="3" + <TrainType name="2" majorStops="2" cost="80" quantity="7"/> + <TrainType name="3" majorStops="3" cost="180" quantity="6" startPhase="2"/> + <TrainType name="4" majorStops="4" cost="300" quantity="5" startPhase="3" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="450" quantity="4" startPhase="4"/> - <Train name="6" majorStops="6" cost="630" quantity="3" startPhase="5" + <TrainType name="5" majorStops="5" cost="450" quantity="4" startPhase="4"/> + <TrainType name="6" majorStops="6" cost="630" quantity="3" startPhase="5" rustedTrain="3"/> - <Train name="8" majorStops="8" cost="800" quantity="3" startPhase="6" + <TrainType name="8" majorStops="8" cost="800" quantity="3" startPhase="6" rustedTrain="4"/> - <Train name="10" majorStops="10" cost="950" quantity="2" startPhase="7"/> - <Train name="12" majorStops="12" cost="1100" quantity="-1" startPhase="8" + <TrainType name="10" majorStops="10" cost="950" quantity="2" startPhase="7"/> + <TrainType name="12" majorStops="12" cost="1100" quantity="-1" startPhase="8" rustedTrain="5"/> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> Modified: trunk/18xx/data/1880/Game.xml =================================================================== --- trunk/18xx/data/1880/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/1880/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -14,7 +14,7 @@ <OperatingRound class="rails.game.specific._1880.OperatingRound_1880"/> </GameParameters> <EndOfGame/> - <!-- need to implement the 3 OR set limit after purchase of first 8 Train --> + <!-- need to implement the 3 OR set limit after purchase of first 8 TrainType --> </Component> <Component name="PlayerManager" class="rails.game.PlayerManager"> <Players number="3" cash="600" certLimit="20"/> @@ -38,21 +38,21 @@ <Reach base="stops" countTowns="major"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" quantity="10"/> - <Train name="2+2" majorStops="2" minorStops="2" cost="180" quantity="5"/> - <Train name="3" majorStops="3" cost="180" quantity="6" startPhase="2"/> - <Train name="3+3" majorStops="3" minorStops="3" cost="300" quantity="5" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" quantity="5" startPhase="4" rustedTrain="2"/> - <Train name="4+4" majorStops="4" minorStops="4" cost="450" quantity="5" startPhase="5" rustedTrain="2+2"/> - <Train name="6" majorStops="6" cost="600" quantity="5" startPhase="6" rustedTrain="3"/> - <Train name="6e" majorStops="-1" cost="700" quantity="5" startPhase="7" rustedTrain="3+3"/> + <TrainType name="2" majorStops="2" cost="100" quantity="10"/> + <TrainType name="2+2" majorStops="2" minorStops="2" cost="180" quantity="5"/> + <TrainType name="3" majorStops="3" cost="180" quantity="6" startPhase="2"/> + <TrainType name="3+3" majorStops="3" minorStops="3" cost="300" quantity="5" startPhase="3"/> + <TrainType name="4" majorStops="4" cost="300" quantity="5" startPhase="4" rustedTrain="2"/> + <TrainType name="4+4" majorStops="4" minorStops="4" cost="450" quantity="5" startPhase="5" rustedTrain="2+2"/> + <TrainType name="6" majorStops="6" cost="600" quantity="5" startPhase="6" rustedTrain="3"/> + <TrainType name="6e" majorStops="-1" cost="700" quantity="5" startPhase="7" rustedTrain="3+3"/> <!-- 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--> - <Train name="8" majorStops="8" cost="800" quantity="2" startPhase="8" rustedTrain="4"/> - <Train name="8e" majorStops="-1" cost="900" quantity="2" rustedTrain="4+4"/> + <TrainType name="8" majorStops="8" cost="800" quantity="2" startPhase="8" rustedTrain="4"/> + <TrainType name="8e" majorStops="-1" cost="900" quantity="2" rustedTrain="4+4"/> <!-- 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--> - <Train name="10" majorStops="10" cost="1000" quantity="-1"/> + <TrainType name="10" majorStops="10" cost="1000" quantity="-1"/> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="A1"> Modified: trunk/18xx/data/1889/Game.xml =================================================================== --- trunk/18xx/data/1889/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/1889/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -80,12 +80,12 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="80" quantity="6"/> - <Train name="3" majorStops="3" cost="180" quantity="5" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" quantity="4" startPhase="4" + <TrainType name="2" majorStops="2" cost="80" quantity="6"/> + <TrainType name="3" majorStops="3" cost="180" quantity="5" startPhase="3"/> + <TrainType name="4" majorStops="4" cost="300" quantity="4" startPhase="4" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="450" quantity="3" startPhase="5"/> - <Train name="6" majorStops="6" cost="630" startPhase="6" + <TrainType name="5" majorStops="5" cost="450" quantity="3" startPhase="5"/> + <TrainType name="6" majorStops="6" cost="630" startPhase="6" rustedTrain="3" releasedTrain="D"> <IfOption name="WithOptional6Train" value="yes"> <Attributes quantity="3"/> @@ -93,8 +93,8 @@ <IfOption name="WithOptional6Train" value="no"> <Attributes quantity="2"/> </IfOption> - </Train> - <Train name="D" majorStops="99" cost="1100" startPhase="D" + </TrainType> + <TrainType name="D" majorStops="99" cost="1100" startPhase="D" rustedTrain="4"> <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> @@ -103,10 +103,10 @@ <Attributes quantity="6"/> </IfOption> <Exchange cost="800"/> - </Train> + </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> - <!-- Note: released and rusted trains are now specified per Train + <!-- Note: released and rusted trains are now specified per TrainType but could as well be moved here. To be sorted out when we do 18US. --> <!-- Each Phase's defaults are the previous one's values --> <Phase name="2" > Modified: trunk/18xx/data/18AL/Game.xml =================================================================== --- trunk/18xx/data/18AL/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/18AL/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -49,9 +49,9 @@ <Reach base="stops" countTowns="no"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" quantity="5"/> - <Train name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" quantity="3" startPhase="4" + <TrainType name="2" majorStops="2" cost="100" quantity="5"/> + <TrainType name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> + <TrainType name="4" majorStops="4" cost="300" quantity="3" startPhase="4" rustedTrain="2" > <IfOption name="Obsolete4Trains" value="yes"> <Attributes obsoleting="yes"/> @@ -59,13 +59,13 @@ <IfOption name="Obsolete4Trains" value="no"> <Attributes obsoleting="no"/> </IfOption> - </Train>/> - <Train name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> - <Train name="6" majorStops="6" cost="630" quantity="1" startPhase="6" + </TrainType>/> + <TrainType name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> + <TrainType name="6" majorStops="6" cost="630" quantity="1" startPhase="6" rustedTrain="3"/> - <Train name="7" majorStops="7" cost="700" quantity="1" startPhase="7" + <TrainType name="7" majorStops="7" cost="700" quantity="1" startPhase="7" rustedTrain="4"/> - <Train name="4D" majorStops="4" cost="800" startPhase="4D"> + <TrainType name="4D" majorStops="4" cost="800" startPhase="4D"> <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> </IfOption> @@ -75,7 +75,7 @@ <Reach countTowns="no"/> <Score scoreCities="double"/> <Exchange cost="800"/> - </Train> + </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="2" > Modified: trunk/18xx/data/18EU/Game.xml =================================================================== --- trunk/18xx/data/18EU/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/18EU/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -54,8 +54,8 @@ <Reach base="stops" countTowns="no"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" quantity="15"/> - <Train name="3" majorStops="3" cost="200" startPhase="3" releasedTrain="P"> + <TrainType name="2" majorStops="2" cost="100" quantity="15"/> + <TrainType name="3" majorStops="3" cost="200" startPhase="3" releasedTrain="P"> <IfOption name="Extra3Trains" value="0"> <Attributes quantity="5"/> </IfOption> @@ -65,8 +65,8 @@ <IfOption name="Extra3Trains" value="2"> <Attributes quantity="7"/> </IfOption> - </Train> - <Train name="4" majorStops="4" cost="300" startPhase="4" + </TrainType> + <TrainType name="4" majorStops="4" cost="300" startPhase="4" rustedTrain="2"> <IfOption name="Extra4Trains" value="0"> <Attributes quantity="4"/> @@ -74,14 +74,14 @@ <IfOption name="Extra4Trains" value="1"> <Attributes quantity="5"/> </IfOption> - </Train> - <Train name="5" majorStops="5" cost="500" quantity="3" startPhase="5"/> - <Train name="6" majorStops="6" cost="600" quantity="2" startPhase="6" + </TrainType> + <TrainType name="5" majorStops="5" cost="500" quantity="3" startPhase="5"/> + <TrainType name="6" majorStops="6" cost="600" quantity="2" startPhase="6" rustedTrain="3"/> - <Train name="8" majorStops="8" cost="800" quantity="-1" startPhase="8" + <TrainType name="8" majorStops="8" cost="800" quantity="-1" startPhase="8" rustedTrain="4"/> <!-- majorStops="-1" indicates that this not a normally running train--> - <Train name="P" initialPortfolio="Pool" majorStops="-1" cost="100" quantity="5"/> + <TrainType name="P" initialPortfolio="Pool" majorStops="-1" cost="100" quantity="5"/> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="2" > Modified: trunk/18xx/data/18GA/Game.xml =================================================================== --- trunk/18xx/data/18GA/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/18GA/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -54,14 +54,14 @@ <Reach base="stops" countTowns="no"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" quantity="5"/> - <Train name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" quantity="3" startPhase="4" + <TrainType name="2" majorStops="2" cost="100" quantity="5"/> + <TrainType name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> + <TrainType name="4" majorStops="4" cost="300" quantity="3" startPhase="4" rustedTrain="2" /> - <Train name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> - <Train name="6" majorStops="6" cost="630" quantity="2" startPhase="6" + <TrainType name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> + <TrainType name="6" majorStops="6" cost="630" quantity="2" startPhase="6" rustedTrain="3"/> - <Train name="8" majorStops="8" cost="800" startPhase="8" + <TrainType name="8" majorStops="8" cost="800" startPhase="8" rustedTrain="4"> <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> @@ -69,7 +69,7 @@ <IfOption name="UnlimitedTopTrains" value="no"> <Attributes quantity="5"/> </IfOption> - </Train> + </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="2" > Modified: trunk/18xx/data/18Scan/CompanyManager.xml =================================================================== --- trunk/18xx/data/18Scan/CompanyManager.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/18Scan/CompanyManager.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -38,14 +38,14 @@ <Company name="ZRC" type="Private" basePrice="180" revenue="30" longname="Sjællandske Jernbaneselskab (Zeeland Railway Company)"></Company> - <Company name="1" type="Minor" tokens="2" longname="Västra Stambanan (Western Mainline)"> + <Company name="1" type="Minor" price="260" tokens="2" longname="Västra Stambanan (Western Mainline)"> <Home hex="G4" /> </Company> - <Company name="2" type="Minor" tokens="2" longname="Nordvästra Stambanan (Northwestern Mainline)"> - <Home hex="F11" /> + <Company name="2" type="Minor" price="220" tokens="2" longname="Nordvästra Stambanan (Northwestern Mainline)"> + <Home hex="F11" city="1"/> </Company> - <Company name="3" type="Minor" tokens="2" longname="Södra Stambanan (Southern Mainline)"> - <Home hex="F11" /> + <Company name="3" type="Minor" price="200" tokens="2" longname="Södra Stambanan (Southern Mainline)"> + <Home hex="F11" city="2"/> </Company> <Company name="DSB" type="Public" tokens="3" fgColour="FFFFFF" Modified: trunk/18xx/data/18Scan/Game.xml =================================================================== --- trunk/18xx/data/18Scan/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/18Scan/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -44,16 +44,26 @@ <Reach base="stops" countTowns="no"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" quantity="6"/> - <Train name="3" majorStops="3" cost="200" quantity="4" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" quantity="3" startPhase="4" - rustedTrain="2" /> - <Train name="5" majorStops="5" cost="500" quantity="2" startPhase="5" releasedTrain="5E"/> - <Train name="5E" majorStops="5" cost="600" quantity="2" startPhase="6" releasedTrain="4D" - rustedTrain="3"/> - <Train name="4D" majorStops="4" cost="800" quantity="6" startPhase="4D" - rustedTrain="4"> - </Train> + <TrainType name="2/1+1" quantity="6"> + <Train name="2" majorStops="2" cost="100"/> + <Train name="1+1" majorStops="1" minorStops="1" cost="80"/> + </TrainType> + <TrainType name="3/2+2" quantity="4" startPhase="3"> + <Train name="3" majorStops="3" cost="200"/> + <Train name="2+2" majorStops="2" minorStops="2" cost="180"/> + </TrainType> + <TrainType name="4/3+3" quantity="3" startPhase="4" rustedTrain="2/1+1"> + <Train name="4" majorStops="4" cost="300"/> + <Train name="3+3" majorStops="3" minorStops="3" cost="280"/> + </TrainType> + <TrainType name="5/4+4" quantity="2" startPhase="5" releasedTrain="5E"> + <Train name="5" majorStops="5" cost="500"/> + <Train name="4+4" majorStops="4" minorStops="4" cost="480"/> + </TrainType> + <TrainType name="5E" majorStops="5" cost="600" quantity="2" startPhase="6" releasedTrain="4D" + rustedTrain="3/2+2"/> + <TrainType name="4D" majorStops="4" cost="800" quantity="6" startPhase="4D" + rustedTrain="4/3+3"/> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="2" > Modified: trunk/18xx/data/18TN/Game.xml =================================================================== --- trunk/18xx/data/18TN/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/18TN/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -66,20 +66,20 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="80" quantity="5" obsoleting="yes"/> - <Train name="3" majorStops="3" cost="180" quantity="5" obsoleting="yes" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" quantity="3" obsoleting="yes" startPhase="4" + <TrainType name="2" majorStops="2" cost="80" quantity="5" obsoleting="yes"/> + <TrainType name="3" majorStops="3" cost="180" quantity="5" obsoleting="yes" startPhase="3"/> + <TrainType name="4" majorStops="4" cost="300" quantity="3" obsoleting="yes" startPhase="4" rustedTrain="2" /> - <Train name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> - <Train name="6" majorStops="6" cost="630" quantity="2" startPhase="6" + <TrainType name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> + <TrainType name="6" majorStops="6" cost="630" quantity="2" startPhase="6" rustedTrain="3"> <Sub index="2" rustedTrain="4"/> - </Train> - <Train name="8" majorStops="8" cost="700" quantity="7" startPhase="8" + </TrainType> + <TrainType name="8" majorStops="8" cost="700" quantity="7" startPhase="8" rustedTrain="4" /> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> - <!-- Note: released and rusted trains are now specified per Train + <!-- Note: released and rusted trains are now specified per TrainType but could as well be moved here. To be sorted out when we do 18US. --> <!-- Each Phase's defaults are the previous one's values --> <Phase name="2" > Modified: trunk/18xx/data/18VA/Game.xml =================================================================== --- trunk/18xx/data/18VA/Game.xml 2011-06-18 21:11:45 UTC (rev 1579) +++ trunk/18xx/data/18VA/Game.xml 2011-06-21 21:21:43 UTC (rev 1580) @@ -71,21 +71,21 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="100" quantity="6"/> - <Train name="3" majorStops="3" cost="200" quantity="5" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" quantity="4" startPhase="4" + <TrainType name="2" majorStops="2" cost="100" quantity="6"/> + <TrainType name="3" majorStops="3" cost="200" quantity="5" startPhase="3"/> + <TrainType name="4" majorStops="4" cost="300" quantity="4" startPhase="4" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="500" quantity="3" startPhase="5" + <TrainType name="5" majorStops="5" cost="500" quantity="3" startPhase="5" rustedTrain="3"/> - <Train name="6" majorStops="6" cost="600" startPhase="6" + <TrainType name="6" majorStops="6" cost="600" startPhase="6" releasedTrain="4D"> - </Train> - <Train name="4D" majorStops="99" cost="800" quantity="10" startPhase="4D" + </TrainType> + <TrainType name="4D" majorStops="99" cost="800" quantity="10" startPhase="4D" rustedTrain="4"> - </Train> + </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> - <!-- Note: released and rusted trains are now specified per Train + <!-- Note: released and rusted trains are now specified per TrainType but could as well be moved here. To be sorted out when we do 18US. --> <!-- Each Phase's defaults are the previous one's values --> <Phase name="2" > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-06-18 21:11:52
|
Revision: 1579 http://rails.svn.sourceforge.net/rails/?rev=1579&view=rev Author: evos Date: 2011-06-18 21:11:45 +0000 (Sat, 18 Jun 2011) Log Message: ----------- Train management refactoring I Modified Paths: -------------- trunk/18xx/rails/algorithms/RevenueAdapter.java trunk/18xx/rails/game/OperatingRound.java trunk/18xx/rails/game/Portfolio.java trunk/18xx/rails/game/Train.java trunk/18xx/rails/game/TrainI.java trunk/18xx/rails/game/TrainManager.java trunk/18xx/rails/game/TrainType.java trunk/18xx/rails/game/TrainTypeI.java trunk/18xx/rails/game/specific/_18AL/NameableTrain.java trunk/18xx/rails/util/ListAndFixSavedFiles.java Modified: trunk/18xx/rails/algorithms/RevenueAdapter.java =================================================================== --- trunk/18xx/rails/algorithms/RevenueAdapter.java 2011-06-16 10:58:29 UTC (rev 1578) +++ trunk/18xx/rails/algorithms/RevenueAdapter.java 2011-06-18 21:11:45 UTC (rev 1579) @@ -175,7 +175,7 @@ TrainTypeI trainType = gameManager.getTrainManager().getTypeByName(trainString.trim()); if (trainType != null) { // string defines available trainType log.info("RA: found trainType" + trainType); - TrainI railsTrain = trainType.cloneTrain(); + TrainI railsTrain = gameManager.getTrainManager().cloneTrain(trainType); return addTrain(railsTrain); } else { // otherwise interpret the train NetworkTrain train = NetworkTrain.createFromString(trainString); Modified: trunk/18xx/rails/game/OperatingRound.java =================================================================== --- trunk/18xx/rails/game/OperatingRound.java 2011-06-16 10:58:29 UTC (rev 1578) +++ trunk/18xx/rails/game/OperatingRound.java 2011-06-18 21:11:45 UTC (rev 1579) @@ -1840,8 +1840,8 @@ train.getType().addToBoughtFromIPO(); trainManager.setAnyTrainBought(true); // Clone the train if infinitely available - if (train.getType().hasInfiniteAmount()) { - ipo.addTrain(train.getType().cloneTrain()); + if (train.getType().hasInfiniteQuantity()) { + ipo.addTrain(trainManager.cloneTrain(train.getType())); } } @@ -1855,15 +1855,14 @@ } // Check if the phase has changed. - TrainManager tm = gameManager.getTrainManager(); - tm.checkTrainAvailability(train, oldHolder); + trainManager.checkTrainAvailability(train, oldHolder); // Check if any companies must discard trains if (getCurrentPhase() != previousPhase && checkForExcessTrains()) { stepObject.set(GameDef.OrStep.DISCARD_TRAINS); } - if (tm.hasPhaseChanged()) newPhaseChecks(); + if (trainManager.hasPhaseChanged()) newPhaseChecks(); return true; } @@ -2896,7 +2895,7 @@ if (getGameParameterAsBoolean(GameDef.Parm.REMOVE_TRAIN_BEFORE_SR) && trainManager.isAnyTrainBought()) { TrainI train = trainManager.getAvailableNewTrains().get(0); - if (train.getType().hasInfiniteAmount()) return; + if (train.getType().hasInfiniteQuantity()) return; new ObjectMove (train, ipo, scrapHeap); ReportBuffer.add(LocalText.getText("RemoveTrain", train.getName())); } Modified: trunk/18xx/rails/game/Portfolio.java =================================================================== --- trunk/18xx/rails/game/Portfolio.java 2011-06-16 10:58:29 UTC (rev 1578) +++ trunk/18xx/rails/game/Portfolio.java 2011-06-18 21:11:45 UTC (rev 1579) @@ -490,7 +490,7 @@ if (trainsOfType != null && !trainsOfType.isEmpty()) { if (b.length() > 0) b.append(" "); b.append(type.getName()).append("("); - if (type.hasInfiniteAmount()) { + if (type.hasInfiniteQuantity()) { b.append("+"); } else { b.append(trainsOfType.size()); Modified: trunk/18xx/rails/game/Train.java =================================================================== --- trunk/18xx/rails/game/Train.java 2011-06-16 10:58:29 UTC (rev 1578) +++ trunk/18xx/rails/game/Train.java 2011-06-18 21:11:45 UTC (rev 1579) @@ -11,13 +11,6 @@ protected TrainTypeI type; - protected int majorStops; - protected int minorStops; - protected int cost; - protected int cityScoreFactor; - protected int townScoreFactor; - protected int townCountIndicator; - /** Some specific trains cannot be traded between companies */ protected boolean tradeable = true; @@ -31,19 +24,11 @@ public Train() {} - public void init(TrainTypeI type, int index) { + public void init(TrainTypeI type, String uniqueId) { this.type = type; - this.majorStops = type.getMajorStops(); - this.minorStops = type.getMinorStops(); - this.cost = type.getCost(); - this.cityScoreFactor = type.getCityScoreFactor(); - this.townScoreFactor = type.getTownScoreFactor(); - this.townCountIndicator = type.getTownCountIndicator(); + this.uniqueId = uniqueId; - uniqueId = type.getName() + "_" + index; - type.getTrainManager().addTrain(uniqueId, this); - obsolete = new BooleanState(uniqueId, false); } @@ -55,42 +40,42 @@ * @return Returns the cityScoreFactor. */ public int getCityScoreFactor() { - return cityScoreFactor; + return type.getCityScoreFactor(); } /** * @return Returns the cost. */ public int getCost() { - return cost; + return type.getCost(); } /** * @return Returns the majorStops. */ public int getMajorStops() { - return majorStops; + return type.getMajorStops(); } /** * @return Returns the minorStops. */ public int getMinorStops() { - return minorStops; + return type.getMinorStops(); } /** * @return Returns the townCountIndicator. */ public int getTownCountIndicator() { - return townCountIndicator; + return type.getTownCountIndicator(); } /** * @return Returns the townScoreFactor. */ public int getTownScoreFactor() { - return townScoreFactor; + return type.getTownScoreFactor(); } /** Modified: trunk/18xx/rails/game/TrainI.java =================================================================== --- trunk/18xx/rails/game/TrainI.java 2011-06-16 10:58:29 UTC (rev 1578) +++ trunk/18xx/rails/game/TrainI.java 2011-06-18 21:11:45 UTC (rev 1579) @@ -5,7 +5,7 @@ public interface TrainI extends Moveable { - public void init(TrainTypeI type, int index); + public void init(TrainTypeI type, String uniqueId); /** * @return Returns the cost. Modified: trunk/18xx/rails/game/TrainManager.java =================================================================== --- trunk/18xx/rails/game/TrainManager.java 2011-06-16 10:58:29 UTC (rev 1578) +++ trunk/18xx/rails/game/TrainManager.java 2011-06-18 21:11:45 UTC (rev 1579) @@ -3,6 +3,8 @@ import java.util.*; +import org.apache.log4j.Logger; + import rails.game.state.BooleanState; import rails.game.state.IntegerState; import rails.util.LocalText; @@ -18,6 +20,8 @@ protected Map<String, TrainI> trainMap = new HashMap<String, TrainI>(); + protected Map<TrainTypeI, List<TrainI>> trainsPerType = new HashMap<TrainTypeI, List<TrainI>>(); + private boolean removeTrain = false; @@ -25,6 +29,8 @@ protected Portfolio unavailable = null; protected IntegerState newTypeIndex; + + protected Map<TrainTypeI, Integer> lastIndexPerType = new HashMap<TrainTypeI, Integer>(); protected boolean trainsHaveRusted = false; protected boolean phaseHasChanged = false; @@ -45,6 +51,9 @@ // For initialisation only boolean trainPriceAtFaceValueIfDifferentPresidents = false; + protected static Logger log = + Logger.getLogger(TrainManager.class.getPackage().getName()); + /** * No-args constructor. */ @@ -129,6 +138,19 @@ for (TrainTypeI type : lTrainTypes) { type.finishConfiguration(gameManager); + + // Now create the trains of this type + TrainI train; + /* If the amount is infinite, only one trains is created. + * Each time this train is bought, another one is created. + */ + for (int i = 0; i < (type.hasInfiniteQuantity() ? 1 : type.getQuantity()); i++) { + train = type.createTrain (); + train.init(type, getNewUniqueId(type)); + addTrain(train); + unavailable.addTrain(train); + } + } // By default, set the first train type to "available". @@ -145,14 +167,47 @@ trainPriceAtFaceValueIfDifferentPresidents); } - public void addTrain (String uniqueID, TrainI train) { - trainMap.put(uniqueID, train); + /** Create train without throwing exceptions. + * To be used <b>after</b> completing initialization, + * i.e. in cloning infinitely available trains. + */ + + public TrainI cloneTrain (TrainTypeI type) { + TrainI train = null; + try { + train = type.createTrain(); + } catch (ConfigurationException e) { + log.warn("Unexpected exception", e); + } + train.init(type, getNewUniqueId(type)); + addTrain(train); + return train; } + public void addTrain (TrainI train) { + trainMap.put(train.getUniqueId(), train); + + TrainTypeI type = train.getType(); + if (!trainsPerType.containsKey(type)) { + trainsPerType.put (type, new ArrayList<TrainI>()); + } + trainsPerType.get(type).add(train); + } + public TrainI getTrainByUniqueId(String id) { return trainMap.get(id); } + + public String getNewUniqueId (TrainTypeI type) { + int newIndex = lastIndexPerType.containsKey(type) ? lastIndexPerType.get(type) + 1 : 0; + lastIndexPerType.put (type, newIndex); + return type.getName() + "_"+ newIndex; + } + public List<TrainI> getTrainsOfType (TrainTypeI type) { + return trainsPerType.get(type); + } + /** * This method handles any consequences of new train buying (from the IPO), * such as rusting and phase changes. It must be called <b>after</b> the Modified: trunk/18xx/rails/game/TrainType.java =================================================================== --- trunk/18xx/rails/game/TrainType.java 2011-06-16 10:58:29 UTC (rev 1578) +++ trunk/18xx/rails/game/TrainType.java 2011-06-18 21:11:45 UTC (rev 1579) @@ -21,11 +21,8 @@ protected String name; protected int quantity; - protected boolean infiniteAmount = false; + protected boolean infiniteQuantity = false; - /** Index: used for sorting trains lists in configured order. */ - protected int index; - private String reachBasis = "stops"; protected boolean countHexes = false; @@ -62,8 +59,6 @@ private String releasedTrainTypeNames = null; protected List<TrainTypeI> releasedTrainTypes = null; - protected ArrayList<TrainI> trains = null; - protected int lastIndex = 0; protected BooleanState available; @@ -98,8 +93,6 @@ } if (real) { - trains = new ArrayList<TrainI>(); - // Name name = tag.getAttributeAsString("name"); if (name == null) { @@ -117,7 +110,7 @@ // Amount quantity = tag.getAttributeAsInteger("quantity"); if (quantity == -1) { - infiniteAmount = true; + infiniteQuantity = true; } else if (quantity <= 0) { throw new ConfigurationException( LocalText.getText("InvalidQuantity", String.valueOf(quantity))); @@ -210,27 +203,10 @@ townCountIndicator = countTowns.equals("no") ? NO_TOWN_COUNT : minorStops > 0 ? TOWN_COUNT_MINOR : TOWN_COUNT_MAJOR; - cityScoreFactor = scoreCities.equals("double") ? 2 : 1; - townScoreFactor = scoreTowns.equals("yes") ? 1 : 0; - // Actually we should meticulously check all values.... + cityScoreFactor = scoreCities.equals("double") ? 2 : 1; + townScoreFactor = scoreTowns.equals("yes") ? 1 : 0; + // Actually we should meticulously check all values.... - // log.debug("Train type "+name+": class "+trainClassName); - - // Now create the trains of this type - TrainI train; - if (infiniteAmount) { - /* - * We create one train, but will add one more each time a train - * of this type is bought. - */ - train = createTrain(); - trains.add(train); - } else { - for (int i = 0; i < quantity; i++) { - train = createTrain (); - trains.add(train); - } - } } // Final initialisations @@ -242,18 +218,10 @@ public void finishConfiguration (GameManagerI gameManager) { trainManager = gameManager.getTrainManager(); - index = trainManager.getTrainTypes().indexOf(this); + } - Portfolio unavailable = gameManager.getBank().getUnavailable(); + public TrainI createTrain () throws ConfigurationException { - for (TrainI train : trains) { - train.init(this, lastIndex++); - unavailable.addTrain(train); - } - } - - protected TrainI createTrain () throws ConfigurationException { - TrainI train; try { train = trainClass.newInstance(); @@ -268,20 +236,12 @@ return train; } - /** Create train without throwing exceptions. - * To be used <b>after</b> completing initialization, - * i.e. in cloning infinitely available trains. - */ + public int getQuantity() { + return quantity; + } - public TrainI cloneTrain () { - TrainI train = null; - try { - train = createTrain(); - } catch (ConfigurationException e) { - log.warn("Unexpected exception", e); - } - train.init(this, lastIndex++); - return train; + public boolean hasInfiniteQuantity() { + return infiniteQuantity; } /** @@ -444,18 +404,14 @@ (initialPortfolio.equalsIgnoreCase("Pool") ? bank.getPool() : bank.getIpo()); - for (TrainI train : trains) { + for (TrainI train : trainManager.getTrainsOfType(this)) { new ObjectMove(train, bank.getUnavailable(), to); } } - public boolean hasInfiniteAmount() { - return infiniteAmount; - } - public void setRusted(Portfolio lastBuyingCompany) { rusted.set(true); - for (TrainI train : trains) { + for (TrainI train : trainManager.getTrainsOfType(this)) { Portfolio holder = train.getHolder(); if (obsoleting && holder.getOwner() instanceof PublicCompanyI && holder != lastBuyingCompany) { @@ -490,10 +446,6 @@ return clone; } - public int getIndex() { - return index; - } - public TrainManager getTrainManager() { return trainManager; } Modified: trunk/18xx/rails/game/TrainTypeI.java =================================================================== --- trunk/18xx/rails/game/TrainTypeI.java 2011-06-16 10:58:29 UTC (rev 1578) +++ trunk/18xx/rails/game/TrainTypeI.java 2011-06-18 21:11:45 UTC (rev 1579) @@ -7,6 +7,11 @@ public interface TrainTypeI extends ConfigurableComponentI, Cloneable { + public TrainI createTrain () throws ConfigurationException; + + public int getQuantity(); + public boolean hasInfiniteQuantity(); + /** * @return Returns the cityScoreFactor. */ @@ -83,8 +88,6 @@ public boolean isObsoleting(); - public boolean hasInfiniteAmount(); - /** * @param available The available to set. */ @@ -106,10 +109,6 @@ public void setRustedTrainType(int index, TrainTypeI rustedTrainType); - public TrainI cloneTrain(); - - public int getIndex(); - public TrainManager getTrainManager(); public String getInfo(); Modified: trunk/18xx/rails/game/specific/_18AL/NameableTrain.java =================================================================== --- trunk/18xx/rails/game/specific/_18AL/NameableTrain.java 2011-06-16 10:58:29 UTC (rev 1578) +++ trunk/18xx/rails/game/specific/_18AL/NameableTrain.java 2011-06-18 21:11:45 UTC (rev 1579) @@ -12,9 +12,9 @@ private State nameToken; @Override - public void init(TrainTypeI type, int index) { + public void init(TrainTypeI type, String uniqueId) { - super.init(type, index); + super.init(type, uniqueId); nameToken = new State(uniqueId + "_nameToken", NamedTrainToken.class); } Modified: trunk/18xx/rails/util/ListAndFixSavedFiles.java =================================================================== --- trunk/18xx/rails/util/ListAndFixSavedFiles.java 2011-06-16 10:58:29 UTC (rev 1578) +++ trunk/18xx/rails/util/ListAndFixSavedFiles.java 2011-06-18 21:11:45 UTC (rev 1579) @@ -229,6 +229,9 @@ action = (PossibleAction) ois.readObject(); } catch (EOFException e) { break; + } catch (ClassCastException e) { + log.error ("Aborting on non-action object: "+ e.getMessage()); + break; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-06-16 10:58:37
|
Revision: 1578 http://rails.svn.sourceforge.net/rails/?rev=1578&view=rev Author: evos Date: 2011-06-16 10:58:29 +0000 (Thu, 16 Jun 2011) Log Message: ----------- Fixed definition of tile -939 for 1830 Coalfields Modified Paths: -------------- trunk/18xx/data/1830/Tiles.xml Modified: trunk/18xx/data/1830/Tiles.xml =================================================================== --- trunk/18xx/data/1830/Tiles.xml 2011-06-15 11:12:05 UTC (rev 1577) +++ trunk/18xx/data/1830/Tiles.xml 2011-06-16 10:58:29 UTC (rev 1578) @@ -88,11 +88,12 @@ <Tile colour="red" id="-908" name="OM wide curve"> <Track from="side0" gauge="normal" to="side2"/> </Tile> - <Tile colour="red" id="-939" name="Goderich"> - <Track from="side3" gauge="normal" to="side1"/> - <Track from="side3" gauge="normal" to="side2"/> - <Track from="side2" gauge="normal" to="side1"/> - </Tile> + <Tile colour="red" id="-939" name="Goderich"> + <Station id="city1" position="0" slots="0" type="City" value="-1"/> + <Track from="side1" gauge="normal" to="city1"/> + <Track from="side2" gauge="normal" to="city1"/> + <Track from="side3" gauge="normal" to="city1"/> + </Tile> <Tile colour="fixed" id="-25007" name="Bournemouth"> <Station id="city1" position="0" slots="1" type="City" value="20"/> <Station id="city2" position="0" slots="1" type="City" value="20"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-06-15 11:12:11
|
Revision: 1577 http://rails.svn.sourceforge.net/rails/?rev=1577&view=rev Author: evos Date: 2011-06-15 11:12:05 +0000 (Wed, 15 Jun 2011) Log Message: ----------- Fixed spurious report line in 1830/56 that D-trains are available after buying the *last* 6-train. Add report line to mention added president's cash in case of emergency train buying. Modified Paths: -------------- trunk/18xx/LocalisedText.properties trunk/18xx/rails/game/OperatingRound.java trunk/18xx/rails/game/TrainManager.java Modified: trunk/18xx/LocalisedText.properties =================================================================== --- trunk/18xx/LocalisedText.properties 2011-06-13 19:10:45 UTC (rev 1576) +++ trunk/18xx/LocalisedText.properties 2011-06-15 11:12:05 UTC (rev 1577) @@ -485,6 +485,7 @@ PoolOverHoldLimit=Pool would get over its share holding limit PoolWouldGetOverLimit=The Pool would get over its share holding limit of {0} PresidentMayNotAddMoreThan=The president may not add more than {0} +PresidentAddsCash={0} president {1} contributes {2} to buy a train PriceAboveUpperLimit=Price ({0}) is above the maximum buy price ({1}) of {2} PriceBelowLowerLimit=Price ({0}) is below the minimum buy price ({1}) of {2} PriceIsPaidTo=The price ({0}) is paid to {1} Modified: trunk/18xx/rails/game/OperatingRound.java =================================================================== --- trunk/18xx/rails/game/OperatingRound.java 2011-06-13 19:10:45 UTC (rev 1576) +++ trunk/18xx/rails/game/OperatingRound.java 2011-06-15 11:12:05 UTC (rev 1577) @@ -1801,6 +1801,10 @@ if (actualPresidentCash > 0) { new CashMove(currentPlayer, operatingCompany.get(), presidentCash); + ReportBuffer.add(LocalText.getText("PresidentAddsCash", + operatingCompany.get().getName(), + currentPlayer.getName(), + Bank.format(actualPresidentCash))); } Portfolio oldHolder = train.getHolder(); Modified: trunk/18xx/rails/game/TrainManager.java =================================================================== --- trunk/18xx/rails/game/TrainManager.java 2011-06-13 19:10:45 UTC (rev 1576) +++ trunk/18xx/rails/game/TrainManager.java 2011-06-15 11:12:05 UTC (rev 1577) @@ -174,11 +174,13 @@ if (newTypeIndex.intValue() < lTrainTypes.size()) { nextType = (lTrainTypes.get(newTypeIndex.intValue())); if (nextType != null) { - if (!nextType.isAvailable()) nextType.setAvailable(bank); - trainAvailabilityChanged = true; - ReportBuffer.add("All " + boughtType.getName() - + "-trains are sold out, " - + nextType.getName() + "-trains now available"); + if (!nextType.isAvailable()) { + nextType.setAvailable(bank); + trainAvailabilityChanged = true; + ReportBuffer.add("All " + boughtType.getName() + + "-trains are sold out, " + + nextType.getName() + "-trains now available"); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wak...@us...> - 2011-06-13 19:10:52
|
Revision: 1576 http://rails.svn.sourceforge.net/rails/?rev=1576&view=rev Author: wakko666 Date: 2011-06-13 19:10:45 +0000 (Mon, 13 Jun 2011) Log Message: ----------- Apply TileOrientation Enumeration patch from "Adam Badura" <ab...@o2...> Modified Paths: -------------- trunk/18xx/data/1825/Map.xml trunk/18xx/data/1830/Map.xml trunk/18xx/data/1835/Map.xml trunk/18xx/data/1851/Map.xml trunk/18xx/data/1856/Map.xml trunk/18xx/data/1870/Map.xml trunk/18xx/data/1880/Map.xml trunk/18xx/data/1889/Map.xml trunk/18xx/data/18AL/Map.xml trunk/18xx/data/18EU/Map.xml trunk/18xx/data/18GA/Map.xml trunk/18xx/data/18JR/Map.xml trunk/18xx/data/18Kaas/Map.xml trunk/18xx/data/18Scan/Map.xml trunk/18xx/data/18TN/Map.xml trunk/18xx/data/18VA/Map.xml trunk/18xx/rails/game/MapHex.java trunk/18xx/rails/game/MapManager.java trunk/18xx/rails/ui/swing/hexmap/EWHexMap.java trunk/18xx/rails/ui/swing/hexmap/GUIHex.java trunk/18xx/rails/ui/swing/hexmap/GUITile.java trunk/18xx/rails/ui/swing/hexmap/NSHexMap.java Added Paths: ----------- trunk/18xx/rails/game/TileOrientation.java Modified: trunk/18xx/data/1825/Map.xml =================================================================== --- trunk/18xx/data/1825/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/1825/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" letterOrientation="vertical" even="R"> +<Map tileOrientation="EW" letterOrientation="vertical" even="R"> <IfOption name="Include" parm="Unit3" value="yes"> <Hex name="B8" tile="-5" orientation="1" city="Inverness"/> <Hex name="B12" tile="-25011" city="Aberdeen"/> Modified: trunk/18xx/data/1830/Map.xml =================================================================== --- trunk/18xx/data/1830/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/1830/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" +<Map tileOrientation="EW" letterOrientation="vertical" even="B"> <Hex name="A9" tile="-901" orientation="0" value="30,50" city="Canadian West"/> <Hex name="A11" tile="-902" orientation="1" value="30,50" city="Canadian West"/> Modified: trunk/18xx/data/1835/Map.xml =================================================================== --- trunk/18xx/data/1835/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/1835/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" letterOrientation="vertical" even="B"> +<Map tileOrientation="EW" letterOrientation="vertical" even="B"> <Hex name="A9" tile="-7"/> <Hex name="A11" tile="-10" city="Kiel"/> <Hex name="A17" tile="-800" orientation="5"/> Modified: trunk/18xx/data/1851/Map.xml =================================================================== --- trunk/18xx/data/1851/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/1851/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" letterOrientation="vertical" even="B"> +<Map tileOrientation="EW" letterOrientation="vertical" even="B"> <Hex name="@18" tile="-902" orientation="1" value="40,50,60" city="Cincinnati"/> <Hex name="A3" tile="-901" orientation="5" value="40,50,70" city="St. Louis"/> <Hex name="A5" tile="-10" orientation="1" city="East St. Louis"/> Modified: trunk/18xx/data/1856/Map.xml =================================================================== --- trunk/18xx/data/1856/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/1856/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.NSHexMap" tileOrientation="NS" letterOrientation="horizontal" even="A"> +<Map tileOrientation="NS" letterOrientation="horizontal" even="A"> <Hex name="A20" tile="-902" value="30,50,60" city="Detroit/Windsor"/> <Hex name="B13" tile="-902" orientation="1" value="30,50,50" city="Sarnia"/> <Hex name="B15" tile="0"/> Modified: trunk/18xx/data/1870/Map.xml =================================================================== --- trunk/18xx/data/1870/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/1870/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" letterOrientation="vertical" even="A"> +<Map tileOrientation="EW" letterOrientation="vertical" even="A"> <Hex name="A2" tile="-902" value="30,40,50" city="Denver"/> <Hex name="A4" tile="0"/> <Hex name="A6" tile="0"/> Modified: trunk/18xx/data/1880/Map.xml =================================================================== --- trunk/18xx/data/1880/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/1880/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" letterOrientation="vertical" even="B"> +<Map tileOrientation="EW" letterOrientation="vertical" even="B"> <Hex name="A3" tile="-902" value="20,30,40,50" city="Russia" /> <Hex name="A5" tile="-10" city="Qiqihar"/> <Hex name="A7" tile="-1" /> Modified: trunk/18xx/data/1889/Map.xml =================================================================== --- trunk/18xx/data/1889/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/1889/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.NSHexMap" tileOrientation="NS" letterOrientation="horizontal" even="A"> +<Map tileOrientation="NS" letterOrientation="horizontal" even="A"> <Hex name="A8" tile="0" cost="80"/> <Hex name="A10" tile="-10" city="Sukomo"/> Modified: trunk/18xx/data/18AL/Map.xml =================================================================== --- trunk/18xx/data/18AL/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/18AL/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.NSHexMap" tileOrientation="NS" letterOrientation="vertical" even="A"> +<Map tileOrientation="NS" letterOrientation="vertical" even="A"> <Hex name="A2" tile="0"/> <Hex name="A4" tile="-912" orientation="2" value="40,50" city="Nashville"/> <Hex name="B1" tile="-901" value="40,30" city="Corinth"/> Modified: trunk/18xx/data/18EU/Map.xml =================================================================== --- trunk/18xx/data/18EU/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/18EU/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.NSHexMap" tileOrientation="NS" letterOrientation="vertical" even="A"> +<Map tileOrientation="NS" letterOrientation="vertical" even="A"> <Image file="18EU/MapImage.svg" x="18" y="15" scale="0.952"/> <!-- Hex name="" tile="" orientation="" value="" impassable="" label="" cost="" value="" port="yes/no" --> <Hex name="A4" port="yes" value="10" tile="-800" orientation="0"/> Modified: trunk/18xx/data/18GA/Map.xml =================================================================== --- trunk/18xx/data/18GA/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/18GA/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,5 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" - letterOrientation="vertical" even="B"> +<Map tileOrientation="EW" letterOrientation="vertical" even="B"> <Hex name="A3" tile="-902" orientation="1" value="30,60" city="Chattanooga"/> <Hex name="B2" tile="0" cost="60"> Modified: trunk/18xx/data/18JR/Map.xml =================================================================== --- trunk/18xx/data/18JR/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/18JR/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.NSHexMap" tileOrientation="NS" letterOrientation="vertical" even="B"> +<Map tileOrientation="NS" letterOrientation="vertical" even="B"> <Hex name="A5" tile="-7" orientation="1"/> <Hex name="A7" tile="-7" orientation="2"/> Modified: trunk/18xx/data/18Kaas/Map.xml =================================================================== --- trunk/18xx/data/18Kaas/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/18Kaas/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" letterOrientation="vertical" even="A"> +<Map tileOrientation="EW" letterOrientation="vertical" even="A"> <!-- To be added: orientation, impassable hex sides, etc.--> <Hex name="A16" tile="0"/> <Hex name="A18" tile="-3" value="10" orientation="0"/> Modified: trunk/18xx/data/18Scan/Map.xml =================================================================== --- trunk/18xx/data/18Scan/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/18Scan/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" letterOrientation="vertical" even="A"> +<Map tileOrientation="EW" letterOrientation="vertical" even="A"> <!-- Hex name="" tile="" orientation="" value="" impassable="" label="" cost="" value="" port="yes/no" --> <Hex name="A4" tile="-911" city="Newcastle" value="20,50,80"/> <Hex name="A6" tile="0" cost="60"/> Modified: trunk/18xx/data/18TN/Map.xml =================================================================== --- trunk/18xx/data/18TN/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/18TN/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,5 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" - letterOrientation="vertical" even="A"> +<Map tileOrientation="EW" letterOrientation="vertical" even="A"> <Hex name="A16" tile="-902" city="Cincinnati" orientation="1" value="50,80"/> <Hex name="B13" tile="-10001" city="Louisville"/> Modified: trunk/18xx/data/18VA/Map.xml =================================================================== --- trunk/18xx/data/18VA/Map.xml 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/data/18VA/Map.xml 2011-06-13 19:10:45 UTC (rev 1576) @@ -1,4 +1,4 @@ -<Map mapClass="rails.ui.swing.hexmap.NSHexMap" tileOrientation="NS" letterOrientation="vertical" even="A"> +<Map tileOrientation="NS" letterOrientation="vertical" even="A"> <Hex name="A6" tile="0"/> <Hex name="A8" tile="-1921" orientation="1" value="40,70" city="Philadelphia"/> <Hex name="B5" tile="-10" city="Hagerstown"/> Modified: trunk/18xx/rails/game/MapHex.java =================================================================== --- trunk/18xx/rails/game/MapHex.java 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/rails/game/MapHex.java 2011-06-13 19:10:45 UTC (rev 1576) @@ -19,14 +19,14 @@ /** * Represents a Hex on the Map from the Model side. * - * <p> <b>Tile orientations</b>. Tiles can be oriented NS or EW; the directions - * refer to the "flat" hex sides. <p> The term "rotation" is used to indicate - * the amount of rotation (in 60 degree units) from the standard orientation of - * the tile (sometimes the term orientation is also used to refer to rotation). + * <p> The term "rotation" is used to indicate the amount of rotation (in 60 + * degree units) from the standard orientation of the tile (sometimes the term + * orientation is also used to refer to rotation). * <p>Rotation is always relative to the standard orientation, which has the - * printed tile number on the S edge for NS oriented tiles, or on the SW edge - * for EW oriented tiles. The rotation numbers are indicated in the below - * picture for an NS-oriented tile: <p> <code> + * printed tile number on the S edge for {@link TileOrientation#NS}-oriented + * tiles, or on the SW edge for {@link TileOrientation#EW}-oriented tiles. The + * rotation numbers are indicated in the below picture for an + * {@code NS}-oriented tile: <p> <code> * * ____3____ * / \ @@ -35,15 +35,12 @@ * \ / * 1 5 * \____0____/ - * </code> <p> For EW-oriented + * </code> <p> For {@code EW}-oriented * tiles the above picture should be rotated 30 degrees clockwise. */ public class MapHex extends ModelObject implements ConfigurableComponentI, StationHolder, TokenHolder { - public static final int EW = 0; - public static final int NS = 1; - private static final String[] ewOrNames = { "SW", "W", "NW", "NE", "E", "SE" }; private static final String[] nsOrNames = @@ -186,7 +183,7 @@ if (lettersGoHorizontal()) { row = number; column = letter - '@'; - if (getTileOrientation() == MapHex.EW) { + if (getTileOrientation() == TileOrientation.EW) { // Tiles with flat EW sides, letters go horizontally. // Example: 1841 (NOT TESTED, PROBABLY WRONG). x = column; @@ -202,7 +199,7 @@ { row = letter - '@'; column = number; - if (getTileOrientation() == MapHex.EW) { + if (getTileOrientation() == TileOrientation.EW) { // Tiles with flat EW sides, letters go vertically. // Most common case. // Tested for 1830 and 1870. OK with 1830 Wabash and 1825R2 (negative column numbers) @@ -276,6 +273,9 @@ } public void finishConfiguration (GameManagerI gameManager) { + if(gameManager == null) { + throw new IllegalArgumentException("gameManager must not be null"); + } currentTile = gameManager.getTileManager().getTile(preprintedTileId); // We need completely new objects, not just references to the Tile's @@ -335,7 +335,7 @@ return openHexSides != null && openHexSides[side%6]; } - public int getTileOrientation() { + public TileOrientation getTileOrientation() { return mapManager.getTileOrientation(); } @@ -355,7 +355,7 @@ public String getOrientationName(int orientation) { - if (getTileOrientation() == EW) { + if (getTileOrientation() == TileOrientation.EW) { return ewOrNames[orientation % 6]; } else { return nsOrNames[orientation % 6]; Modified: trunk/18xx/rails/game/MapManager.java =================================================================== --- trunk/18xx/rails/game/MapManager.java 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/rails/game/MapManager.java 2011-06-13 19:10:45 UTC (rev 1576) @@ -18,7 +18,7 @@ // The next attributes are duplicates in MapHex. We'll see what we really // need. - protected int tileOrientation; + protected TileOrientation tileOrientation; protected boolean lettersGoHorizontal; protected boolean letterAHasEvenNumbers; @@ -60,23 +60,28 @@ * @see rails.game.ConfigurableComponentI#configureFromXML(org.w3c.dom.Element) */ public void configureFromXML(Tag tag) throws ConfigurationException { - mapUIClassName = tag.getAttributeAsString("mapClass"); - if (mapUIClassName == null) { - throw new ConfigurationException("Map class name missing"); - } - String attr = tag.getAttributeAsString("tileOrientation"); if (attr == null) throw new ConfigurationException("Map orientation undefined"); - if (attr.equals("EW")) { - tileOrientation = MapHex.EW; - } else if (attr.equals("NS")) { - tileOrientation = MapHex.NS; - } else { - throw new ConfigurationException("Invalid tile orientation: " - + attr); + try { + tileOrientation = TileOrientation.valueOf(attr); } + catch(IllegalArgumentException exception) { + throw new ConfigurationException("Invalid tile orientation: " + attr, exception); + } + switch(tileOrientation) { + case NS: + mapUIClassName = "rails.ui.swing.hexmap.NSHexMap"; + break; + case EW: + mapUIClassName = "rails.ui.swing.hexmap.EWHexMap"; + break; + default: + // Unexpected default. + throw new AssertionError(tileOrientation); + } + attr = tag.getAttributeAsString("letterOrientation"); if (attr.equals("horizontal")) { lettersGoHorizontal = true; @@ -101,8 +106,8 @@ List<Tag> hexTags = tag.getChildren("Hex"); MapHex hex; - minX = minY = minCol = minRow = 9999; - maxX = maxY = maxCol = maxRow = -9999; + minX = minY = minCol = minRow = Integer.MAX_VALUE; + maxX = maxY = maxCol = maxRow = Integer.MIN_VALUE; possibleTileCosts = new TreeSet<Integer>(); for (Tag hexTag : hexTags) { hex = new MapHex(this); @@ -223,7 +228,7 @@ public int getAdjacentX (int x, int y, int orientation) { - if (tileOrientation == MapHex.EW) { + if (tileOrientation == TileOrientation.EW) { return x + (y % 2 == 0 ? xYEvenDeltaEW[orientation] : xYOddDeltaEW[orientation]); } else { return x + xDeltaNS[orientation]; @@ -232,7 +237,7 @@ public int getAdjacentY (int x, int y, int orientation) { - if (tileOrientation == MapHex.EW) { + if (tileOrientation == TileOrientation.EW) { return y + yDeltaEW[orientation]; } else { return y + ((x % 2 == 0) == letterAHasEvenNumbers ? @@ -243,7 +248,7 @@ /** * @return Returns the currentTileOrientation. */ - public int getTileOrientation() { + public TileOrientation getTileOrientation() { return tileOrientation; } Added: trunk/18xx/rails/game/TileOrientation.java =================================================================== --- trunk/18xx/rails/game/TileOrientation.java (rev 0) +++ trunk/18xx/rails/game/TileOrientation.java 2011-06-13 19:10:45 UTC (rev 1576) @@ -0,0 +1,57 @@ +package rails.game; + +/** + * Tile orientation enumeration. + * + * Tile orientation refers to "flat edges" parallel with coordinates system + * axis. Thus there are two orientations: North-South + * ({@link TileOrientation#NS NS}) and East-West + * ({@link TileOrientation#EW EW}). + * + * Although it seems neither is dominating in 18xx games North-South is used by + * default for management and classification. So North-South orientation is + * treated here as the natural one. + * + * @author Adam Badura + * @since 1.4.3 + */ +public enum TileOrientation { + /** + * North-South tile orientation. + * + * <p>This is default orientation for internal uses (which includes SVG + * images).</p> + */ + NS, + + /** + * East-West tile orientation. + */ + EW; + + + /** + * Returns rotation to be applied to {@link TileOrientation#NS}-oriented + * tile to achieve this orientation. + * + * <p>The rotation has to be done around center point of the tile.</p> + * + * <p>This function returns {@literal 0} for {@link TileOrientation#NS} + * since {@code NS}-oriented tile does not need any rotation to be + * transformed into {@code NS}-oriented tile.</p> + * + * @return Rotation to be applied to {@link TileOrientation#NS}-oriented + * tile to achieve this orientation. + */ + public int getBaseRotation() { + switch(this) { + case NS: + return 0; + case EW: + return 30; + default: + // Unexpected default. + throw new AssertionError(this); + } + } +} Property changes on: trunk/18xx/rails/game/TileOrientation.java ___________________________________________________________________ Added: svn:mime-type + text/plain Modified: trunk/18xx/rails/ui/swing/hexmap/EWHexMap.java =================================================================== --- trunk/18xx/rails/ui/swing/hexmap/EWHexMap.java 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/rails/ui/swing/hexmap/EWHexMap.java 2011-06-13 19:10:45 UTC (rev 1576) @@ -4,7 +4,8 @@ import java.awt.*; /** - * Class EWHexMap displays a basic hex map with EW exit orientation. + * Class EWHexMap displays a basic hex map with + * {@link rails.game.TileOrientation#EW EW} exit orientation. */ public class EWHexMap extends HexMap { Modified: trunk/18xx/rails/ui/swing/hexmap/GUIHex.java =================================================================== --- trunk/18xx/rails/ui/swing/hexmap/GUIHex.java 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/rails/ui/swing/hexmap/GUIHex.java 2011-06-13 19:10:45 UTC (rev 1576) @@ -108,7 +108,7 @@ this.zoomFactor = zoomFactor; tokenDiameter = (int)Math.round(NORMAL_TOKEN_SIZE * zoomFactor); - if (hexMap.getMapManager().getTileOrientation() == MapHex.EW) { + if (hexMap.getMapManager().getTileOrientation() == TileOrientation.EW) { /* The numbering is unusual: * 0 * / \ @@ -242,7 +242,7 @@ // NOTE: orientation here is its normal value in Rails + 3 (mod 6). orientation %= 6; if (barStartPoints == null) barStartPoints = new ArrayList<Integer>(2); - if (hexMap.getMapManager().getTileOrientation() == MapHex.EW) { + if (hexMap.getMapManager().getTileOrientation() == TileOrientation.EW) { barStartPoints.add((5-orientation)%6); } else { barStartPoints.add((3+orientation)%6); Modified: trunk/18xx/rails/ui/swing/hexmap/GUITile.java =================================================================== --- trunk/18xx/rails/ui/swing/hexmap/GUITile.java 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/rails/ui/swing/hexmap/GUITile.java 2011-06-13 19:10:45 UTC (rev 1576) @@ -56,7 +56,7 @@ tile = tileManager.getTile(tileId); picId = tile.getPictureId(); - if (hex.getTileOrientation() == MapHex.EW) { + if (hex.getTileOrientation() == TileOrientation.EW) { baseRotation = 0.5 * DEG60; } else { baseRotation = 0.0; Modified: trunk/18xx/rails/ui/swing/hexmap/NSHexMap.java =================================================================== --- trunk/18xx/rails/ui/swing/hexmap/NSHexMap.java 2011-06-11 06:05:21 UTC (rev 1575) +++ trunk/18xx/rails/ui/swing/hexmap/NSHexMap.java 2011-06-13 19:10:45 UTC (rev 1576) @@ -4,7 +4,8 @@ import java.awt.*; /** - * Class NSHexMap displays a basic hex map with NS exit orientation. + * Class NSHexMap displays a basic hex map with + * {@link rails.game.TileOrientation#NS NS} exit orientation. */ public class NSHexMap extends HexMap { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-06-11 06:05:27
|
Revision: 1575 http://rails.svn.sourceforge.net/rails/?rev=1575&view=rev Author: stefanfrey Date: 2011-06-11 06:05:21 +0000 (Sat, 11 Jun 2011) Log Message: ----------- Added map.image.display to configuration menu. Modified Paths: -------------- trunk/18xx/LocalisedText.properties trunk/18xx/data/Properties.xml trunk/18xx/data/profiles/default.profile Modified: trunk/18xx/LocalisedText.properties =================================================================== --- trunk/18xx/LocalisedText.properties 2011-06-10 13:40:11 UTC (rev 1574) +++ trunk/18xx/LocalisedText.properties 2011-06-11 06:05:21 UTC (rev 1575) @@ -172,6 +172,7 @@ Config.label.local.player.name=Local player (for pbem) Config.label.locale=Language setting Config.label.map.autoscroll=Map autoscroll +Config.label.map.image.display=Display background map Config.label.map.zoomstep=Map zoomstep Config.label.money_format=Money format Config.label.or.number_format=OR number format Modified: trunk/18xx/data/Properties.xml =================================================================== --- trunk/18xx/data/Properties.xml 2011-06-10 13:40:11 UTC (rev 1574) +++ trunk/18xx/data/Properties.xml 2011-06-11 06:05:21 UTC (rev 1575) @@ -30,6 +30,7 @@ <Section name="UI"> <Property name="map.autoscroll" type="BOOLEAN" /> <Property name="map.zoomstep" type="INTEGER" /> + <Property name="map.image.display" type="BOOLEAN" /> <Property name="report.window.type" type="LIST" values="static,dynamic" /> <Property name="report.window.open" type="BOOLEAN" /> <Property name="report.window.editable" type="BOOLEAN" /> Modified: trunk/18xx/data/profiles/default.profile =================================================================== --- trunk/18xx/data/profiles/default.profile 2011-06-10 13:40:11 UTC (rev 1574) +++ trunk/18xx/data/profiles/default.profile 2011-06-11 06:05:21 UTC (rev 1575) @@ -24,6 +24,7 @@ ### Panel Map map.autoscroll=yes +map.image.display=no map.zoomstep=10 ### Panel Format This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-06-10 13:40:17
|
Revision: 1574 http://rails.svn.sourceforge.net/rails/?rev=1574&view=rev Author: evos Date: 2011-06-10 13:40:11 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Fixed incorrect home base setups for most new variant companies. Modified Paths: -------------- trunk/18xx/data/1830/CompanyManager.xml Modified: trunk/18xx/data/1830/CompanyManager.xml =================================================================== --- trunk/18xx/data/1830/CompanyManager.xml 2011-06-10 12:45:07 UTC (rev 1573) +++ trunk/18xx/data/1830/CompanyManager.xml 2011-06-10 13:40:11 UTC (rev 1574) @@ -102,19 +102,19 @@ <IfOption name="Variant" value="Simple"> <Company name="L&N" type="Public" tokens="3" fgColour="FFE600" bgColour="FF0000" longname="Louisville & Nashville"> - <Home hex="H4" city="0" allCitiesBlocked="yes" /> + <Home hex="H4"/> </Company> </IfOption> <IfOption name="Variant" value="Simple"> <Company name="MILW" type="Public" tokens="3" fgColour="FFFFFF" bgColour="FF8000" longname="Milwaukee Road"> - <Home hex="D2" city="0" allCitiesBlocked="yes" /> + <Home hex="D2"/> </Company> </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> <Company name="N&W" type="Public" tokens="3" fgColour="FFFF00" bgColour="000080" longname="Norfolk & Western"> - <Home hex="L16" city="0" allCitiesBlocked="yes" /> + <Home hex="L16"/> </Company> </IfOption> <Company name="NYC" type="Public" tokens="4" fgColour="FFFFFF" bgColour="000000" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-06-10 12:45:14
|
Revision: 1573 http://rails.svn.sourceforge.net/rails/?rev=1573&view=rev Author: evos Date: 2011-06-10 12:45:07 +0000 (Fri, 10 Jun 2011) Log Message: ----------- Replaced preprinted tiles -10 by -3007 on Y hexes. Modified Paths: -------------- trunk/18xx/data/1835/Map.xml trunk/18xx/data/1835/TileSet.xml trunk/18xx/data/1835/Tiles.xml Modified: trunk/18xx/data/1835/Map.xml =================================================================== --- trunk/18xx/data/1835/Map.xml 2011-06-09 22:05:28 UTC (rev 1572) +++ trunk/18xx/data/1835/Map.xml 2011-06-10 12:45:07 UTC (rev 1573) @@ -55,7 +55,7 @@ <Hex name="G17" tile="0"/> <Hex name="G19" tile="0"/> <Hex name="G21" tile="-8" orientation="3"/> - <Hex name="H2" tile="-10" city="Düsseldorf"/> + <Hex name="H2" tile="-3007" city="Düsseldorf"/> <Hex name="H4" tile="-2"/> <Hex name="H6" tile="0" cost="70"/> <Hex name="H8" tile="0" cost="70"/> @@ -64,10 +64,10 @@ <Hex name="H14" tile="0"/> <Hex name="H16" tile="-10" city="Leipzig"/> <Hex name="H18" tile="0"/> - <Hex name="H20" tile="-10" city="Dresden"/> + <Hex name="H20" tile="-3007" city="Dresden"/> <Hex name="H22" tile="-901" orientation="2" value="20,30,40" city="Oberschlesien"/> <Hex name="I1" tile="-143"/> - <Hex name="I3" tile="-10" cost="50" city="Köln"/> + <Hex name="I3" tile="-3007" cost="50" city="Köln"/> <Hex name="I5" tile="0"/> <Hex name="I7" tile="0" cost="70"/> <Hex name="I9" tile="0" cost="70"/> @@ -120,7 +120,7 @@ <Hex name="O9" tile="0"/> <Hex name="O11" tile="0"/> <Hex name="O13" tile="0"/> - <Hex name="O15" tile="-10" city="München"/> + <Hex name="O15" tile="-3007" city="München"/> <Hex name="O17" tile="0"/> <Hex name="P6" tile="-7" orientation="4"/> <Hex name="P10" tile="-3" orientation="3"/> Modified: trunk/18xx/data/1835/TileSet.xml =================================================================== --- trunk/18xx/data/1835/TileSet.xml 2011-06-09 22:05:28 UTC (rev 1572) +++ trunk/18xx/data/1835/TileSet.xml 2011-06-10 12:45:07 UTC (rev 1573) @@ -13,8 +13,7 @@ <Tile id="-7"/> <Tile id="-8"/> <Tile id="-10"><!-- 1 city --> - <Upgrade id="5,6,57" hex="-H2,H20,I3,O15"/> - <Upgrade id="201,202" hex="H2,H20,I3,O15"/> + <Upgrade id="5,6,57"/> </Tile> <Tile id="-39"/> <Tile id="-41"/> @@ -43,6 +42,9 @@ <Upgrade id="218"/> </Tile> <Tile id="-901"/> + <Tile id="-3007"> + <Upgrade id="201,202"/> + </Tile> <!-- yellow tiles --> <Tile id="1" quantity="1"> Modified: trunk/18xx/data/1835/Tiles.xml =================================================================== --- trunk/18xx/data/1835/Tiles.xml 2011-06-09 22:05:28 UTC (rev 1572) +++ trunk/18xx/data/1835/Tiles.xml 2011-06-10 12:45:07 UTC (rev 1573) @@ -1,508 +1,511 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Tiles> - <Tile colour="white" id="0" name="empty"/> - <Tile colour="white" id="-1" name="1 village"> - <Station id="city1" position="002" type="Town"/> - </Tile> - <Tile colour="white" id="-2" name="2 villages"> - <Station id="city1" position="102" type="Town"/> - <Station id="city2" position="302" type="Town"/> - </Tile> - <Tile colour="fixed" id="-3" name="MF 3"> - <Station id="city1" position="252" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - </Tile> - <Tile colour="fixed" id="-7" name="MF 7"> - <Track from="side2" gauge="normal" to="side1"/> - </Tile> - <Tile colour="fixed" id="-8" name="MF 8"> - <Track from="side2" gauge="normal" to="side0"/> - </Tile> - <Tile colour="white" id="-10" name="1 city"> - <Station id="city1" position="302" slots="1" type="City"/> - </Tile> - <Tile colour="fixed" id="-39" name="-39"> - <Track from="side3" gauge="normal" to="side1"/> - <Track from="side1" gauge="normal" to="side2"/> - <Track from="side2" gauge="normal" to="side3"/> - </Tile> - <Tile colour="fixed" id="-41" name="-41"> - <Track from="side0" gauge="normal" to="side3"/> - <Track from="side4" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="side3"/> - </Tile> - <Tile colour="fixed" id="-58" name="MF 58"> - <Station id="city1" position="301" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - </Tile> - <Tile colour="fixed" id="-114" name="Braunschweig"> - <Station id="city1" position="501" slots="1" type="City" value="20"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="side2" gauge="normal" to="side2"/> - </Tile> - <Tile colour="fixed" id="-143" name="-143"> - <Station id="city1" position="0" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="fixed" id="-800" name="Rostock"> - <Station id="city1" position="302" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side3"/> - </Tile> - <Tile colour="fixed" id="-801" name="Emden"> - <Station id="city1" position="352" type="Town" value="10"/> - <Station id="city2" position="202" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city2" gauge="normal" to="side2"/> - </Tile> - <Tile colour="fixed" id="-802" name="Bremerhaven"> - <Station id="city1" position="101" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="side3" gauge="normal" to="side4"/> - </Tile> - <Tile colour="green" id="-803" name="Hamburg"> - <Station id="city1" position="502" slots="1" type="City" value="40"/> - <Station id="city2" position="052" slots="1" type="City" value="40"/> - <Station id="city3" position="302" slots="1" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city2" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city3" gauge="normal" to="side3"/> - </Tile> - <Tile colour="fixed" id="-804" name="Schwerin"> - <Station id="city1" position="002" slots="1" type="City" value="10"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="fixed" id="-805" name="Oldenburg"> - <Station id="city1" position="051" slots="1" type="City" value="10"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="yellow" id="-806" name="Berlin"> - <Station id="city1" position="402" slots="1" type="City" city="Berlin" value="30"/> - <Station id="city2" position="001" slots="1" type="City" city="Berlin" value="30"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city2" gauge="normal" to="side5"/> - </Tile> - <Tile colour="yellow" id="-807" name="XX"> - <Station id="city1" position="102" slots="1" type="City"/> - <Station id="city2" position="302" slots="1" type="City"/> - </Tile> - <Tile colour="fixed" id="-808" name="Koblenz"> - <Station id="city1" position="0" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="side1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="green" id="-809" name="Frankfurt"> - <Station id="city1" position="0" slots="2" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side3"/> - </Tile> - <Tile colour="green" id="-810" name="Nurnberg"> - <Station id="city1" position="552" slots="1" type="City" value="30"/> - <Station id="city2" position="252" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city2" gauge="normal" to="side2"/> - <Track from="city2" gauge="normal" to="side3"/> - </Tile> - <Tile colour="red" id="-901" name="OM 1 way"> - <Station id="city1" position="0" type="OffMapCity" value="-1"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="yellow" id="1" name="1"> - <Station id="city1" position="408" type="Town" value="10"/> - <Station id="city2" position="108" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city2" gauge="normal" to="side3"/> - </Tile> - <Tile colour="yellow" id="2" name="2"> - <Station id="city1" position="302" type="Town" value="10"/> - <Station id="city2" position="109" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city2" gauge="normal" to="side2"/> - </Tile> - <Tile colour="yellow" id="3" name="3"> - <Station id="city1" position="352" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - </Tile> - <Tile colour="yellow" id="4" name="4"> - <Station id="city1" position="0" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side0"/> - </Tile> - <Tile colour="yellow" id="5" name="5"> - <Station id="city1" position="0" slots="1" type="City" value="20"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="yellow" id="6" name="6"> - <Station id="city1" position="0" slots="1" type="City" value="20"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="yellow" id="7" name="7"> - <Track from="side3" gauge="normal" to="side4"/> - </Tile> - <Tile colour="yellow" id="8" name="8"> - <Track from="side3" gauge="normal" to="side5"/> - </Tile> - <Tile colour="yellow" id="9" name="9"> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="yellow" id="55" name="55"> - <Station id="city1" position="202" type="Town" value="10"/> - <Station id="city2" position="302" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city2" gauge="normal" to="side3"/> - <Track from="city2" gauge="normal" to="side0"/> - </Tile> - <Tile colour="yellow" id="56" name="56"> - <Station id="city1" position="407" type="Town" value="10"/> - <Station id="city2" position="108" type="Town" value="10"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city2" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="yellow" id="57" name="57"> - <Station id="city1" position="0" slots="1" type="City" value="20"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side0"/> - </Tile> - <Tile colour="yellow" id="58" name="58"> - <Station id="city1" position="401" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city1" gauge="normal" to="side3"/> - </Tile> - <Tile colour="yellow" id="69" name="69"> - <Station id="city1" position="407" type="Town" value="10"/> - <Station id="city2" position="002" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city2" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side3"/> - </Tile> - <Tile colour="yellow" id="201" name="201"> - <Station id="city1" position="0" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - </Tile> - <Tile colour="yellow" id="202" name="202"> - <Station id="city1" position="0" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="green" id="12" name="12"> - <Station id="city1" position="0" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - </Tile> - <Tile colour="green" id="13" name="13"> - <Station id="city1" position="0" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - </Tile> - <Tile colour="green" id="14" name="14"> - <Station id="city1" position="0" slots="2" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="15" name="15"> - <Station id="city1" position="0" slots="2" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city1" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="16" name="16"> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side4" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="18" name="18"> - <Track from="side3" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="19" name="19"> - <Track from="side5" gauge="normal" to="side1"/> - <Track from="side0" gauge="normal" to="side3"/> - </Tile> - <Tile colour="green" id="20" name="20"> - <Track from="side1" gauge="normal" to="side4"/> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="23" name="23"> - <Track from="side4" gauge="normal" to="side0"/> - <Track from="side0" gauge="normal" to="side3"/> - </Tile> - <Tile colour="green" id="24" name="24"> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="25" name="25"> - <Track from="side1" gauge="normal" to="side3"/> - <Track from="side3" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="26" name="26"> - <Track from="side5" gauge="normal" to="side0"/> - <Track from="side0" gauge="normal" to="side3"/> - </Tile> - <Tile colour="green" id="27" name="27"> - <Track from="side3" gauge="normal" to="side4"/> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="28" name="28"> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side4" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="29" name="29"> - <Track from="side3" gauge="normal" to="side4"/> - <Track from="side3" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="87" name="87"> - <Station id="city1" position="0" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="88" name="88"> - <Station id="city1" position="0" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="203" name="203"> - <Station id="city1" position="0" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - </Tile> - <Tile colour="green" id="204" name="204"> - <Station id="city1" position="0" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="205" name="205"> - <Station id="city1" position="0" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="206" name="206"> - <Station id="city1" position="0" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="207" name="207"> - <Station id="city1" position="0" slots="2" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="208" name="208"> - <Station id="city1" position="0" slots="2" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="209" name="209"> - <Station id="city1" position="0" slots="3" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="210" name="210"> - <Station id="city1" position="502" slots="1" type="City" value="30"/> - <Station id="city2" position="052" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city2" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side1"/> - </Tile> - <Tile colour="green" id="211" name="211"> - <Station id="city1" position="252" slots="1" type="City" value="30"/> - <Station id="city2" position="452" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city2" gauge="normal" to="side4"/> - <Track from="city2" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="212" name="212"> - <Station id="city1" position="152" slots="1" type="City" value="30"/> - <Station id="city2" position="452" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city2" gauge="normal" to="side4"/> - <Track from="city2" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="213" name="213"> - <Station id="city1" position="151" slots="1" type="City" value="30"/> - <Station id="city2" position="452" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city2" gauge="normal" to="side4"/> - <Track from="city2" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="214" name="214"> - <Station id="city1" position="251" slots="1" type="City" value="30"/> - <Station id="city2" position="552" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city2" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="215" name="215"> - <Station id="city1" position="507" slots="1" type="City" value="30"/> - <Station id="city2" position="207" slots="1" type="City" value="30"/> - <Track from="city2" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="39" name="39"> - <Track from="side3" gauge="normal" to="side4"/> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side4" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="40" name="40"> - <Track from="side1" gauge="normal" to="side3"/> - <Track from="side1" gauge="normal" to="side5"/> - <Track from="side3" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="41" name="41"> - <Track from="side4" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="side3"/> - <Track from="side0" gauge="normal" to="side3"/> - </Tile> - <Tile colour="brown" id="42" name="42"> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side3" gauge="normal" to="side0"/> - <Track from="side5" gauge="normal" to="side0"/> - </Tile> - <Tile colour="brown" id="43" name="43"> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side3" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="side5"/> - <Track from="side4" gauge="normal" to="side0"/> - </Tile> - <Tile colour="brown" id="44" name="44"> - <Track from="side3" gauge="normal" to="side0"/> - <Track from="side1" gauge="normal" to="side0"/> - <Track from="side3" gauge="normal" to="side4"/> - <Track from="side1" gauge="normal" to="side4"/> - </Tile> - <Tile colour="brown" id="45" name="45"> - <Track from="side1" gauge="normal" to="side5"/> - <Track from="side1" gauge="normal" to="side3"/> - <Track from="side5" gauge="normal" to="side0"/> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="brown" id="46" name="46"> - <Track from="side1" gauge="normal" to="side5"/> - <Track from="side1" gauge="normal" to="side0"/> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="brown" id="47" name="47"> - <Track from="side3" gauge="normal" to="side0"/> - <Track from="side3" gauge="normal" to="side1"/> - <Track from="side4" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="side1"/> - </Tile> - <Tile colour="brown" id="63" name="63"> - <Station id="city1" position="0" slots="2" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="70" name="70"> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side3" gauge="normal" to="side4"/> - <Track from="side5" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="side0"/> - </Tile> - <Tile colour="brown" id="216" name="216"> - <Station id="city1" position="0" slots="2" type="City" value="50"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="217" name="217"> - <Station id="city1" position="0" slots="2" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="218" name="218"> - <Station id="city1" position="0" slots="2" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="219" name="219"> - <Station id="city1" position="0" slots="2" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="220" name="220"> - <Station id="city1" position="0" slots="3" type="City" value="60"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="221" name="221"> - <Station id="city1" position="0" slots="3" type="City" value="60"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<Tiles> + <Tile colour="white" id="0" name="empty"/> + <Tile colour="white" id="-1" name="1 village"> + <Station id="city1" position="002" type="Town"/> + </Tile> + <Tile colour="white" id="-2" name="2 villages"> + <Station id="city1" position="102" type="Town"/> + <Station id="city2" position="302" type="Town"/> + </Tile> + <Tile colour="fixed" id="-3" name="MF 3"> + <Station id="city1" position="352" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> + <Tile colour="fixed" id="-7" name="MF 7"> + <Track from="side2" gauge="normal" to="side1"/> + </Tile> + <Tile colour="fixed" id="-8" name="MF 8"> + <Track from="side2" gauge="normal" to="side0"/> + </Tile> + <Tile colour="white" id="-10" name="1 city"> + <Station id="city1" position="302" slots="1" type="City"/> + </Tile> + <Tile colour="fixed" id="-39" name="-39"> + <Track from="side3" gauge="normal" to="side1"/> + <Track from="side1" gauge="normal" to="side2"/> + <Track from="side2" gauge="normal" to="side3"/> + </Tile> + <Tile colour="fixed" id="-41" name="-41"> + <Track from="side0" gauge="normal" to="side3"/> + <Track from="side4" gauge="normal" to="side0"/> + <Track from="side4" gauge="normal" to="side3"/> + </Tile> + <Tile colour="fixed" id="-58" name="MF 58"> + <Station id="city1" position="301" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + </Tile> + <Tile colour="fixed" id="-114" name="Braunschweig"> + <Station id="city1" position="501" slots="1" type="City" value="20"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="side2" gauge="normal" to="side2"/> + </Tile> + <Tile colour="fixed" id="-143" name="-143"> + <Station id="city1" position="0" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="fixed" id="-800" name="Rostock"> + <Station id="city1" position="302" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> + <Tile colour="fixed" id="-801" name="Emden"> + <Station id="city1" position="452" type="Town" value="10"/> + <Station id="city2" position="202" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city2" gauge="normal" to="side2"/> + </Tile> + <Tile colour="fixed" id="-802" name="Bremerhaven"> + <Station id="city1" position="101" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="side3" gauge="normal" to="side4"/> + </Tile> + <Tile colour="green" id="-803" name="Hamburg"> + <Station id="city1" position="502" slots="1" type="City" value="20"/> + <Station id="city2" position="152" slots="1" type="City" value="40"/> + <Station id="city3" position="302" slots="1" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city2" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city3" gauge="normal" to="side3"/> + </Tile> + <Tile colour="fixed" id="-804" name="Schwerin"> + <Station id="city1" position="001" slots="1" type="City" value="10"/> + <Track from="side4" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="fixed" id="-805" name="Oldenburg"> + <Station id="city1" position="151" slots="1" type="City" value="10"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="yellow" id="-806" name="Berlin"> + <Station id="city1" position="402" slots="1" type="City" value="30"/> + <Station id="city2" position="001" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city2" gauge="normal" to="side5"/> + </Tile> + <Tile colour="yellow" id="-807" name="XX"> + <Station id="city1" position="102" slots="1" type="City"/> + <Station id="city2" position="302" slots="1" type="City"/> + </Tile> + <Tile colour="fixed" id="-808" name="Koblenz"> + <Station id="city1" position="0" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="side1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="green" id="-809" name="Frankfurt"> + <Station id="city1" position="0" slots="2" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> + <Tile colour="green" id="-810" name="Nurnberg"> + <Station id="city1" position="052" slots="1" type="City" value="30"/> + <Station id="city2" position="352" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city2" gauge="normal" to="side2"/> + <Track from="city2" gauge="normal" to="side3"/> + </Tile> + <Tile colour="red" id="-901" name="OM 1 way"> + <Station id="city1" position="0" type="OffMapCity" value="-1"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="white" id="-3007" name="Y city (cent)"> + <Station id="city1" position="0" slots="1" type="City"/> + </Tile> + <Tile colour="yellow" id="1" name="1"> + <Station id="city1" position="408" type="Town" value="10"/> + <Station id="city2" position="108" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city2" gauge="normal" to="side3"/> + </Tile> + <Tile colour="yellow" id="2" name="2"> + <Station id="city1" position="302" type="Town" value="10"/> + <Station id="city2" position="109" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city2" gauge="normal" to="side2"/> + </Tile> + <Tile colour="yellow" id="3" name="3"> + <Station id="city1" position="452" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + </Tile> + <Tile colour="yellow" id="4" name="4"> + <Station id="city1" position="0" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side0"/> + </Tile> + <Tile colour="yellow" id="5" name="5"> + <Station id="city1" position="0" slots="1" type="City" value="20"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="yellow" id="6" name="6"> + <Station id="city1" position="0" slots="1" type="City" value="20"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="yellow" id="7" name="7"> + <Track from="side3" gauge="normal" to="side4"/> + </Tile> + <Tile colour="yellow" id="8" name="8"> + <Track from="side3" gauge="normal" to="side5"/> + </Tile> + <Tile colour="yellow" id="9" name="9"> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="yellow" id="55" name="55"> + <Station id="city1" position="202" type="Town" value="10"/> + <Station id="city2" position="302" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city2" gauge="normal" to="side3"/> + <Track from="city2" gauge="normal" to="side0"/> + </Tile> + <Tile colour="yellow" id="56" name="56"> + <Station id="city1" position="407" type="Town" value="10"/> + <Station id="city2" position="108" type="Town" value="10"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city2" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="yellow" id="57" name="57"> + <Station id="city1" position="0" slots="1" type="City" value="20"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side0"/> + </Tile> + <Tile colour="yellow" id="58" name="58"> + <Station id="city1" position="401" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> + <Tile colour="yellow" id="69" name="69"> + <Station id="city1" position="407" type="Town" value="10"/> + <Station id="city2" position="002" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city2" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side3"/> + </Tile> + <Tile colour="yellow" id="201" name="201"> + <Station id="city1" position="0" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> + <Tile colour="yellow" id="202" name="202"> + <Station id="city1" position="0" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="green" id="12" name="12"> + <Station id="city1" position="0" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> + <Tile colour="green" id="13" name="13"> + <Station id="city1" position="0" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + </Tile> + <Tile colour="green" id="14" name="14"> + <Station id="city1" position="0" slots="2" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="15" name="15"> + <Station id="city1" position="0" slots="2" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city1" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="16" name="16"> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side4" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="18" name="18"> + <Track from="side3" gauge="normal" to="side0"/> + <Track from="side4" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="19" name="19"> + <Track from="side5" gauge="normal" to="side1"/> + <Track from="side0" gauge="normal" to="side3"/> + </Tile> + <Tile colour="green" id="20" name="20"> + <Track from="side1" gauge="normal" to="side4"/> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="23" name="23"> + <Track from="side4" gauge="normal" to="side0"/> + <Track from="side0" gauge="normal" to="side3"/> + </Tile> + <Tile colour="green" id="24" name="24"> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="25" name="25"> + <Track from="side1" gauge="normal" to="side3"/> + <Track from="side3" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="26" name="26"> + <Track from="side5" gauge="normal" to="side0"/> + <Track from="side0" gauge="normal" to="side3"/> + </Tile> + <Tile colour="green" id="27" name="27"> + <Track from="side3" gauge="normal" to="side4"/> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="28" name="28"> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side4" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="29" name="29"> + <Track from="side3" gauge="normal" to="side4"/> + <Track from="side3" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="87" name="87"> + <Station id="city1" position="0" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="88" name="88"> + <Station id="city1" position="0" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="203" name="203"> + <Station id="city1" position="0" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + </Tile> + <Tile colour="green" id="204" name="204"> + <Station id="city1" position="0" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="205" name="205"> + <Station id="city1" position="0" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="206" name="206"> + <Station id="city1" position="0" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="207" name="207"> + <Station id="city1" position="0" slots="2" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="208" name="208"> + <Station id="city1" position="0" slots="2" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="209" name="209"> + <Station id="city1" position="0" slots="3" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="210" name="210"> + <Station id="city1" position="502" slots="1" type="City" value="30"/> + <Station id="city2" position="152" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city2" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side1"/> + </Tile> + <Tile colour="green" id="211" name="211"> + <Station id="city1" position="352" slots="1" type="City" value="30"/> + <Station id="city2" position="552" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city2" gauge="normal" to="side4"/> + <Track from="city2" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="212" name="212"> + <Station id="city1" position="252" slots="1" type="City" value="30"/> + <Station id="city2" position="552" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city2" gauge="normal" to="side4"/> + <Track from="city2" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="213" name="213"> + <Station id="city1" position="251" slots="1" type="City" value="30"/> + <Station id="city2" position="552" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city2" gauge="normal" to="side4"/> + <Track from="city2" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="214" name="214"> + <Station id="city1" position="351" slots="1" type="City" value="30"/> + <Station id="city2" position="052" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city2" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="215" name="215"> + <Station id="city1" position="507" slots="1" type="City" value="30"/> + <Station id="city2" position="207" slots="1" type="City" value="30"/> + <Track from="city2" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="39" name="39"> + <Track from="side3" gauge="normal" to="side4"/> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side4" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="40" name="40"> + <Track from="side1" gauge="normal" to="side3"/> + <Track from="side1" gauge="normal" to="side5"/> + <Track from="side3" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="41" name="41"> + <Track from="side4" gauge="normal" to="side0"/> + <Track from="side4" gauge="normal" to="side3"/> + <Track from="side0" gauge="normal" to="side3"/> + </Tile> + <Tile colour="brown" id="42" name="42"> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side3" gauge="normal" to="side0"/> + <Track from="side5" gauge="normal" to="side0"/> + </Tile> + <Tile colour="brown" id="43" name="43"> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side3" gauge="normal" to="side0"/> + <Track from="side4" gauge="normal" to="side5"/> + <Track from="side4" gauge="normal" to="side0"/> + </Tile> + <Tile colour="brown" id="44" name="44"> + <Track from="side3" gauge="normal" to="side0"/> + <Track from="side1" gauge="normal" to="side0"/> + <Track from="side3" gauge="normal" to="side4"/> + <Track from="side1" gauge="normal" to="side4"/> + </Tile> + <Tile colour="brown" id="45" name="45"> + <Track from="side1" gauge="normal" to="side5"/> + <Track from="side1" gauge="normal" to="side3"/> + <Track from="side5" gauge="normal" to="side0"/> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="brown" id="46" name="46"> + <Track from="side1" gauge="normal" to="side5"/> + <Track from="side1" gauge="normal" to="side0"/> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="brown" id="47" name="47"> + <Track from="side3" gauge="normal" to="side0"/> + <Track from="side3" gauge="normal" to="side1"/> + <Track from="side4" gauge="normal" to="side0"/> + <Track from="side4" gauge="normal" to="side1"/> + </Tile> + <Tile colour="brown" id="63" name="63"> + <Station id="city1" position="0" slots="2" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="70" name="70"> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side3" gauge="normal" to="side4"/> + <Track from="side5" gauge="normal" to="side0"/> + <Track from="side4" gauge="normal" to="side0"/> + </Tile> + <Tile colour="brown" id="216" name="216"> + <Station id="city1" position="0" slots="2" type="City" value="50"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="217" name="217"> + <Station id="city1" position="0" slots="2" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="218" name="218"> + <Station id="city1" position="0" slots="2" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="219" name="219"> + <Station id="city1" position="0" slots="2" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="220" name="220"> + <Station id="city1" position="0" slots="3" type="City" value="60"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="221" name="221"> + <Station id="city1" position="0" slots="3" type="City" value="60"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> </Tiles> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-06-09 22:05:34
|
Revision: 1572 http://rails.svn.sourceforge.net/rails/?rev=1572&view=rev Author: evos Date: 2011-06-09 22:05:28 +0000 (Thu, 09 Jun 2011) Log Message: ----------- Implemented train rusting on buying another than the first train of a type (for 18TN). Modified Paths: -------------- trunk/18xx/data/18TN/Game.xml trunk/18xx/rails/game/TrainManager.java trunk/18xx/rails/game/TrainType.java trunk/18xx/rails/game/TrainTypeI.java Modified: trunk/18xx/data/18TN/Game.xml =================================================================== --- trunk/18xx/data/18TN/Game.xml 2011-06-09 22:04:33 UTC (rev 1571) +++ trunk/18xx/data/18TN/Game.xml 2011-06-09 22:05:28 UTC (rev 1572) @@ -72,7 +72,9 @@ rustedTrain="2" /> <Train name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> <Train name="6" majorStops="6" cost="630" quantity="2" startPhase="6" - rustedTrain="3" /> + rustedTrain="3"> + <Sub index="2" rustedTrain="4"/> + </Train> <Train name="8" majorStops="8" cost="700" quantity="7" startPhase="8" rustedTrain="4" /> </Component> Modified: trunk/18xx/rails/game/TrainManager.java =================================================================== --- trunk/18xx/rails/game/TrainManager.java 2011-06-09 22:04:33 UTC (rev 1571) +++ trunk/18xx/rails/game/TrainManager.java 2011-06-09 22:05:28 UTC (rev 1572) @@ -91,6 +91,8 @@ } // Finish initialisation of the train types + Map<Integer, String> rustedTrainTypeNames; + TrainTypeI rustedType; for (TrainTypeI type : lTrainTypes) { if (type.getReleasedTrainTypeNames() != null) { List<TrainTypeI> rtts = new ArrayList<TrainTypeI>(2); @@ -99,9 +101,13 @@ } type.setReleasedTrainTypes(rtts); } - if (type.getRustedTrainTypeName() != null) { - type.setRustedTrainType(mTrainTypes.get(type.getRustedTrainTypeName())); - mTrainTypes.get(type.getRustedTrainTypeName()).setPermanent(false); + rustedTrainTypeNames = type.getRustedTrainTypeNames(); + if (rustedTrainTypeNames != null) { + for (int index : rustedTrainTypeNames.keySet()) { + rustedType = mTrainTypes.get(rustedTrainTypeNames.get(index)); + type.setRustedTrainType(index, rustedType); + rustedType.setPermanent(false); + } } } @@ -176,7 +182,9 @@ } } } - if (boughtType.getNumberBoughtFromIPO() == 1) { + + int trainIndex = boughtType.getNumberBoughtFromIPO(); + if (trainIndex == 1) { // First train of a new type bought ReportBuffer.add(LocalText.getText("FirstTrainBought", boughtType.getName())); @@ -187,21 +195,6 @@ phaseHasChanged = true; } - TrainTypeI rustedType = boughtType.getRustedTrainType(); - if (rustedType != null && !rustedType.hasRusted()) { - rustedType.setRusted(train.getHolder()); // Or obsolete, - // where applicable - if (rustedType.isObsoleting()) { - ReportBuffer.add(LocalText.getText("TrainsObsolete", - rustedType.getName())); - } else { - ReportBuffer.add(LocalText.getText("TrainsRusted", - rustedType.getName())); - } - trainsHaveRusted = true; - trainAvailabilityChanged = true; - } - List<TrainTypeI> releasedTypes = boughtType.getReleasedTrainTypes(); if (releasedTypes != null) { for (TrainTypeI releasedType : releasedTypes) { @@ -214,8 +207,24 @@ trainAvailabilityChanged = true; } } - } + TrainTypeI rustedType = boughtType.getRustedTrainType(trainIndex); + if (rustedType != null && !rustedType.hasRusted()) { + rustedType.setRusted(train.getHolder()); // Or obsolete, + // where applicable + if (rustedType.isObsoleting()) { + ReportBuffer.add(LocalText.getText("TrainsObsolete", + rustedType.getName())); + } else { + ReportBuffer.add(LocalText.getText("TrainsRusted", + rustedType.getName())); + } + trainsHaveRusted = true; + trainAvailabilityChanged = true; + } + +} + public List<TrainI> getAvailableNewTrains() { List<TrainI> availableTrains = new ArrayList<TrainI>(); Modified: trunk/18xx/rails/game/TrainType.java =================================================================== --- trunk/18xx/rails/game/TrainType.java 2011-06-09 22:04:33 UTC (rev 1571) +++ trunk/18xx/rails/game/TrainType.java 2011-06-09 22:05:28 UTC (rev 1572) @@ -1,8 +1,7 @@ /* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/TrainType.java,v 1.32 2010/05/11 21:47:21 stefanfrey Exp $ */ package rails.game; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import org.apache.log4j.Logger; @@ -11,8 +10,7 @@ import rails.game.state.IntegerState; import rails.util.*; -public class TrainType -implements TrainTypeI { +public class TrainType implements TrainTypeI { public final static int TOWN_COUNT_MAJOR = 2; public final static int TOWN_COUNT_MINOR = 1; @@ -58,8 +56,8 @@ protected String startedPhaseName = null; // Phase startedPhase; - private String rustedTrainTypeName = null; - protected TrainTypeI rustedTrainType = null; + private Map<Integer, String> rustedTrainTypeNames = null; + protected Map<Integer, TrainTypeI> rustedTrainType = null; private String releasedTrainTypeNames = null; protected List<TrainTypeI> releasedTrainTypes = null; @@ -141,7 +139,11 @@ startedPhaseName = tag.getAttributeAsString("startPhase", ""); // Train type rusted - rustedTrainTypeName = tag.getAttributeAsString("rustedTrain"); + String rustedTrainTypeName1 = tag.getAttributeAsString("rustedTrain"); + if (Util.hasValue(rustedTrainTypeName1)) { + rustedTrainTypeNames = new HashMap<Integer, String>(); + rustedTrainTypeNames.put(1, rustedTrainTypeName1); + } // Other train type released for buying releasedTrainTypeNames = tag.getAttributeAsString("releasedTrain"); @@ -153,6 +155,19 @@ initialPortfolio = tag.getAttributeAsString("initialPortfolio", initialPortfolio); + + // Configure any actions on other than the first train of a type + List<Tag> subs = tag.getChildren("Sub"); + if (subs != null) { + for (Tag sub : tag.getChildren("Sub")) { + int index = sub.getAttributeAsInteger("index"); + rustedTrainTypeName1 = sub.getAttributeAsString("rustedTrain"); + if (rustedTrainTypeNames == null) { + rustedTrainTypeNames = new HashMap<Integer, String>(); + } + rustedTrainTypeNames.put(index, rustedTrainTypeName1); + } + } } else { name = ""; quantity = 0; @@ -343,8 +358,9 @@ /** * @return Returns the rustedTrainType. */ - public TrainTypeI getRustedTrainType() { - return rustedTrainType; + public TrainTypeI getRustedTrainType(int index) { + if (rustedTrainType == null) return null; + return rustedTrainType.get(index); } /** @@ -378,8 +394,8 @@ /** * @return Returns the rustedTrainTypeName. */ - public String getRustedTrainTypeName() { - return rustedTrainTypeName; + public Map<Integer,String> getRustedTrainTypeNames() { + return rustedTrainTypeNames; } public boolean isObsoleting() { @@ -396,8 +412,11 @@ /** * @param rustedTrainType The rustedTrainType to set. */ - public void setRustedTrainType(TrainTypeI rustedTrainType) { - this.rustedTrainType = rustedTrainType; + public void setRustedTrainType(int index, TrainTypeI rustedTrainType) { + if (this.rustedTrainType == null) { + this.rustedTrainType = new HashMap<Integer, TrainTypeI>(); + } + this.rustedTrainType.put(index, rustedTrainType); } public boolean isPermanent() { @@ -485,8 +504,9 @@ if (Util.hasValue(startedPhaseName)) { appendInfoText(b, LocalText.getText("StartsPhase", startedPhaseName)); } - if (rustedTrainTypeName != null) { - appendInfoText(b, LocalText.getText("RustsTrains", rustedTrainTypeName)); + if (rustedTrainTypeNames != null) { + appendInfoText(b, LocalText.getText("RustsTrains", rustedTrainTypeNames.get(1))); + // Ignore any 'Sub' cases for now } if (releasedTrainTypeNames != null) { appendInfoText(b, LocalText.getText("ReleasesTrains", releasedTrainTypeNames)); Modified: trunk/18xx/rails/game/TrainTypeI.java =================================================================== --- trunk/18xx/rails/game/TrainTypeI.java 2011-06-09 22:04:33 UTC (rev 1571) +++ trunk/18xx/rails/game/TrainTypeI.java 2011-06-09 22:05:28 UTC (rev 1572) @@ -2,6 +2,7 @@ package rails.game; import java.util.List; +import java.util.Map; public interface TrainTypeI extends ConfigurableComponentI, Cloneable { @@ -58,7 +59,7 @@ /** * @return Returns the rustedTrainType. */ - public TrainTypeI getRustedTrainType(); + public TrainTypeI getRustedTrainType(int index); /** * @return Returns the startedPhaseName. @@ -95,7 +96,7 @@ public String getReleasedTrainTypeNames(); - public String getRustedTrainTypeName(); + public Map<Integer,String> getRustedTrainTypeNames(); public boolean isPermanent(); @@ -103,7 +104,7 @@ public void setReleasedTrainTypes(List<TrainTypeI> releasedTrainTypes); - public void setRustedTrainType(TrainTypeI rustedTrainType); + public void setRustedTrainType(int index, TrainTypeI rustedTrainType); public TrainI cloneTrain(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-06-09 22:04:39
|
Revision: 1571 http://rails.svn.sourceforge.net/rails/?rev=1571&view=rev Author: evos Date: 2011-06-09 22:04:33 +0000 (Thu, 09 Jun 2011) Log Message: ----------- Allow special tile lay of an unspecified tile (for 1889 D private) Modified Paths: -------------- trunk/18xx/rails/game/OperatingRound.java Modified: trunk/18xx/rails/game/OperatingRound.java =================================================================== --- trunk/18xx/rails/game/OperatingRound.java 2011-06-07 15:44:23 UTC (rev 1570) +++ trunk/18xx/rails/game/OperatingRound.java 2011-06-09 22:04:33 UTC (rev 1571) @@ -446,6 +446,11 @@ protected boolean checkNormalTileLay(TileI tile, boolean update) { + // Unspecified tile (e.g. 1889 D private, which is free on mountains) + if (tile == null) { + return !tileLaysPerColour.isEmpty(); + } + String colour = tile.getColourName(); Integer oldAllowedNumberObject = tileLaysPerColour.get(colour); @@ -1413,8 +1418,7 @@ if (stl.isExtra() // If the special tile lay is not extra, it is only allowed if // normal tile lays are also (still) allowed - || stl.getTile() != null - && checkNormalTileLay(stl.getTile(), false)) { + || checkNormalTileLay(stl.getTile(), false)) { LayTile lt = new LayTile(stl); String[] stlc = stl.getTileColours(); if (stlc != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-06-07 15:44:29
|
Revision: 1570 http://rails.svn.sourceforge.net/rails/?rev=1570&view=rev Author: evos Date: 2011-06-07 15:44:23 +0000 (Tue, 07 Jun 2011) Log Message: ----------- Map root directory fix: default is the "data" directory Modified Paths: -------------- trunk/18xx/rails/game/MapManager.java Modified: trunk/18xx/rails/game/MapManager.java =================================================================== --- trunk/18xx/rails/game/MapManager.java 2011-06-07 15:25:30 UTC (rev 1569) +++ trunk/18xx/rails/game/MapManager.java 2011-06-07 15:44:23 UTC (rev 1570) @@ -157,7 +157,11 @@ mapImageUsed = Util.hasValue(mapImageFilename) && "yes".equalsIgnoreCase(Config.get("map.image.display")); if (mapImageUsed) { - mapImageFilepath = Config.get("map.root_directory") + "/" + mapImageFilename; + String rootDirectory = Config.get("map.root_directory"); + if (!Util.hasValue(rootDirectory)) { + rootDirectory = "data"; + } + mapImageFilepath = rootDirectory + "/" + mapImageFilename; } for (String hexName : mHexes.keySet()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-06-07 15:25:40
|
Revision: 1569 http://rails.svn.sourceforge.net/rails/?rev=1569&view=rev Author: evos Date: 2011-06-07 15:25:30 +0000 (Tue, 07 Jun 2011) Log Message: ----------- Initial attempt to include a background map. 18EU map included. Zooming with a background map does not yet work correctly! Avoid zooming in serious play. Modified Paths: -------------- trunk/18xx/.settings/org.eclipse.jdt.core.prefs trunk/18xx/data/18EU/Map.xml trunk/18xx/rails/game/MapManager.java trunk/18xx/rails/ui/swing/MapPanel.java trunk/18xx/rails/ui/swing/ORPanel.java trunk/18xx/rails/ui/swing/hexmap/EWHexMap.java trunk/18xx/rails/ui/swing/hexmap/GUIHex.java trunk/18xx/rails/ui/swing/hexmap/HexMap.java trunk/18xx/rails/ui/swing/hexmap/NSHexMap.java Added Paths: ----------- trunk/18xx/data/18EU/MapImage.svg trunk/18xx/rails/ui/swing/hexmap/HexMapImage.java Modified: trunk/18xx/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/18xx/.settings/org.eclipse.jdt.core.prefs 2011-05-23 16:44:56 UTC (rev 1568) +++ trunk/18xx/.settings/org.eclipse.jdt.core.prefs 2011-06-07 15:25:30 UTC (rev 1569) @@ -1,4 +1,4 @@ -#Sun Jul 04 20:27:07 CEST 2010 +#Thu Jun 02 21:56:30 CEST 2011 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 Modified: trunk/18xx/data/18EU/Map.xml =================================================================== --- trunk/18xx/data/18EU/Map.xml 2011-05-23 16:44:56 UTC (rev 1568) +++ trunk/18xx/data/18EU/Map.xml 2011-06-07 15:25:30 UTC (rev 1569) @@ -1,4 +1,5 @@ <Map mapClass="rails.ui.swing.hexmap.NSHexMap" tileOrientation="NS" letterOrientation="vertical" even="A"> + <Image file="18EU/MapImage.svg" x="18" y="15" scale="0.952"/> <!-- Hex name="" tile="" orientation="" value="" impassable="" label="" cost="" value="" port="yes/no" --> <Hex name="A4" port="yes" value="10" tile="-800" orientation="0"/> <Hex name="B7" value="30,50" tile="-939" orientation="1" city="Hamburg"/> Added: trunk/18xx/data/18EU/MapImage.svg =================================================================== --- trunk/18xx/data/18EU/MapImage.svg (rev 0) +++ trunk/18xx/data/18EU/MapImage.svg 2011-06-07 15:25:30 UTC (rev 1569) @@ -0,0 +1,6793 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + id="Layer_1" + x="0px" + y="0px" + width="1342.007" + height="1242.5" + viewBox="0 0 1342.007 1242.5" + enable-background="new 0 0 1746 1314" + xml:space="preserve" + inkscape:version="0.48.0 r9654" + sodipodi:docname="18EU-Map.svg"><metadata + id="metadata2109"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs + id="defs2107" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="803" + inkscape:window-height="624" + id="namedview2105" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:zoom="0.22146119" + inkscape:cx="633.204" + inkscape:cy="603.25" + inkscape:window-x="1910" + inkscape:window-y="196" + inkscape:window-maximized="0" + inkscape:current-layer="Layer_1" /> +<g + id="g3" + transform="translate(-239.796,-17.75)"> + <defs + id="defs5"> + <rect + id="SVGID_1_" + x="-9" + y="9" + width="1746" + height="1314" /> + </defs> + <clipPath + id="SVGID_2_"> + <use + xlink:href="#SVGID_1_" + overflow="visible" + id="use9" + style="overflow:visible" + x="0" + y="0" + width="1746" + height="1314" /> + </clipPath> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="489.6,504 520.776,504 536.365,477 551.953,450 536.365,423 520.776,396 489.6,396 458.423,396 442.835,423 427.246,450 442.835,477 458.423,504 " + id="polygon11" + style="fill:#ccffcc;fill-rule:evenodd" /> + + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="489.6,504 520.776,504 536.365,477 551.953,450 536.365,423 520.776,396 489.6,396 458.423,396 442.835,423 427.246,450 442.835,477 458.423,504 " + id="polygon13" + style="fill:none;stroke:#999999;stroke-width:7.99989986;stroke-miterlimit:2.61310005;stroke-dasharray:8, 8" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="817.166,1071 832.754,1044 817.165,1017 801.577,990.001 770.4,990 739.223,990 723.635,1017 708.046,1044 723.635,1071 739.223,1098 770.4,1098 801.577,1098 " + id="polygon15" + style="fill:#ccffcc;fill-rule:evenodd" /> + + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="817.166,1071 832.754,1044 817.165,1017 801.577,990.001 770.4,990 739.223,990 723.635,1017 708.046,1044 723.635,1071 739.223,1098 770.4,1098 801.577,1098 " + id="polygon17" + style="fill:none;stroke:#999999;stroke-width:7.99989986;stroke-miterlimit:2.61310005;stroke-dasharray:8, 8" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="770.4,1206 801.577,1206 817.165,1179 832.753,1152 817.165,1125 801.577,1098 770.4,1098 739.224,1098 723.635,1125 708.046,1152 723.635,1179 739.224,1206 " + id="polygon19" + style="fill:#ccffcc;fill-rule:evenodd" /> + + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,1206 801.577,1206 817.165,1179 832.753,1152 817.165,1125 801.577,1098 770.4,1098 739.224,1098 723.635,1125 708.046,1152 723.635,1179 739.224,1206 " + id="polygon21" + style="fill:none;stroke:#999999;stroke-width:7.99989986;stroke-miterlimit:2.61310005;stroke-dasharray:8, 8" /> + <polyline + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="832.753,1260 817.165,1233 801.577,1206 770.4,1206 739.224,1206 723.635,1233 708.046,1260 " + id="polyline23" + style="fill:#ffffff;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1051.199,396 1082.376,396 1097.965,369 1113.553,342 1097.965,315 1082.376,288 1051.199,288 1020.023,288 1004.435,315 988.846,342 1004.435,369 1020.023,396 " + id="polygon25" + style="fill:#ccffcc;fill-rule:evenodd" /> + + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1051.199,396 1082.376,396 1097.965,369 1113.553,342 1097.965,315 1082.376,288 1051.199,288 1020.023,288 1004.435,315 988.846,342 1004.435,369 1020.023,396 " + id="polygon27" + style="fill:none;stroke:#999999;stroke-width:7.99989986;stroke-miterlimit:2.61310005;stroke-dasharray:8, 8" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="957.6,234 988.776,234 1004.364,207 1019.952,180 1004.364,153 988.776,126 957.6,126 926.423,126 910.835,153 895.246,180 910.835,207 926.423,234 " + id="polygon29" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="957.6,234 988.776,234 1004.364,207 1019.952,180 1004.364,153 988.776,126 957.6,126 926.423,126 910.835,153 895.246,180 910.835,207 926.423,234 " + id="polygon31" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1051.199,288 1082.376,288 1097.965,261 1113.553,234 1097.965,207 1082.376,180 1051.199,180 1020.023,180 1004.435,207 988.846,234 1004.435,261 1020.023,288 " + id="polygon33" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1051.199,288 1082.376,288 1097.965,261 1113.553,234 1097.965,207 1082.376,180 1051.199,180 1020.023,180 1004.435,207 988.846,234 1004.435,261 1020.023,288 " + id="polygon35" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1144.8,234 1175.977,234 1191.564,207 1207.153,180 1191.564,153 1175.977,126 1144.8,126 1113.623,126 1098.035,153 1082.446,180 1098.035,207 1113.623,234 " + id="polygon37" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1144.8,234 1175.977,234 1191.564,207 1207.153,180 1191.564,153 1175.977,126 1144.8,126 1113.623,126 1098.035,153 1082.446,180 1098.035,207 1113.623,234 " + id="polygon39" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1144.8,450 1175.977,450 1191.564,423 1207.153,396 1191.564,369 1175.977,342 1144.8,342 1113.623,342 1098.035,369 1082.446,396 1098.035,423 1113.623,450 " + id="polygon41" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1144.8,450 1175.977,450 1191.564,423 1207.153,396 1191.564,369 1175.977,342 1144.8,342 1113.623,342 1098.035,369 1082.446,396 1098.035,423 1113.623,450 " + id="polygon43" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1144.8,558 1175.977,558 1191.564,531 1207.153,504 1191.564,477 1175.977,450 1144.8,450 1113.623,450 1098.035,477 1082.446,504 1098.035,531 1113.623,558 " + id="polygon45" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1144.8,558 1175.977,558 1191.564,531 1207.153,504 1191.564,477 1175.977,450 1144.8,450 1113.623,450 1098.035,477 1082.446,504 1098.035,531 1113.623,558 " + id="polygon47" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1144.8,666 1175.977,666 1191.564,639 1207.153,612 1191.564,585 1175.977,558 1144.8,558 1113.623,558 1098.035,585 1082.446,612 1098.035,639 1113.623,666 " + id="polygon49" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1144.8,666 1175.977,666 1191.564,639 1207.153,612 1191.564,585 1175.977,558 1144.8,558 1113.623,558 1098.035,585 1082.446,612 1098.035,639 1113.623,666 " + id="polygon51" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1238.399,288 1269.576,288 1285.164,261 1300.753,234 1285.164,207 1269.576,180 1238.399,180 1207.223,180 1191.635,207 1176.046,234 1191.635,261 1207.223,288 " + id="polygon53" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1238.399,288 1269.576,288 1285.164,261 1300.753,234 1285.164,207 1269.576,180 1238.399,180 1207.223,180 1191.635,207 1176.046,234 1191.635,261 1207.223,288 " + id="polygon55" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1238.399,396 1269.576,396 1285.164,369 1300.753,342 1285.164,315 1269.576,288 1238.399,288 1207.223,288 1191.635,315 1176.046,342 1191.635,369 1207.223,396 " + id="polygon57" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1238.399,396 1269.576,396 1285.164,369 1300.753,342 1285.164,315 1269.576,288 1238.399,288 1207.223,288 1191.635,315 1176.046,342 1191.635,369 1207.223,396 " + id="polygon59" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1238.399,504 1269.576,504 1285.164,477 1300.753,450 1285.164,423 1269.576,396 1238.399,396 1207.223,396 1191.635,423 1176.046,450 1191.635,477 1207.223,504 " + id="polygon61" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1238.399,504 1269.576,504 1285.164,477 1300.753,450 1285.164,423 1269.576,396 1238.399,396 1207.223,396 1191.635,423 1176.046,450 1191.635,477 1207.223,504 " + id="polygon63" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1238.399,612 1269.576,612 1285.164,585 1300.753,558 1285.164,531 1269.576,504 1238.399,504 1207.223,504 1191.635,531 1176.046,558 1191.635,585 1207.223,612 " + id="polygon65" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1238.399,612 1269.576,612 1285.164,585 1300.753,558 1285.164,531 1269.576,504 1238.399,504 1207.223,504 1191.635,531 1176.046,558 1191.635,585 1207.223,612 " + id="polygon67" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1332,342 1363.176,342 1378.765,315 1394.353,288 1378.765,261 1363.176,234 1332,234 1300.823,234 1285.234,261 1269.646,288 1285.234,315 1300.823,342 " + id="polygon69" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1332,342 1363.176,342 1378.765,315 1394.353,288 1378.765,261 1363.176,234 1332,234 1300.823,234 1285.234,261 1269.646,288 1285.234,315 1300.823,342 " + id="polygon71" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1332,450 1363.176,450 1378.765,423 1394.353,396 1378.765,369 1363.176,342 1332,342 1300.823,342 1285.234,369 1269.646,396 1285.234,423 1300.823,450 " + id="polygon73" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1332,450 1363.176,450 1378.765,423 1394.353,396 1378.765,369 1363.176,342 1332,342 1300.823,342 1285.234,369 1269.646,396 1285.234,423 1300.823,450 " + id="polygon75" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1425.6,396 1456.776,396 1472.364,369 1487.953,342 1472.364,315 1456.776,288 1425.6,288 1394.423,288 1378.835,315 1363.246,342 1378.835,369 1394.423,396 " + id="polygon77" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1425.6,396 1456.776,396 1472.364,369 1487.953,342 1472.364,315 1456.776,288 1425.6,288 1394.423,288 1378.835,315 1363.246,342 1378.835,369 1394.423,396 " + id="polygon79" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1332,558 1363.176,558 1378.765,531 1394.353,504 1378.765,477 1363.176,450 1332,450 1300.823,450 1285.234,477 1269.646,504 1285.234,531 1300.823,558 " + id="polygon81" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1332,558 1363.176,558 1378.765,531 1394.353,504 1378.765,477 1363.176,450 1332,450 1300.823,450 1285.234,477 1269.646,504 1285.234,531 1300.823,558 " + id="polygon83" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1332,666 1363.176,666 1378.765,639 1394.353,612 1378.765,585 1363.176,558 1332,558 1300.823,558 1285.234,585 1269.646,612 1285.234,639 1300.823,666 " + id="polygon85" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1332,666 1363.176,666 1378.765,639 1394.353,612 1378.765,585 1363.176,558 1332,558 1300.823,558 1285.234,585 1269.646,612 1285.234,639 1300.823,666 " + id="polygon87" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1425.6,504 1456.776,504 1472.364,477 1487.953,450 1472.364,423 1456.776,396 1425.6,396 1394.423,396 1378.835,423 1363.246,450 1378.835,477 1394.423,504 " + id="polygon89" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1425.6,504 1456.776,504 1472.364,477 1487.953,450 1472.364,423 1456.776,396 1425.6,396 1394.423,396 1378.835,423 1363.246,450 1378.835,477 1394.423,504 " + id="polygon91" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1425.6,612 1456.776,612 1472.364,585 1487.953,558 1472.364,531 1456.776,504 1425.6,504 1394.423,504 1378.835,531 1363.246,558 1378.835,585 1394.423,612 " + id="polygon93" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1425.6,612 1456.776,612 1472.364,585 1487.953,558 1472.364,531 1456.776,504 1425.6,504 1394.423,504 1378.835,531 1363.246,558 1378.835,585 1394.423,612 " + id="polygon95" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1519.199,342 1550.376,342 1565.965,315 1581.553,288 1565.965,261 1550.376,234 1519.199,234 1488.023,234 1472.435,261 1456.846,288 1472.435,315 1488.023,342 " + id="polygon97" + style="fill:#ff0000;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1519.199,342 1550.376,342 1565.965,315 1581.553,288 1565.965,261 1550.376,234 1519.199,234 1488.023,234 1472.435,261 1456.846,288 1472.435,315 1488.023,342 " + id="polygon99" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1051.199,504 1082.376,504 1097.965,477 1113.553,450 1097.965,423 1082.376,396 1051.199,396 1020.023,396 1004.435,423 988.846,450 1004.435,477 1020.023,504 " + id="polygon101" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1051.199,504 1082.376,504 1097.965,477 1113.553,450 1097.965,423 1082.376,396 1051.199,396 1020.023,396 1004.435,423 988.846,450 1004.435,477 1020.023,504 " + id="polygon103" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="1051.199,612 1082.376,612 1097.965,585 1113.553,558 1097.965,531 1082.376,504 1051.199,504 1020.023,504 1004.435,531 988.846,558 1004.435,585 1020.023,612 " + id="polygon105" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="1051.199,612 1082.376,612 1097.965,585 1113.553,558 1097.965,531 1082.376,504 1051.199,504 1020.023,504 1004.435,531 988.846,558 1004.435,585 1020.023,612 " + id="polygon107" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="957.6,342 988.776,342 1004.364,315 1019.952,288 1004.364,261 988.776,234 957.6,234 926.423,234 910.835,261 895.246,288 910.835,315 926.423,342 " + id="polygon109" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="957.6,342 988.776,342 1004.364,315 1019.952,288 1004.364,261 988.776,234 957.6,234 926.423,234 910.835,261 895.246,288 910.835,315 926.423,342 " + id="polygon111" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="957.6,450 988.776,450 1004.364,423 1019.952,396 1004.364,369 988.776,342 957.6,342 926.423,342 910.835,369 895.246,396 910.835,423 926.423,450 " + id="polygon113" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="957.6,450 988.776,450 1004.364,423 1019.952,396 1004.364,369 988.776,342 957.6,342 926.423,342 910.835,369 895.246,396 910.835,423 926.423,450 " + id="polygon115" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="957.6,558 988.776,558 1004.364,531 1019.952,504 1004.364,477 988.776,450 957.6,450 926.423,450 910.835,477 895.246,504 910.835,531 926.423,558 " + id="polygon117" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="957.6,558 988.776,558 1004.364,531 1019.952,504 1004.364,477 988.776,450 957.6,450 926.423,450 910.835,477 895.246,504 910.835,531 926.423,558 " + id="polygon119" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="957.6,666 988.776,666 1004.364,639 1019.952,612 1004.364,585 988.776,558 957.6,558 926.423,558 910.835,585 895.246,612 910.835,639 926.423,666 " + id="polygon121" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="957.6,666 988.776,666 1004.364,639 1019.952,612 1004.364,585 988.776,558 957.6,558 926.423,558 910.835,585 895.246,612 910.835,639 926.423,666 " + id="polygon123" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,288 895.176,288 910.764,261 926.353,234 910.764,207 895.176,180 863.999,180 832.823,180 817.234,207 801.646,234 817.234,261 832.823,288 " + id="polygon125" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,288 895.176,288 910.764,261 926.353,234 910.764,207 895.176,180 863.999,180 832.823,180 817.234,207 801.646,234 817.234,261 832.823,288 " + id="polygon127" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,180 895.176,180 910.764,153 926.353,126 910.764,99 895.176,72 863.999,72 832.823,72 817.234,99 801.646,126 817.234,153 832.823,180 " + id="polygon129" + style="fill:#ff0000;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,180 895.176,180 910.764,153 926.353,126 910.764,99 895.176,72 863.999,72 832.823,72 817.234,99 801.646,126 817.234,153 832.823,180 " + id="polygon131" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,396 895.176,396 910.764,369 926.353,342 910.764,315 895.176,288 863.999,288 832.823,288 817.234,315 801.646,342 817.234,369 832.823,396 " + id="polygon133" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,396 895.176,396 910.764,369 926.353,342 910.764,315 895.176,288 863.999,288 832.823,288 817.234,315 801.646,342 817.234,369 832.823,396 " + id="polygon135" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,504 895.176,504 910.764,477 926.353,450 910.764,423 895.176,396 863.999,396 832.823,396 817.234,423 801.646,450 817.234,477 832.823,504 " + id="polygon137" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,504 895.176,504 910.764,477 926.353,450 910.764,423 895.176,396 863.999,396 832.823,396 817.234,423 801.646,450 817.234,477 832.823,504 " + id="polygon139" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,612 895.176,612 910.764,585 926.353,558 910.764,531 895.176,504 863.999,504 832.823,504 817.234,531 801.646,558 817.234,585 832.823,612 " + id="polygon141" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,612 895.176,612 910.764,585 926.353,558 910.764,531 895.176,504 863.999,504 832.823,504 817.234,531 801.646,558 817.234,585 832.823,612 " + id="polygon143" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="396,450 427.177,450 442.765,423 458.353,396 442.765,369 427.177,342 396,342 364.823,342 349.235,369 333.646,396 349.235,423 364.823,450 " + id="polygon145" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="396,450 427.177,450 442.765,423 458.353,396 442.765,369 427.177,342 396,342 364.823,342 349.235,369 333.646,396 349.235,423 364.823,450 " + id="polygon147" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="396,666 427.177,666 442.765,639 458.353,612 442.765,585 427.177,558 396,558 364.823,558 349.235,585 333.646,612 349.235,639 364.823,666 " + id="polygon149" + style="fill:#ccffcc;fill-rule:evenodd" /> + + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="396,666 427.177,666 442.765,639 458.353,612 442.765,585 427.177,558 396,558 364.823,558 349.235,585 333.646,612 349.235,639 364.823,666 " + id="polygon151" + style="fill:none;stroke:#999999;stroke-width:7.99989986;stroke-miterlimit:2.61310005;stroke-dasharray:8, 8" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="489.6,288 520.776,288 536.365,261 551.953,234 536.365,207 520.776,180 489.6,180 458.423,180 442.835,207 427.246,234 442.835,261 458.423,288 " + id="polygon153" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="489.6,288 520.776,288 536.365,261 551.953,234 536.365,207 520.776,180 489.6,180 458.423,180 442.835,207 427.246,234 442.835,261 458.423,288 " + id="polygon155" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="489.6,396 520.776,396 536.365,369 551.953,342 536.365,315 520.776,288 489.6,288 458.423,288 442.835,315 427.246,342 442.835,369 458.423,396 " + id="polygon157" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="489.6,396 520.776,396 536.365,369 551.953,342 536.365,315 520.776,288 489.6,288 458.423,288 442.835,315 427.246,342 442.835,369 458.423,396 " + id="polygon159" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="489.6,612 520.776,612 536.365,585 551.953,558 536.365,531 520.776,504 489.6,504 458.423,504 442.835,531 427.246,558 442.835,585 458.423,612 " + id="polygon161" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="489.6,612 520.776,612 536.365,585 551.953,558 536.365,531 520.776,504 489.6,504 458.423,504 442.835,531 427.246,558 442.835,585 458.423,612 " + id="polygon163" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,342 614.376,342 629.965,315 645.553,288 629.965,261 614.376,234 583.2,234 552.023,234 536.435,261 520.846,288 536.435,315 552.023,342 " + id="polygon165" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,342 614.376,342 629.965,315 645.553,288 629.965,261 614.376,234 583.2,234 552.023,234 536.435,261 520.846,288 536.435,315 552.023,342 " + id="polygon167" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,234 614.376,234 629.965,207 645.553,180 629.965,153 614.376,126 583.2,126 552.023,126 536.435,153 520.846,180 536.435,207 552.023,234 " + id="polygon169" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,234 614.376,234 629.965,207 645.553,180 629.965,153 614.376,126 583.2,126 552.023,126 536.435,153 520.846,180 536.435,207 552.023,234 " + id="polygon171" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,126 614.376,126 629.965,99 645.553,72 629.965,45 614.376,18 583.2,18 552.023,18 536.435,45 520.846,72 536.435,99 552.023,126 " + id="polygon173" + style="fill:#00ccff;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,126 614.376,126 629.965,99 645.553,72 629.965,45 614.376,18 583.2,18 552.023,18 536.435,45 520.846,72 536.435,99 552.023,126 " + id="polygon175" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,450 614.376,450 629.965,423 645.553,396 629.965,369 614.376,342 583.2,342 552.023,342 536.435,369 520.846,396 536.435,423 552.023,450 " + id="polygon177" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,450 614.376,450 629.965,423 645.553,396 629.965,369 614.376,342 583.2,342 552.023,342 536.435,369 520.846,396 536.435,423 552.023,450 " + id="polygon179" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,558 614.376,558 629.965,531 645.553,504 629.965,477 614.376,450 583.2,450 552.023,450 536.435,477 520.846,504 536.435,531 552.023,558 " + id="polygon181" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,558 614.376,558 629.965,531 645.553,504 629.965,477 614.376,450 583.2,450 552.023,450 536.435,477 520.846,504 536.435,531 552.023,558 " + id="polygon183" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,666 614.376,666 629.965,639 645.553,612 629.965,585 614.376,558 583.2,558 552.023,558 536.435,585 520.846,612 536.435,639 552.023,666 " + id="polygon185" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,666 614.376,666 629.965,639 645.553,612 629.965,585 614.376,558 583.2,558 552.023,558 536.435,585 520.846,612 536.435,639 552.023,666 " + id="polygon187" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="676.8,396 707.977,396 723.565,369 739.153,342 723.565,315 707.977,288 676.8,288 645.624,288 630.035,315 614.446,342 630.035,369 645.624,396 " + id="polygon189" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="676.8,396 707.977,396 723.565,369 739.153,342 723.565,315 707.977,288 676.8,288 645.624,288 630.035,315 614.446,342 630.035,369 645.624,396 " + id="polygon191" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="676.8,288 707.977,288 723.565,261 739.153,234 723.565,207 707.977,180 676.8,180 645.624,180 630.035,207 614.446,234 630.035,261 645.624,288 " + id="polygon193" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="676.8,288 707.977,288 723.565,261 739.153,234 723.565,207 707.977,180 676.8,180 645.624,180 630.035,207 614.446,234 630.035,261 645.624,288 " + id="polygon195" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="676.8,504 707.977,504 723.565,477 739.153,450 723.565,423 707.977,396 676.8,396 645.624,396 630.035,423 614.446,450 630.035,477 645.624,504 " + id="polygon197" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="676.8,504 707.977,504 723.565,477 739.153,450 723.565,423 707.977,396 676.8,396 645.624,396 630.035,423 614.446,450 630.035,477 645.624,504 " + id="polygon199" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="676.8,612 707.977,612 723.565,585 739.153,558 723.565,531 707.977,504 676.8,504 645.624,504 630.035,531 614.446,558 630.035,585 645.624,612 " + id="polygon201" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="676.8,612 707.977,612 723.565,585 739.153,558 723.565,531 707.977,504 676.8,504 645.624,504 630.035,531 614.446,558 630.035,585 645.624,612 " + id="polygon203" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="770.4,450 801.577,450 817.165,423 832.753,396 817.165,369 801.577,342 770.4,342 739.224,342 723.635,369 708.046,396 723.635,423 739.224,450 " + id="polygon205" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,450 801.577,450 817.165,423 832.753,396 817.165,369 801.577,342 770.4,342 739.224,342 723.635,369 708.046,396 723.635,423 739.224,450 " + id="polygon207" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="770.4,342 801.577,342 817.165,315 832.753,288 817.165,261 801.577,234 770.4,234 739.224,234 723.635,261 708.046,288 723.635,315 739.224,342 " + id="polygon209" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,342 801.577,342 817.165,315 832.753,288 817.165,261 801.577,234 770.4,234 739.224,234 723.635,261 708.046,288 723.635,315 739.224,342 " + id="polygon211" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="770.4,234 801.577,234 817.165,207 832.753,180 817.165,153 801.577,126 770.4,126 739.224,126 723.635,153 708.046,180 723.635,207 739.224,234 " + id="polygon213" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,234 801.577,234 817.165,207 832.753,180 817.165,153 801.577,126 770.4,126 739.224,126 723.635,153 708.046,180 723.635,207 739.224,234 " + id="polygon215" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="770.4,558 801.577,558 817.165,531 832.753,504 817.165,477 801.577,450 770.4,450 739.224,450 723.635,477 708.046,504 723.635,531 739.224,558 " + id="polygon217" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,558 801.577,558 817.165,531 832.753,504 817.165,477 801.577,450 770.4,450 739.224,450 723.635,477 708.046,504 723.635,531 739.224,558 " + id="polygon219" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="770.4,666 801.577,666 817.165,639 832.753,612 817.165,585 801.577,558 770.4,558 739.224,558 723.635,585 708.046,612 723.635,639 739.224,666 " + id="polygon221" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,666 801.577,666 817.165,639 832.753,612 817.165,585 801.577,558 770.4,558 739.224,558 723.635,585 708.046,612 723.635,639 739.224,666 " + id="polygon223" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="302.4,396 333.577,396 349.165,369 364.753,342 349.165,315 333.577,288 302.4,288 271.224,288 255.635,315 240.046,342 255.635,369 271.224,396 " + id="polygon225" + style="fill:#ff0000;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="302.4,396 333.577,396 349.165,369 364.753,342 349.165,315 333.577,288 302.4,288 271.224,288 255.635,315 240.046,342 255.635,369 271.224,396 " + id="polygon227" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="302.4,504 333.577,504 349.165,477 364.753,450 349.165,423 333.577,396 302.4,396 271.224,396 255.635,423 240.046,450 255.635,477 271.224,504 " + id="polygon229" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="302.4,504 333.577,504 349.165,477 364.753,450 349.165,423 333.577,396 302.4,396 271.224,396 255.635,423 240.046,450 255.635,477 271.224,504 " + id="polygon231" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,936 895.176,936 910.764,909 926.353,882 910.764,855 895.176,828 863.999,828 832.823,828 817.234,855 801.646,882 817.234,909 832.823,936 " + id="polygon233" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,936 895.176,936 910.764,909 926.353,882 910.764,855 895.176,828 863.999,828 832.823,828 817.234,855 801.646,882 817.234,909 832.823,936 " + id="polygon235" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,828 895.176,828 910.764,801 926.353,774 910.764,747 895.176,720 863.999,720 832.823,720 817.234,747 801.646,774 817.234,801 832.823,828 " + id="polygon237" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,828 895.176,828 910.764,801 926.353,774 910.764,747 895.176,720 863.999,720 832.823,720 817.234,747 801.646,774 817.234,801 832.823,828 " + id="polygon239" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,1044 895.176,1044 910.764,1017 926.353,990 910.764,963 895.176,936 863.999,936 832.823,936 817.234,963 801.646,990 817.234,1017 832.823,1044 " + id="polygon241" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,1044 895.176,1044 910.764,1017 926.353,990 910.764,963 895.176,936 863.999,936 832.823,936 817.234,963 801.646,990 817.234,1017 832.823,1044 " + id="polygon243" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,1152 895.176,1152 910.764,1125 926.353,1098 910.764,1071 895.176,1044 863.999,1044 832.823,1044 817.234,1071 801.646,1098 817.234,1125 832.823,1152 " + id="polygon245" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,1152 895.176,1152 910.764,1125 926.353,1098 910.764,1071 895.176,1044 863.999,1044 832.823,1044 817.234,1071 801.646,1098 817.234,1125 832.823,1152 " + id="polygon247" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,1260 895.176,1260 910.764,1233 926.353,1206 910.764,1179 895.176,1152 863.999,1152 832.823,1152 817.234,1179 801.646,1206 817.234,1233 832.823,1260 " + id="polygon249" + style="fill:#ff0000;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,1260 895.176,1260 910.764,1233 926.353,1206 910.764,1179 895.176,1152 863.999,1152 832.823,1152 817.234,1179 801.646,1206 817.234,1233 832.823,1260 " + id="polygon251" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="863.999,720 895.176,720 910.764,693 926.353,666 910.764,639 895.176,612 863.999,612 832.823,612 817.234,639 801.646,666 817.234,693 832.823,720 " + id="polygon253" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="863.999,720 895.176,720 910.764,693 926.353,666 910.764,639 895.176,612 863.999,612 832.823,612 817.234,639 801.646,666 817.234,693 832.823,720 " + id="polygon255" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="396,882 427.177,882 442.765,855 458.353,828 442.765,801 427.177,774 396,774 364.823,774 349.235,801 333.646,828 349.235,855 364.823,882 " + id="polygon257" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="396,882 427.177,882 442.765,855 458.353,828 442.765,801 427.177,774 396,774 364.823,774 349.235,801 333.646,828 349.235,855 364.823,882 " + id="polygon259" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="396,774 427.177,774 442.765,747 458.353,720 442.765,693 427.177,666 396,666 364.823,666 349.235,693 333.646,720 349.235,747 364.823,774 " + id="polygon261" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="396,774 427.177,774 442.765,747 458.353,720 442.765,693 427.177,666 396,666 364.823,666 349.235,693 333.646,720 349.235,747 364.823,774 " + id="polygon263" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="396,990 427.177,990 442.765,963 458.353,936 442.765,909 427.177,882 396,882 364.823,882 349.235,909 333.646,936 349.235,963 364.823,990 " + id="polygon265" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="396,990 427.177,990 442.765,963 458.353,936 442.765,909 427.177,882 396,882 364.823,882 349.235,909 333.646,936 349.235,963 364.823,990 " + id="polygon267" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="302.4,1044 333.577,1044 349.165,1017 364.753,990 349.165,963 333.577,936 302.4,936 271.224,936 255.635,963 240.046,990 255.635,1017 271.224,1044 " + id="polygon269" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="302.4,1044 333.577,1044 349.165,1017 364.753,990 349.165,963 333.577,936 302.4,936 271.224,936 255.635,963 240.046,990 255.635,1017 271.224,1044 " + id="polygon271" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="302.4,1152 333.577,1152 349.165,1125 364.753,1098 349.165,1071 333.577,1044 302.4,1044 271.224,1044 255.635,1071 240.046,1098 255.635,1125 271.224,1152 " + id="polygon273" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="302.4,1152 333.577,1152 349.165,1125 364.753,1098 349.165,1071 333.577,1044 302.4,1044 271.224,1044 255.635,1071 240.046,1098 255.635,1125 271.224,1152 " + id="polygon275" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="396,1098 427.177,1098 442.765,1071 458.353,1044 442.765,1017 427.177,990 396,990 364.823,990 349.235,1017 333.646,1044 349.235,1071 364.823,1098 " + id="polygon277" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="396,1098 427.177,1098 442.765,1071 458.353,1044 442.765,1017 427.177,990 396,990 364.823,990 349.235,1017 333.646,1044 349.235,1071 364.823,1098 " + id="polygon279" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="396,1206 427.177,1206 442.765,1179 458.353,1152 442.765,1125 427.177,1098 396,1098 364.823,1098 349.235,1125 333.646,1152 349.235,1179 364.823,1206 " + id="polygon281" + style="fill:#00ccff;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="396,1206 427.177,1206 442.765,1179 458.353,1152 442.765,1125 427.177,1098 396,1098 364.823,1098 349.235,1125 333.646,1152 349.235,1179 364.823,1206 " + id="polygon283" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="489.6,936 520.776,936 536.365,909 551.953,882 536.365,855 520.776,828 489.6,828 458.423,828 442.835,855 427.246,882 442.835,909 458.423,936 " + id="polygon285" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="489.6,936 520.776,936 536.365,909 551.953,882 536.365,855 520.776,828 489.6,828 458.423,828 442.835,855 427.246,882 442.835,909 458.423,936 " + id="polygon287" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="489.6,828 520.776,828 536.365,801 551.953,774 536.365,747 520.776,720 489.6,720 458.423,720 442.835,747 427.246,774 442.835,801 458.423,828 " + id="polygon289" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="489.6,828 520.776,828 536.365,801 551.953,774 536.365,747 520.776,720 489.6,720 458.423,720 442.835,747 427.246,774 442.835,801 458.423,828 " + id="polygon291" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="489.6,1044 520.776,1044 536.365,1017 551.953,990 536.365,963 520.776,936 489.6,936 458.423,936 442.835,963 427.246,990 442.835,1017 458.423,1044 " + id="polygon293" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="489.6,1044 520.776,1044 536.365,1017 551.953,990 536.365,963 520.776,936 489.6,936 458.423,936 442.835,963 427.246,990 442.835,1017 458.423,1044 " + id="polygon295" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="489.6,1152 520.776,1152 536.365,1125 551.953,1098 536.365,1071 520.776,1044 489.6,1044 458.423,1044 442.835,1071 427.246,1098 442.835,1125 458.423,1152 " + id="polygon297" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="489.6,1152 520.776,1152 536.365,1125 551.953,1098 536.365,1071 520.776,1044 489.6,1044 458.423,1044 442.835,1071 427.246,1098 442.835,1125 458.423,1152 " + id="polygon299" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="489.6,720 520.776,720 536.365,693 551.953,666 536.365,639 520.776,612 489.6,612 458.423,612 442.835,639 427.246,666 442.835,693 458.423,720 " + id="polygon301" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="489.6,720 520.776,720 536.365,693 551.953,666 536.365,639 520.776,612 489.6,612 458.423,612 442.835,639 427.246,666 442.835,693 458.423,720 " + id="polygon303" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,990 614.376,990 629.965,963 645.553,936 629.965,909 614.376,882 583.2,882 552.023,882 536.435,909 520.846,936 536.435,963 552.023,990 " + id="polygon305" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,990 614.376,990 629.965,963 645.553,936 629.965,909 614.376,882 583.2,882 552.023,882 536.435,909 520.846,936 536.435,963 552.023,990 " + id="polygon307" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,882 614.376,882 629.965,855 645.553,828 629.965,801 614.376,774 583.2,774 552.023,774 536.435,801 520.846,828 536.435,855 552.023,882 " + id="polygon309" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,882 614.376,882 629.965,855 645.553,828 629.965,801 614.376,774 583.2,774 552.023,774 536.435,801 520.846,828 536.435,855 552.023,882 " + id="polygon311" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,774 614.376,774 629.965,747 645.553,720 629.965,693 614.376,666 583.2,666 552.023,666 536.435,693 520.846,720 536.435,747 552.023,774 " + id="polygon313" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,774 614.376,774 629.965,747 645.553,720 629.965,693 614.376,666 583.2,666 552.023,666 536.435,693 520.846,720 536.435,747 552.023,774 " + id="polygon315" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,1098 614.376,1098 629.965,1071 645.553,1044 629.965,1017 614.376,990 583.2,990 552.023,990 536.435,1017 520.846,1044 536.435,1071 552.023,1098 " + id="polygon317" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,1098 614.376,1098 629.965,1071 645.553,1044 629.965,1017 614.376,990 583.2,990 552.023,990 536.435,1017 520.846,1044 536.435,1071 552.023,1098 " + id="polygon319" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="583.2,1206 614.376,1206 629.965,1179 645.553,1152 629.965,1125 614.376,1098 583.2,1098 552.023,1098 536.435,1125 520.846,1152 536.435,1179 552.023,1206 " + id="polygon321" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="583.2,1206 614.376,1206 629.965,1179 645.553,1152 629.965,1125 614.376,1098 583.2,1098 552.023,1098 536.435,1125 520.846,1152 536.435,1179 552.023,1206 " + id="polygon323" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="676.8,1044 707.977,1044 723.565,1017 739.153,990 723.565,963 707.977,936 676.8,936 645.624,936 630.035,963 614.446,990 630.035,1017 645.624,1044 " + id="polygon325" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="676.8,1044 707.977,1044 723.565,1017 739.153,990 723.565,963 707.977,936 676.8,936 645.624,936 630.035,963 614.446,990 630.035,1017 645.624,1044 " + id="polygon327" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="676.8,936 707.977,936 723.565,909 739.153,882 723.565,855 707.977,828 676.8,828 645.624,828 630.035,855 614.446,882 630.035,909 645.624,936 " + id="polygon329" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="676.8,936 707.977,936 723.565,909 739.153,882 723.565,855 707.977,828 676.8,828 645.624,828 630.035,855 614.446,882 630.035,909 645.624,936 " + id="polygon331" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="676.8,828 707.977,828 723.565,801 739.153,774 723.565,747 707.977,720 676.8,720 645.624,720 630.035,747 614.446,774 630.035,801 645.624,828 " + id="polygon333" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="676.8,828 707.977,828 723.565,801 739.153,774 723.565,747 707.977,720 676.8,720 645.624,720 630.035,747 614.446,774 630.035,801 645.624,828 " + id="polygon335" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="676.8,1152 707.977,1152 723.565,1125 739.153,1098 723.565,1071 707.977,1044 676.8,1044 645.624,1044 630.035,1071 614.446,1098 630.035,1125 645.624,1152 " + id="polygon337" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="676.8,1152 707.977,1152 723.565,1125 739.153,1098 723.565,1071 707.977,1044 676.8,1044 645.624,1044 630.035,1071 614.446,1098 630.035,1125 645.624,1152 " + id="polygon339" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="676.8,1260 707.977,1260 723.565,1233 739.153,1206 723.565,1179 707.977,1152 676.8,1152 645.624,1152 630.035,1179 614.446,1206 630.035,1233 645.624,1260 " + id="polygon341" + style="fill:#00ccff;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="676.8,1260 707.977,1260 723.565,1233 739.153,1206 723.565,1179 707.977,1152 676.8,1152 645.624,1152 630.035,1179 614.446,1206 630.035,1233 645.624,1260 " + id="polygon343" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="676.8,720 707.977,720 723.565,693 739.153,666 723.565,639 707.977,612 676.8,612 645.624,612 630.035,639 614.446,666 630.035,693 645.624,720 " + id="polygon345" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="676.8,720 707.977,720 723.565,693 739.153,666 723.565,639 707.977,612 676.8,612 645.624,612 630.035,639 614.446,666 630.035,693 645.624,720 " + id="polygon347" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="770.4,990 801.577,990 817.165,963 832.753,936 817.165,909 801.577,882 770.4,882 739.224,882 723.635,909 708.046,936 723.635,963 739.224,990 " + id="polygon349" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,990 801.577,990 817.165,963 832.753,936 817.165,909 801.577,882 770.4,882 739.224,882 723.635,909 708.046,936 723.635,963 739.224,990 " + id="polygon351" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,1098 801.577,1098 817.165,1071 832.753,1044 817.165,1017 801.577,990 770.4,990 739.224,990 723.635,1017 708.046,1044 723.635,1071 739.224,1098 " + id="polygon353" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,1206 801.577,1206 817.165,1179 832.753,1152 817.165,1125 801.577,1098 770.4,1098 739.224,1098 723.635,1125 708.046,1152 723.635,1179 739.224,1206 " + id="polygon355" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="770.4,882 801.577,882 817.165,855 832.753,828 817.165,801 801.577,774 770.4,774 739.224,774 723.635,801 708.046,828 723.635,855 739.224,882 " + id="polygon357" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,882 801.577,882 817.165,855 832.753,828 817.165,801 801.577,774 770.4,774 739.224,774 723.635,801 708.046,828 723.635,855 739.224,882 " + id="polygon359" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="770.4,774 801.577,774 817.165,747 832.753,720 817.165,693 801.577,666 770.4,666 739.224,666 723.635,693 708.046,720 723.635,747 739.224,774 " + id="polygon361" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="770.4,774 801.577,774 817.165,747 832.753,720 817.165,693 801.577,666 770.4,666 739.224,666 723.635,693 708.046,720 723.635,747 739.224,774 " + id="polygon363" + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-miterlimit:2.61310005" /> + <polygon + clip-path="url(#SVGID_2_)" + clip-rule="evenodd" + points="302.4,720 333.577,720 349.165,693 364.753,666 349.165,639 333.577,612 302.4,612 271.224,612 255.635,639 240.046,666 255.635,693 271.224,720 " + id="polygon365" + style="fill:#ccffcc;fill-rule:evenodd" /> + <polygon + clip-path="url(#SVGID_2_)" + stroke-miterlimit="2.6131" + points="302.4,720 333.577,720 349.165,693 364.753,666 349.165,6... [truncated message content] |
From: <wak...@us...> - 2011-05-23 16:45:02
|
Revision: 1568 http://rails.svn.sourceforge.net/rails/?rev=1568&view=rev Author: wakko666 Date: 2011-05-23 16:44:56 +0000 (Mon, 23 May 2011) Log Message: ----------- Fix classpath in build.xml Modified Paths: -------------- trunk/18xx/build.xml Modified: trunk/18xx/build.xml =================================================================== --- trunk/18xx/build.xml 2011-05-23 16:44:49 UTC (rev 1567) +++ trunk/18xx/build.xml 2011-05-23 16:44:56 UTC (rev 1568) @@ -9,15 +9,19 @@ <property name="debuglevel" value="source,lines,vars"/> <property name="target" value="1.5"/> <property name="source" value="1.5"/> - <property name="version" value="1.4.1"/> + <property name="version" value="1.4.2"/> <taskdef name="jarbundler" classpath="tools/lib/jarbundler-2.1.0.jar" classname="net.sourceforge.jarbundler.JarBundler" /> <path id="18xx.classpath"> <pathelement location="classes"/> <pathelement location="lib/log4j-1.2/log4j-1.2.14.jar"/> - <pathelement location="lib/batik-1.7/batik-rasterizer.jar"/> <pathelement location="lib/batik-1.7/batik.jar"/> + <pathelement location="lib/batik-1.7/lib/batik-dom.jar"/> + <pathelement location="lib/batik-1.7/lib/batik-bridge.jar"/> + <pathelement location="lib/batik-1.7/lib/batik-util.jar"/> + <pathelement location="lib/batik-1.7/lib/batik-gvt.jar"/> + <pathelement location="lib/batik-1.7/lib/batik-ext.jar"/> <pathelement location="lib/jgraph5/jgraph.jar"/> <pathelement location="lib/jgrapht-0.7.3/jgrapht-jdk1.5.jar"/> <pathelement location="lib/junit_3.8.2/junit.jar"/> @@ -107,7 +111,17 @@ <jar destfile="rails-${version}/rails-${version}.jar" basedir="jar" duplicate="preserve"> <manifest> <attribute name="Main-Class" value="rails.util.RunGame" /> - <attribute name="Class-Path" value="./my.properties ./LocalisedText.properties ./lib/log4j-1.2/log4j-1.2.14.jar ./lib/batik-1.6/lib/batik-transcoder.jar ./lib/batik-1.6/batik.jar ./lib/batik-1.6/lib/batik-util.jar ./lib/batik-1.6/lib/batik-script.jar ./lib/batik-1.6/lib/batik-bridge.jar ./lib/batik-1.6/lib/batik-ext.jar ./lib/batik-1.6/lib/batik-awt-util.jar ./lib/batik-1.6/lib/batik-dom.jar ./lib/batik-1.6/lib/batik-gvt.jar ./lib/jgraph5/jgraph.jar ./lib/jgrapht-0.7.3/jgrapht-jdk1.5.jar" /> + <attribute name="Class-Path" value="./my.properties + ./LocalisedText.properties + ./lib/log4j-1.2/log4j-1.2.14.jar + ./lib/batik-1.7/batik.jar + ./lib/batik-1.7/lib/batik-util.jar + ./lib/batik-1.7/lib/batik-dom.jar + ./lib/batik-1.7/lib/batik-bridge.jar + ./lib/batik-1.7/lib/batik-ext.jar + ./lib/batik-1.7/lib/batik-gvt.jar + ./lib/jgraph5/jgraph.jar + ./lib/jgrapht-0.7.3/jgrapht-jdk1.5.jar" /> </manifest> </jar> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wak...@us...> - 2011-05-23 16:44:56
|
Revision: 1567 http://rails.svn.sourceforge.net/rails/?rev=1567&view=rev Author: wakko666 Date: 2011-05-23 16:44:49 +0000 (Mon, 23 May 2011) Log Message: ----------- Fix classpath in build.xml Modified Paths: -------------- tags/rails_1_4_2/18xx/build.xml Modified: tags/rails_1_4_2/18xx/build.xml =================================================================== --- tags/rails_1_4_2/18xx/build.xml 2011-05-22 21:01:26 UTC (rev 1566) +++ tags/rails_1_4_2/18xx/build.xml 2011-05-23 16:44:49 UTC (rev 1567) @@ -16,8 +16,12 @@ <path id="18xx.classpath"> <pathelement location="classes"/> <pathelement location="lib/log4j-1.2/log4j-1.2.14.jar"/> - <pathelement location="lib/batik-1.7/batik-rasterizer.jar"/> <pathelement location="lib/batik-1.7/batik.jar"/> + <pathelement location="lib/batik-1.7/lib/batik-dom.jar"/> + <pathelement location="lib/batik-1.7/lib/batik-bridge.jar"/> + <pathelement location="lib/batik-1.7/lib/batik-util.jar"/> + <pathelement location="lib/batik-1.7/lib/batik-gvt.jar"/> + <pathelement location="lib/batik-1.7/lib/batik-ext.jar"/> <pathelement location="lib/jgraph5/jgraph.jar"/> <pathelement location="lib/jgrapht-0.7.3/jgrapht-jdk1.5.jar"/> <pathelement location="lib/junit_3.8.2/junit.jar"/> @@ -107,7 +111,17 @@ <jar destfile="rails-${version}/rails-${version}.jar" basedir="jar" duplicate="preserve"> <manifest> <attribute name="Main-Class" value="rails.util.RunGame" /> - <attribute name="Class-Path" value="./my.properties ./LocalisedText.properties ./lib/log4j-1.2/log4j-1.2.14.jar ./lib/batik-1.6/lib/batik-transcoder.jar ./lib/batik-1.6/batik.jar ./lib/batik-1.6/lib/batik-util.jar ./lib/batik-1.6/lib/batik-script.jar ./lib/batik-1.6/lib/batik-bridge.jar ./lib/batik-1.6/lib/batik-ext.jar ./lib/batik-1.6/lib/batik-awt-util.jar ./lib/batik-1.6/lib/batik-dom.jar ./lib/batik-1.6/lib/batik-gvt.jar ./lib/jgraph5/jgraph.jar ./lib/jgrapht-0.7.3/jgrapht-jdk1.5.jar" /> + <attribute name="Class-Path" value="./my.properties + ./LocalisedText.properties + ./lib/log4j-1.2/log4j-1.2.14.jar + ./lib/batik-1.7/batik.jar + ./lib/batik-1.7/lib/batik-util.jar + ./lib/batik-1.7/lib/batik-dom.jar + ./lib/batik-1.7/lib/batik-bridge.jar + ./lib/batik-1.7/lib/batik-ext.jar + ./lib/batik-1.7/lib/batik-gvt.jar + ./lib/jgraph5/jgraph.jar + ./lib/jgrapht-0.7.3/jgrapht-jdk1.5.jar" /> </manifest> </jar> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wak...@us...> - 2011-05-22 21:01:31
|
Revision: 1566 http://rails.svn.sourceforge.net/rails/?rev=1566&view=rev Author: wakko666 Date: 2011-05-22 21:01:26 +0000 (Sun, 22 May 2011) Log Message: ----------- Bump version number Modified Paths: -------------- tags/rails_1_4_2/18xx/build.xml Modified: tags/rails_1_4_2/18xx/build.xml =================================================================== --- tags/rails_1_4_2/18xx/build.xml 2011-05-22 20:57:54 UTC (rev 1565) +++ tags/rails_1_4_2/18xx/build.xml 2011-05-22 21:01:26 UTC (rev 1566) @@ -9,7 +9,7 @@ <property name="debuglevel" value="source,lines,vars"/> <property name="target" value="1.5"/> <property name="source" value="1.5"/> - <property name="version" value="1.4.1"/> + <property name="version" value="1.4.2"/> <taskdef name="jarbundler" classpath="tools/lib/jarbundler-2.1.0.jar" classname="net.sourceforge.jarbundler.JarBundler" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wak...@us...> - 2011-05-22 20:58:00
|
Revision: 1565 http://rails.svn.sourceforge.net/rails/?rev=1565&view=rev Author: wakko666 Date: 2011-05-22 20:57:54 +0000 (Sun, 22 May 2011) Log Message: ----------- Bump version number Modified Paths: -------------- tags/rails_1_4_2/18xx/rails/game/Game.java tags/rails_1_4_2/18xx/rails.bat tags/rails_1_4_2/18xx/rails.sh Modified: tags/rails_1_4_2/18xx/rails/game/Game.java =================================================================== --- tags/rails_1_4_2/18xx/rails/game/Game.java 2011-05-22 14:45:45 UTC (rev 1564) +++ tags/rails_1_4_2/18xx/rails/game/Game.java 2011-05-22 20:57:54 UTC (rev 1565) @@ -13,7 +13,7 @@ import rails.util.Tag; public class Game { - public static final String version = "1.4.1+"; + public static final String version = "1.4.2"; /** The component Manager */ protected ComponentManager componentManager; Modified: tags/rails_1_4_2/18xx/rails.bat =================================================================== (Binary files differ) Modified: tags/rails_1_4_2/18xx/rails.sh =================================================================== --- tags/rails_1_4_2/18xx/rails.sh 2011-05-22 14:45:45 UTC (rev 1564) +++ tags/rails_1_4_2/18xx/rails.sh 2011-05-22 20:57:54 UTC (rev 1565) @@ -1,3 +1,3 @@ #!/bin/bash -java -jar ./rails-1.4.1.jar $1 \ No newline at end of file +java -jar ./rails-1.4.2.jar $1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-05-22 14:45:51
|
Revision: 1564 http://rails.svn.sourceforge.net/rails/?rev=1564&view=rev Author: evos Date: 2011-05-22 14:45:45 +0000 (Sun, 22 May 2011) Log Message: ----------- Added 'quantityIncrement' attribute to <Train>. Not used yet, but may be useful for 1825 kits. Added comments to 1830/Game.xml and 1830/TileSet.xml to indicate the option to use this new attribute. Modified Paths: -------------- trunk/18xx/data/1830/Game.xml trunk/18xx/data/1830/TileSet.xml trunk/18xx/rails/game/TrainType.java Modified: trunk/18xx/data/1830/Game.xml =================================================================== --- trunk/18xx/data/1830/Game.xml 2011-05-21 10:40:43 UTC (rev 1563) +++ trunk/18xx/data/1830/Game.xml 2011-05-22 14:45:45 UTC (rev 1564) @@ -136,6 +136,8 @@ </IfOption> <IfOption name="Variant" value="Wabash"> <Attributes quantity="7"/> + <!-- NOTE: An alternative way to configure an extra train is: quantityIncrement="+1" + (the '+' is optional) --> </IfOption> </Train> <Train name="3" majorStops="3" cost="180" quantity="5" startPhase="3"> Modified: trunk/18xx/data/1830/TileSet.xml =================================================================== --- trunk/18xx/data/1830/TileSet.xml 2011-05-21 10:40:43 UTC (rev 1563) +++ trunk/18xx/data/1830/TileSet.xml 2011-05-22 14:45:45 UTC (rev 1564) @@ -111,6 +111,8 @@ <Tile id="15" quantity="2"> <IfOption name="Variant" value="Coalfields,Coalfields&Reading,Wabash"> <Attributes quantity="3"/> + <!-- NOTE: An alternative way to configure an extra tile is: quantityIncrement="+1" + (the '+' is optional) --> </IfOption> <IfOption name="Variant" value="Wabash"> <Upgrade id="63,448"/> Modified: trunk/18xx/rails/game/TrainType.java =================================================================== --- trunk/18xx/rails/game/TrainType.java 2011-05-21 10:40:43 UTC (rev 1563) +++ trunk/18xx/rails/game/TrainType.java 2011-05-22 14:45:45 UTC (rev 1564) @@ -123,6 +123,8 @@ } else if (quantity <= 0) { throw new ConfigurationException( LocalText.getText("InvalidQuantity", String.valueOf(quantity))); + } else { + quantity += tag.getAttributeAsInteger("quantityIncrement", 0); } // Major stops This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-05-21 10:40:50
|
Revision: 1563 http://rails.svn.sourceforge.net/rails/?rev=1563&view=rev Author: evos Date: 2011-05-21 10:40:43 +0000 (Sat, 21 May 2011) Log Message: ----------- Added some Javadoc to Tile.java. Added 'quantityIncrement' attribute to <Tile>. Not used yet, but may be useful for 1825 kits. Integer values may now be prefixed with a '+' sign (which is stripped before parsing by Java). May be helpful with increment values. Modified Paths: -------------- trunk/18xx/rails/game/MapHex.java trunk/18xx/rails/game/Tile.java trunk/18xx/rails/game/TileI.java trunk/18xx/rails/util/Tag.java Modified: trunk/18xx/rails/game/MapHex.java =================================================================== --- trunk/18xx/rails/game/MapHex.java 2011-05-19 12:13:55 UTC (rev 1562) +++ trunk/18xx/rails/game/MapHex.java 2011-05-21 10:40:43 UTC (rev 1563) @@ -804,7 +804,7 @@ + "/" + currentTileRotation + " by " + newTile.getId() + "/" + newTileOrientation); - newTile.lay(this); + newTile.add(this); currentTile = newTile; currentTileRotation = newTileOrientation; Modified: trunk/18xx/rails/game/Tile.java =================================================================== --- trunk/18xx/rails/game/Tile.java 2011-05-19 12:13:55 UTC (rev 1562) +++ trunk/18xx/rails/game/Tile.java 2011-05-21 10:40:43 UTC (rev 1563) @@ -10,6 +10,12 @@ import rails.util.LocalText; import rails.util.Tag; +/** Represents a certain tile <i>type</i>, identified by its id (tile number). + * <p> For each tile number, only one tile object is created. + * The list <b>tilesLaid</b> records in which hexes a certain tile number has been laid. + * @author Erik + * + */ public class Tile extends ModelObject implements TileI, StationHolder, Comparable<TileI> { /** The 'internal id', identifying the tile in the XML files */ @@ -82,6 +88,10 @@ protected static final int TILE_NUMBER_OFFSET = 2; + /** Records in which hexes a certain tile number has been laid. + * The length of this list indicates the number of tiles laid on the map board. + * <p>As this list is not a State object, it must only be updated via the TileMove execute() and undo() methods. + */ private final ArrayList<MapHex> tilesLaid = new ArrayList<MapHex>(); /** Storage of revenueBonus that are bound to the tile */ @@ -204,12 +214,18 @@ externalId = setTag.getAttributeAsString("extId", externalId); /* Picture id */ pictureId = setTag.getAttributeAsInteger("pic", pictureId); + /* Quantity */ quantity = setTag.getAttributeAsInteger("quantity", 0); /* Value '99' and '-1' mean 'unlimited' */ unlimited = (quantity == 99 || quantity == UNLIMITED_TILES || "yes".equalsIgnoreCase(setTag.getGameOptions().get("UnlimitedTiles"))); - if (unlimited) quantity = UNLIMITED_TILES; + if (unlimited) { + quantity = UNLIMITED_TILES; + } else { + quantity += setTag.getAttributeAsInteger("quantityIncrement", 0); + } + /* Multiple base tokens of one company allowed */ allowsMultipleBasesOfOneCompany = setTag.hasChild( "AllowsMultipleBasesOfOneCompany"); @@ -467,16 +483,17 @@ return relayBaseTokensOnUpgrade; } - public boolean lay(MapHex hex) { - + /** Register a tile of this type being laid on the map. + * This method may only be called via the TileMove execute() and undo() methods. */ + public boolean add(MapHex hex) { tilesLaid.add(hex); update(); - return true; } + /** Register a tile of this type being removed from the map. + * This method may only be called via the TileMove execute() and undo() methods. */ public boolean remove(MapHex hex) { - tilesLaid.remove(hex); update(); return true; @@ -498,6 +515,7 @@ return "#" + externalId + ": " + count; } + // NOT USED public int getQuantity() { return quantity; } Modified: trunk/18xx/rails/game/TileI.java =================================================================== --- trunk/18xx/rails/game/TileI.java 2011-05-19 12:13:55 UTC (rev 1562) +++ trunk/18xx/rails/game/TileI.java 2011-05-21 10:40:43 UTC (rev 1563) @@ -62,7 +62,7 @@ public int getNumStations(); - public boolean lay(MapHex hex); + public boolean add(MapHex hex); public boolean remove(MapHex hex); Modified: trunk/18xx/rails/util/Tag.java =================================================================== --- trunk/18xx/rails/util/Tag.java 2011-05-19 12:13:55 UTC (rev 1562) +++ trunk/18xx/rails/util/Tag.java 2011-05-21 10:40:43 UTC (rev 1563) @@ -141,6 +141,8 @@ String value = attributes.get(name); if (value == null) return defaultValue; try { + // Unlike Java, we want to allow '+' signs + if (value.startsWith("+")) value = value.substring(1); return Integer.parseInt(value); } catch (Exception e) { throw new ConfigurationException("Invalid integer value: " + value, @@ -168,11 +170,11 @@ } } -public int getAttributeAsInteger(String name) throws ConfigurationException { + public int getAttributeAsInteger(String name) throws ConfigurationException { + + return getAttributeAsInteger(name, 0); + } -return getAttributeAsInteger(name, 0); -} - public int[] getAttributeAsIntegerArray(String name, int[] defaultArray) throws ConfigurationException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-05-19 12:14:03
|
Revision: 1562 http://rails.svn.sourceforge.net/rails/?rev=1562&view=rev Author: evos Date: 2011-05-19 12:13:55 +0000 (Thu, 19 May 2011) Log Message: ----------- Minor train configuration changes: - <InitialTrain> is now a separate tag. Cost can be specified (for 1825), as well as type and tradability. - Attribute name 'number' changed to 'limit' (max. trains per company) - Attribute name 'amount' changed to 'quantity' (buyable trains per type). Modified Paths: -------------- trunk/18xx/LocalisedText.properties trunk/18xx/data/1825/CompanyManager.xml trunk/18xx/data/1825/Game.xml trunk/18xx/data/1830/CompanyManager.xml trunk/18xx/data/1830/Game.xml trunk/18xx/data/1835/CompanyManager.xml trunk/18xx/data/1835/Game.xml trunk/18xx/data/1851/CompanyManager.xml trunk/18xx/data/1851/Game.xml trunk/18xx/data/1856/CompanyManager.xml trunk/18xx/data/1856/Game.xml trunk/18xx/data/1870/CompanyManager.xml trunk/18xx/data/1870/Game.xml trunk/18xx/data/1880/CompanyManager.xml trunk/18xx/data/1880/Game.xml trunk/18xx/data/1889/CompanyManager.xml trunk/18xx/data/1889/Game.xml trunk/18xx/data/18AL/CompanyManager.xml trunk/18xx/data/18AL/Game.xml trunk/18xx/data/18EU/CompanyManager.xml trunk/18xx/data/18EU/Game.xml trunk/18xx/data/18GA/CompanyManager.xml trunk/18xx/data/18GA/Game.xml trunk/18xx/data/18JR/CompanyManager.xml trunk/18xx/data/18JR/Game.xml trunk/18xx/data/18Kaas/CompanyManager.xml trunk/18xx/data/18Kaas/Game.xml trunk/18xx/data/18Scan/CompanyManager.xml trunk/18xx/data/18Scan/Game.xml trunk/18xx/data/18TN/CompanyManager.xml trunk/18xx/data/18TN/Game.xml trunk/18xx/data/18VA/CompanyManager.xml trunk/18xx/data/18VA/Game.xml trunk/18xx/data/GamesList.xml trunk/18xx/rails/game/PublicCompany.java trunk/18xx/rails/game/Train.java trunk/18xx/rails/game/TrainI.java trunk/18xx/rails/game/TrainType.java Modified: trunk/18xx/LocalisedText.properties =================================================================== --- trunk/18xx/LocalisedText.properties 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/LocalisedText.properties 2011-05-19 12:13:55 UTC (rev 1562) @@ -320,12 +320,12 @@ ITEM_PRICE_REDUCED=Price of {0} is now reduced to {1} InvalidAction=Invalid action in this game InvalidAllocationTypeIndex=Invalid allocation type index: {0} -InvalidAmount=Invalid or zero amount specified InvalidBid=Invalid bid by {0} on {1}: {2} InvalidCost=Invalid or zero cost specified InvalidDoneAction=Invalid Done action InvalidParPriceSetting=Invalid par price {0} set by {1} for {2}: {3} InvalidPass=Invalid pass by {0}: {1} +InvalidQuantity=Invalid quantity specified: {0} InvalidStartPrice=Invalid start price {0} for {1} InvalidStops=Invalid or zero major stops specified InvalidTileColourName=Invalid colour name {1} for tile {0} Modified: trunk/18xx/data/1825/CompanyManager.xml =================================================================== --- trunk/18xx/data/1825/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1825/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -14,7 +14,7 @@ </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains number="4,4,3"/> + <Trains limit="4,4,3"/> <TileLays> <Number colour="yellow" number="2" phase="1,2,3,4,5"></Number></TileLays></CompanyType> <Company name="S&M" type="Private" basePrice="30" revenue="5" longname="Swansea and Mumbles"> Modified: trunk/18xx/data/1825/Game.xml =================================================================== --- trunk/18xx/data/1825/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1825/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -70,10 +70,10 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="180" amount="6"/> - <Train name="3" majorStops="3" cost="300" amount="4" startPhase="2"/> - <Train name="4" majorStops="4" cost="430" amount="3"/> - <Train name="5" majorStops="5" cost="550" amount="4" + <Train name="2" majorStops="2" cost="180" quantity="6"/> + <Train name="3" majorStops="3" cost="300" quantity="4" startPhase="2"/> + <Train name="4" majorStops="4" cost="430" quantity="3"/> + <Train name="5" majorStops="5" cost="550" quantity="4" startPhase="3" rustedTrain="2" /> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> Modified: trunk/18xx/data/1830/CompanyManager.xml =================================================================== --- trunk/18xx/data/1830/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1830/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -20,7 +20,7 @@ </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanUseSpecialProperties/> </CompanyType> <Company name="SVNRR" type="Private" basePrice="20" revenue="5" Modified: trunk/18xx/data/1830/Game.xml =================================================================== --- trunk/18xx/data/1830/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1830/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -130,62 +130,62 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="80" amount="6"> + <Train name="2" majorStops="2" cost="80" quantity="6"> <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading"> <Attributes obsoleting="yes"/> </IfOption> <IfOption name="Variant" value="Wabash"> - <Attributes amount="7"/> + <Attributes quantity="7"/> </IfOption> </Train> - <Train name="3" majorStops="3" cost="180" amount="5" startPhase="3"> + <Train name="3" majorStops="3" cost="180" quantity="5" startPhase="3"> <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading"> <Attributes obsoleting="yes"/> </IfOption> <IfOption name="Variant" value="Wabash"> - <Attributes amount="6"/> + <Attributes quantity="6"/> </IfOption> </Train> - <Train name="4" majorStops="4" cost="300" amount="4" startPhase="4" + <Train name="4" majorStops="4" cost="300" quantity="4" startPhase="4" rustedTrain="2"> <IfOption name="Variant" value="Coalfields,Reading"> - <Attributes obsoleting="yes" amount="5"/> + <Attributes obsoleting="yes" quantity="5"/> </IfOption> <IfOption name="Variant" value="Coalfields&Reading"> - <Attributes obsoleting="yes" amount="6"/> + <Attributes obsoleting="yes" quantity="6"/> </IfOption> <IfOption name="Variant" value="Wabash"> - <Attributes amount="5"/> + <Attributes quantity="5"/> </IfOption> </Train> - <Train name="5" majorStops="5" cost="450" amount="3" startPhase="5"> + <Train name="5" majorStops="5" cost="450" quantity="3" startPhase="5"> <IfOption name="Variant" value="Wabash"> - <Attributes amount="4"/> + <Attributes quantity="4"/> </IfOption> </Train> <Train name="6" majorStops="6" cost="630" startPhase="6" rustedTrain="3" releasedTrain="D"> <IfOption name="WithOptional6Train" value="yes"> - <Attributes amount="3"/> + <Attributes quantity="3"/> </IfOption> <IfOption name="WithOptional6Train" value="no"> - <Attributes amount="2"/> + <Attributes quantity="2"/> </IfOption> <IfOption name="Variant" value="Pere Marquette,Coalfields,Reading"> - <Attributes amount="3" releasedTrain="7,D"/> + <Attributes quantity="3" releasedTrain="7,D"/> </IfOption> <IfOption name="Variant" value="Coalfields&Reading"> - <Attributes amount="4" releasedTrain="7,D"/> + <Attributes quantity="4" releasedTrain="7,D"/> </IfOption> <IfOption name="Variant" value="Simple,Wabash"> - <Attributes amount="3"/> + <Attributes quantity="3"/> </IfOption> </Train> <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading"> - <Train name="7" majorStops="7" cost="710" amount="2"/> + <Train name="7" majorStops="7" cost="710" quantity="2"/> </IfOption> <IfOption name="Variant" value="Wabash"> - <Train name="7" majorStops="7" cost="830" amount="-1"/> + <Train name="7" majorStops="7" cost="830" quantity="-1"/> </IfOption> <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading,Simple"> <Train name="D" majorStops="99" startPhase="D" rustedTrain="4"> @@ -198,10 +198,10 @@ <Exchange cost="750"/> </IfOption> <IfOption name="UnlimitedTopTrains" value="yes"> - <Attributes amount="-1"/> + <Attributes quantity="-1"/> </IfOption> <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes amount="6"/> + <Attributes quantity="6"/> </IfOption> <Exchange cost="800"/> </Train> Modified: trunk/18xx/data/1835/CompanyManager.xml =================================================================== --- trunk/18xx/data/1835/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1835/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -10,7 +10,7 @@ <HomeBase lay="whenFloated"/> </BaseTokens> <Payout split="always"/> - <Trains number="2,2,1" mandatory="no"/> + <Trains limit="2,2,1" mandatory="no"/> </CompanyType> <CompanyType name="Major" class="rails.game.PublicCompany" capitalisation="incremental"> <PoolPaysOut/> @@ -28,7 +28,7 @@ <HomeBase lay="whenFloated"/> </BaseTokens> <Capitalisation type="incremental"/> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanUseSpecialProperties/> </CompanyType> @@ -211,7 +211,7 @@ <Certificate shares="2" number="3"/> <Certificate shares="2" number="4" status="reserved"/> <Certificate shares="1" number="4" status="reserved"/> - <Trains number="0,0,4,3"/> + <Trains limit="0,0,4,3"/> </Company> <StartPacket roundClass="rails.game.StartRound_1835" variant="Snake"> Modified: trunk/18xx/data/1835/Game.xml =================================================================== --- trunk/18xx/data/1835/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1835/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -53,19 +53,19 @@ <Reach base="stops" countTowns="yes"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="80" amount="9"/> - <Train name="2+2" majorStops="2" minorStops="2" cost="120" amount="4"/> - <Train name="3" majorStops="3" cost="180" amount="4" startPhase="3"/> - <Train name="3+3" majorStops="3" minorStops="3" cost="270" amount="3"/> - <Train name="4" majorStops="4" cost="360" amount="3" startPhase="4" + <Train name="2" majorStops="2" cost="80" quantity="9"/> + <Train name="2+2" majorStops="2" minorStops="2" cost="120" quantity="4"/> + <Train name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> + <Train name="3+3" majorStops="3" minorStops="3" cost="270" quantity="3"/> + <Train name="4" majorStops="4" cost="360" quantity="3" startPhase="4" rustedTrain="2"/> - <Train name="4+4" majorStops="4" minorStops="4" cost="440" amount="1" + <Train name="4+4" majorStops="4" minorStops="4" cost="440" quantity="1" startPhase="4+4" rustedTrain="2+2"/> - <Train name="5" majorStops="5" cost="500" amount="2" startPhase="5"/> - <Train name="5+5" majorStops="5" minorStops="5" cost="600" amount="1"/> - <Train name="6" majorStops="6" cost="600" amount="2" startPhase="6" + <Train name="5" majorStops="5" cost="500" quantity="2" startPhase="5"/> + <Train name="5+5" majorStops="5" minorStops="5" cost="600" quantity="1"/> + <Train name="6" majorStops="6" cost="600" quantity="2" startPhase="6" rustedTrain="3"/> - <Train name="6+6" majorStops="6" minorStops="6" cost="720" amount="4" + <Train name="6+6" majorStops="6" minorStops="6" cost="720" quantity="4" rustedTrain="3+3"/> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> Modified: trunk/18xx/data/1851/CompanyManager.xml =================================================================== --- trunk/18xx/data/1851/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1851/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -10,7 +10,7 @@ <ShareUnit percentage="10"/> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <BaseTokens> <BuyCost initialTokenCost="100"/> <HomeBase lay="whenFloated"/> Modified: trunk/18xx/data/1851/Game.xml =================================================================== --- trunk/18xx/data/1851/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1851/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -54,20 +54,20 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="100" amount="5"/> - <Train name="3" majorStops="3" cost="200" amount="4" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" amount="3" startPhase="4" + <Train name="2" majorStops="2" cost="100" quantity="5"/> + <Train name="3" majorStops="3" cost="200" quantity="4" startPhase="3"/> + <Train name="4" majorStops="4" cost="300" quantity="3" startPhase="4" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="500" amount="2" startPhase="5"/> - <Train name="6" majorStops="6" cost="600" amount="2" startPhase="6" + <Train name="5" majorStops="5" cost="500" quantity="2" startPhase="5"/> + <Train name="6" majorStops="6" cost="600" quantity="2" startPhase="6" rustedTrain="3"/> <Train name="8" majorStops="8" cost="800" startPhase="8" rustedTrain="4"> <IfOption name="UnlimitedTopTrains" value="yes"> - <Attributes amount="-1"/> + <Attributes quantity="-1"/> </IfOption> <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes amount="4"/> + <Attributes quantity="4"/> </IfOption> </Train> <TrainBuyingRules> Modified: trunk/18xx/data/1856/CompanyManager.xml =================================================================== --- trunk/18xx/data/1856/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1856/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -13,7 +13,7 @@ <BaseTokens> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <Loans value="100" perRound="1" interest="10"/> <!-- Number of loans is undefined and handled in the code --> <CanUseSpecialProperties/> @@ -26,7 +26,7 @@ <BaseTokens> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains number="0,0,0,3"/> + <Trains limit="0,0,0,3"/> <Options mustTradeTrainsAtFixedPrice="yes" canClose="no"/> </CompanyType> Modified: trunk/18xx/data/1856/Game.xml =================================================================== --- trunk/18xx/data/1856/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1856/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -51,14 +51,14 @@ <Reach base="stops" countTowns="major"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" amount="6"/> - <Train name="3" majorStops="3" cost="225" amount="5" startPhase="2"/> - <Train name="4" majorStops="4" cost="350" amount="4" startPhase="3" + <Train name="2" majorStops="2" cost="100" quantity="6"/> + <Train name="3" majorStops="3" cost="225" quantity="5" startPhase="2"/> + <Train name="4" majorStops="4" cost="350" quantity="4" startPhase="3" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="550" amount="3" startPhase="4"/> - <Train name="6" majorStops="6" cost="700" amount="2" startPhase="5" + <Train name="5" majorStops="5" cost="550" quantity="3" startPhase="4"/> + <Train name="6" majorStops="6" cost="700" quantity="2" startPhase="5" rustedTrain="3" releasedTrain="D"/> - <Train name="D" majorStops="99" cost="1100" amount="-1" startPhase="6" + <Train name="D" majorStops="99" cost="1100" quantity="-1" startPhase="6" rustedTrain="4"> <Exchange cost="750"/> </Train> Modified: trunk/18xx/data/1870/CompanyManager.xml =================================================================== --- trunk/18xx/data/1870/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1870/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -21,7 +21,7 @@ <BaseTokens> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanUseSpecialProperties/> </CompanyType> Modified: trunk/18xx/data/1870/Game.xml =================================================================== --- trunk/18xx/data/1870/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1870/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -43,17 +43,17 @@ <Reach base="stops" countTowns="major"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="80" amount="7"/> - <Train name="3" majorStops="3" cost="180" amount="6" startPhase="2"/> - <Train name="4" majorStops="4" cost="300" amount="5" startPhase="3" + <Train name="2" majorStops="2" cost="80" quantity="7"/> + <Train name="3" majorStops="3" cost="180" quantity="6" startPhase="2"/> + <Train name="4" majorStops="4" cost="300" quantity="5" startPhase="3" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="450" amount="4" startPhase="4"/> - <Train name="6" majorStops="6" cost="630" amount="3" startPhase="5" + <Train name="5" majorStops="5" cost="450" quantity="4" startPhase="4"/> + <Train name="6" majorStops="6" cost="630" quantity="3" startPhase="5" rustedTrain="3"/> - <Train name="8" majorStops="8" cost="800" amount="3" startPhase="6" + <Train name="8" majorStops="8" cost="800" quantity="3" startPhase="6" rustedTrain="4"/> - <Train name="10" majorStops="10" cost="950" amount="2" startPhase="7"/> - <Train name="12" majorStops="12" cost="1100" amount="-1" startPhase="8" + <Train name="10" majorStops="10" cost="950" quantity="2" startPhase="7"/> + <Train name="12" majorStops="12" cost="1100" quantity="-1" startPhase="8" rustedTrain="5"/> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> Modified: trunk/18xx/data/1880/CompanyManager.xml =================================================================== --- trunk/18xx/data/1880/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1880/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -20,7 +20,7 @@ <HomeBase lay="whenFloated"/> </BaseTokens> <Payout split="no"/> - <Trains number="1" mandatory="no"/> + <Trains limit="1" mandatory="no"/> </CompanyType> <CompanyType name="Private" class="rails.game.PrivateCompany"/> @@ -41,7 +41,7 @@ <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> <Capitalisation type="incremental"/> - <Trains number="4,4,4,3,3,3,3,3,2,2,2"/> + <Trains limit="4,4,4,3,3,3,3,3,2,2,2"/> <CanUseSpecialProperties/> </CompanyType> Modified: trunk/18xx/data/1880/Game.xml =================================================================== --- trunk/18xx/data/1880/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1880/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -38,21 +38,21 @@ <Reach base="stops" countTowns="major"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" amount="10"/> - <Train name="2+2" majorStops="2" minorStops="2" cost="180" amount="5"/> - <Train name="3" majorStops="3" cost="180" amount="6" startPhase="2"/> - <Train name="3+3" majorStops="3" minorStops="3" cost="300" amount="5" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" amount="5" startPhase="4" rustedTrain="2"/> - <Train name="4+4" majorStops="4" minorStops="4" cost="450" amount="5" startPhase="5" rustedTrain="2+2"/> - <Train name="6" majorStops="6" cost="600" amount="5" startPhase="6" rustedTrain="3"/> - <Train name="6e" majorStops="-1" cost="700" amount="5" startPhase="7" rustedTrain="3+3"/> + <Train name="2" majorStops="2" cost="100" quantity="10"/> + <Train name="2+2" majorStops="2" minorStops="2" cost="180" quantity="5"/> + <Train name="3" majorStops="3" cost="180" quantity="6" startPhase="2"/> + <Train name="3+3" majorStops="3" minorStops="3" cost="300" quantity="5" startPhase="3"/> + <Train name="4" majorStops="4" cost="300" quantity="5" startPhase="4" rustedTrain="2"/> + <Train name="4+4" majorStops="4" minorStops="4" cost="450" quantity="5" startPhase="5" rustedTrain="2+2"/> + <Train name="6" majorStops="6" cost="600" quantity="5" startPhase="6" rustedTrain="3"/> + <Train name="6e" majorStops="-1" cost="700" quantity="5" startPhase="7" rustedTrain="3+3"/> <!-- 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--> - <Train name="8" majorStops="8" cost="800" amount="2" startPhase="8" rustedTrain="4"/> - <Train name="8e" majorStops="-1" cost="900" amount="2" rustedTrain="4+4"/> + <Train name="8" majorStops="8" cost="800" quantity="2" startPhase="8" rustedTrain="4"/> + <Train name="8e" majorStops="-1" cost="900" quantity="2" rustedTrain="4+4"/> <!-- 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--> - <Train name="10" majorStops="10" cost="1000" amount="-1"/> + <Train name="10" majorStops="10" cost="1000" quantity="-1"/> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="A1"> Modified: trunk/18xx/data/1889/CompanyManager.xml =================================================================== --- trunk/18xx/data/1889/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1889/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -19,7 +19,7 @@ </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanUseSpecialProperties/> </CompanyType> <IfOption name="BeginnerGame" value="yes"> Modified: trunk/18xx/data/1889/Game.xml =================================================================== --- trunk/18xx/data/1889/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/1889/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -80,27 +80,27 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="80" amount="6"/> - <Train name="3" majorStops="3" cost="180" amount="5" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" amount="4" startPhase="4" + <Train name="2" majorStops="2" cost="80" quantity="6"/> + <Train name="3" majorStops="3" cost="180" quantity="5" startPhase="3"/> + <Train name="4" majorStops="4" cost="300" quantity="4" startPhase="4" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="450" amount="3" startPhase="5"/> + <Train name="5" majorStops="5" cost="450" quantity="3" startPhase="5"/> <Train name="6" majorStops="6" cost="630" startPhase="6" rustedTrain="3" releasedTrain="D"> <IfOption name="WithOptional6Train" value="yes"> - <Attributes amount="3"/> + <Attributes quantity="3"/> </IfOption> <IfOption name="WithOptional6Train" value="no"> - <Attributes amount="2"/> + <Attributes quantity="2"/> </IfOption> </Train> <Train name="D" majorStops="99" cost="1100" startPhase="D" rustedTrain="4"> <IfOption name="UnlimitedTopTrains" value="yes"> - <Attributes amount="-1"/> + <Attributes quantity="-1"/> </IfOption> <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes amount="6"/> + <Attributes quantity="6"/> </IfOption> <Exchange cost="800"/> </Train> Modified: trunk/18xx/data/18AL/CompanyManager.xml =================================================================== --- trunk/18xx/data/18AL/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18AL/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -13,7 +13,7 @@ <BaseTokens> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanUseSpecialProperties/> </CompanyType> <Company name="Tusc" type="Private" basePrice="20" revenue="5" longname="Tuscumbia Railway"/> Modified: trunk/18xx/data/18AL/Game.xml =================================================================== --- trunk/18xx/data/18AL/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18AL/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -49,9 +49,9 @@ <Reach base="stops" countTowns="no"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" amount="5"/> - <Train name="3" majorStops="3" cost="180" amount="4" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" amount="3" startPhase="4" + <Train name="2" majorStops="2" cost="100" quantity="5"/> + <Train name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> + <Train name="4" majorStops="4" cost="300" quantity="3" startPhase="4" rustedTrain="2" > <IfOption name="Obsolete4Trains" value="yes"> <Attributes obsoleting="yes"/> @@ -60,17 +60,17 @@ <Attributes obsoleting="no"/> </IfOption> </Train>/> - <Train name="5" majorStops="5" cost="450" amount="2" startPhase="5"/> - <Train name="6" majorStops="6" cost="630" amount="1" startPhase="6" + <Train name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> + <Train name="6" majorStops="6" cost="630" quantity="1" startPhase="6" rustedTrain="3"/> - <Train name="7" majorStops="7" cost="700" amount="1" startPhase="7" + <Train name="7" majorStops="7" cost="700" quantity="1" startPhase="7" rustedTrain="4"/> <Train name="4D" majorStops="4" cost="800" startPhase="4D"> <IfOption name="UnlimitedTopTrains" value="yes"> - <Attributes amount="-1"/> + <Attributes quantity="-1"/> </IfOption> <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes amount="5"/> + <Attributes quantity="5"/> </IfOption> <Reach countTowns="no"/> <Score scoreCities="double"/> Modified: trunk/18xx/data/18EU/CompanyManager.xml =================================================================== --- trunk/18xx/data/18EU/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18EU/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -1,118 +1,130 @@ -<?xml version="1.0"?> -<CompanyManager> - <CompanyType name="Minor" class="rails.game.PublicCompany" fgColour="000000" bgColour="CCCCCC"> - <ShareUnit percentage="100"/> - <Certificate type="President" shares="1"/> - <StockPrice market="no"/> - <Payout split="always"/> - <TileLays> - <Number colour="yellow" phase="2" number="2" occurrences="1"/> - <Number colour="green" phase="3,4,5,6,8" number="0"/> - <Number colour="brown" phase="5,6,8" number="0"/> - <Number colour="grey" phase="8" number="0"/> - </TileLays> - <BaseTokens> - <HomeBase lay="whenStarted"/> - </BaseTokens> - <Trains initial="2" number="2,2,1" mandatory="no"/> - </CompanyType> - <CompanyType name="Major" class="rails.game.PublicCompany" capitalisation="incremental" restartable="yes"> - <Float percentage="50"/> - <TreasuryCanHoldOwnShares maxPerc="80"/> - <HomeBase lay="whenStarted"/> - <StockPrice par="no"/> - <ShareUnit percentage="10"/> - <Certificate type="President" shares="2"/> - <Certificate shares="1" number="8"/> - <Capitalisation type="incremental"/> - <BaseTokens> - <BuyCost initialTokenCost="100"/> - <HomeBase lay="whenStarted"/> - </BaseTokens> - <Payout split="allowed" mustExceedPriceToMove="yes"/> - <Trains number="4,4,3,2"/> - <TradeShares mustHaveOperated="yes"/> - </CompanyType> - - <Company name="1" longname="Chemin de Fer du Nord" type="Minor"> - <Home hex="J1" city="1"/> - </Company> - <Company name="2" longname="État Belge" type="Minor"> - <Home hex="H3"/> - </Company> - <Company name="3" longname="Paris-Lyon-Méditerranée" type="Minor"> - <Home hex="J1" city="2"/> - </Company> - <Company name="4" longname="Leipzig-Dresdner-Bahn" type="Minor"> - <Home hex="G10"/> - </Company> - <Company name="5" longname="Ferrovia Adriatica" type="Minor"> - <Home hex="S8"/> - </Company> - <Company name="6" longname="Kaiser-Ferdinand-Nordbahn" type="Minor"> - <Home hex="N11" city="1"/> - </Company> - <Company name="7" longname="Berlin-Potsdamer-Bahn" type="Minor"> - <Home hex="E10" city="2"/> - </Company> - <Company name="8" longname="Ungarische Staatsbahn" type="Minor"> - <Home hex="P13"/> - </Company> - <Company name="9" longname="Berlin-Stettiner-Bahn" type="Minor"> - <Home hex="E10" city="1"/> - </Company> - <Company name="10" longname="Strade Ferrate Alta Italia" type="Minor"> - <Home hex="R5"/> - </Company> - <Company name="11" longname="Südbahn" type="Minor"> - <Home hex="N11" city="2"/> - </Company> - <Company name="12" longname="Hollandsche Maatschappij" type="Minor"> - <Home hex="C4"/> - </Company> - <Company name="13" longname="Ludwigsbahn" type="Minor"> - <Home hex="L7"/> - </Company> - <Company name="14" longname="Ligne Strasbourg-Bâle" type="Minor"> - <Home hex="M4"/> - </Company> - <Company name="15" longname="Grand Central" type="Minor"> - <Home hex="Q2"/> - </Company> - - <Company name="SNCB" longname="Société Nationale des Chemins de Fer Belges " type="Major" tokens="5" fgColour="000000" bgColour="DDAA00"> - </Company> - <Company name="NS" longname="Nederlandsche Spoorwegen" type="Major" tokens="5" fgColour="0000FF" bgColour="FFDD00"> - </Company> - <Company name="KBS" longname="Königlich-Bayerische Staatseisenbahn" type="Major" tokens="5" fgColour="000000" bgColour="C0E0FF"> - </Company> - <Company name="KPEV" longname="Königlich-Preussische Eisenbahn-Verwaltung" type="Major" tokens="5" fgColour="000000" bgColour="2255FF"> - </Company> - <Company name="KKÖB" longname="Kaiserlich-Königliche Österreichische Staatsbahn" type="Major" tokens="5" fgColour="000000" bgColour="FFFF00"> - </Company> - <Company name="FS" longname="Ferrovie dello Stato" type="Major" tokens="5" fgColour="FFFFFF" bgColour="00AA00"> - </Company> - <Company name="SNCF" longname="Société Nationale des Chemins de Fer Français" type="Major" tokens="5" fgColour="FFFFFF" bgColour="FF0000"> - </Company> - <Company name="DR" longname="Deutsche Reichsbahn" type="Major" tokens="5" fgColour="FFFFFF" bgColour="000000"> - </Company> - - <StartPacket roundClass="rails.game.specific._18EU.StartRound_18EU"> - <Bidding initial="0" minimum="5" increment="5"/> - <Item name="1" type="Minor" basePrice="100"/> - <Item name="2" type="Minor" basePrice="100"/> - <Item name="3" type="Minor" basePrice="100"/> - <Item name="4" type="Minor" basePrice="100"/> - <Item name="5" type="Minor" basePrice="100"/> - <Item name="6" type="Minor" basePrice="100"/> - <Item name="7" type="Minor" basePrice="100"/> - <Item name="8" type="Minor" basePrice="100"/> - <Item name="9" type="Minor" basePrice="100"/> - <Item name="10" type="Minor" basePrice="100"/> - <Item name="11" type="Minor" basePrice="100"/> - <Item name="12" type="Minor" basePrice="100"/> - <Item name="13" type="Minor" basePrice="100"/> - <Item name="14" type="Minor" basePrice="100"/> - <Item name="15" type="Minor" basePrice="100"/> - </StartPacket> -</CompanyManager> +<?xml version="1.0"?> +<CompanyManager> + <CompanyType name="Minor" class="rails.game.PublicCompany" fgColour="000000" + bgColour="CCCCCC"> + <ShareUnit percentage="100"/> + <Certificate type="President" shares="1"/> + <StockPrice market="no"/> + <Payout split="always"/> + <TileLays> + <Number colour="yellow" phase="2" number="2" occurrences="1"/> + <Number colour="green" phase="3,4,5,6,8" number="0"/> + <Number colour="brown" phase="5,6,8" number="0"/> + <Number colour="grey" phase="8" number="0"/> + </TileLays> + <BaseTokens> + <HomeBase lay="whenStarted"/> + </BaseTokens> + <Trains limit="2,2,1" mandatory="no"/> + <InitialTrain type="2" cost="0" tradeable="yes"/> + </CompanyType> + <CompanyType name="Major" class="rails.game.PublicCompany" + capitalisation="incremental" restartable="yes"> + <Float percentage="50"/> + <TreasuryCanHoldOwnShares maxPerc="80"/> + <HomeBase lay="whenStarted"/> + <StockPrice par="no"/> + <ShareUnit percentage="10"/> + <Certificate type="President" shares="2"/> + <Certificate shares="1" number="8"/> + <Capitalisation type="incremental"/> + <BaseTokens> + <BuyCost initialTokenCost="100"/> + <HomeBase lay="whenStarted"/> + </BaseTokens> + <Payout split="allowed" mustExceedPriceToMove="yes"/> + <Trains limit="4,4,3,2"/> + <TradeShares mustHaveOperated="yes"/> + </CompanyType> + + <Company name="1" longname="Chemin de Fer du Nord" type="Minor"> + <Home hex="J1" city="1"/> + </Company> + <Company name="2" longname="État Belge" type="Minor"> + <Home hex="H3"/> + </Company> + <Company name="3" longname="Paris-Lyon-Méditerranée" type="Minor"> + <Home hex="J1" city="2"/> + </Company> + <Company name="4" longname="Leipzig-Dresdner-Bahn" type="Minor"> + <Home hex="G10"/> + </Company> + <Company name="5" longname="Ferrovia Adriatica" type="Minor"> + <Home hex="S8"/> + </Company> + <Company name="6" longname="Kaiser-Ferdinand-Nordbahn" type="Minor"> + <Home hex="N11" city="1"/> + </Company> + <Company name="7" longname="Berlin-Potsdamer-Bahn" type="Minor"> + <Home hex="E10" city="2"/> + </Company> + <Company name="8" longname="Ungarische Staatsbahn" type="Minor"> + <Home hex="P13"/> + </Company> + <Company name="9" longname="Berlin-Stettiner-Bahn" type="Minor"> + <Home hex="E10" city="1"/> + </Company> + <Company name="10" longname="Strade Ferrate Alta Italia" type="Minor"> + <Home hex="R5"/> + </Company> + <Company name="11" longname="Südbahn" type="Minor"> + <Home hex="N11" city="2"/> + </Company> + <Company name="12" longname="Hollandsche Maatschappij" type="Minor"> + <Home hex="C4"/> + </Company> + <Company name="13" longname="Ludwigsbahn" type="Minor"> + <Home hex="L7"/> + </Company> + <Company name="14" longname="Ligne Strasbourg-Bâle" type="Minor"> + <Home hex="M4"/> + </Company> + <Company name="15" longname="Grand Central" type="Minor"> + <Home hex="Q2"/> + </Company> + + <Company name="SNCB" longname="Société Nationale des Chemins de Fer Belges " + type="Major" tokens="5" fgColour="000000" bgColour="DDAA00"> + </Company> + <Company name="NS" longname="Nederlandsche Spoorwegen" type="Major" tokens="5" + fgColour="0000FF" bgColour="FFDD00"> + </Company> + <Company name="KBS" longname="Königlich-Bayerische Staatseisenbahn" + type="Major" tokens="5" fgColour="000000" bgColour="C0E0FF"> + </Company> + <Company name="KPEV" longname="Königlich-Preussische Eisenbahn-Verwaltung" + type="Major" tokens="5" fgColour="000000" bgColour="2255FF"> + </Company> + <Company name="KKÖB" + longname="Kaiserlich-Königliche Österreichische Staatsbahn" type="Major" + tokens="5" fgColour="000000" bgColour="FFFF00"> + </Company> + <Company name="FS" longname="Ferrovie dello Stato" type="Major" tokens="5" + fgColour="FFFFFF" bgColour="00AA00"> + </Company> + <Company name="SNCF" longname="Société Nationale des Chemins de Fer Français" + type="Major" tokens="5" fgColour="FFFFFF" bgColour="FF0000"> + </Company> + <Company name="DR" longname="Deutsche Reichsbahn" type="Major" tokens="5" + fgColour="FFFFFF" bgColour="000000"> + </Company> + + <StartPacket roundClass="rails.game.specific._18EU.StartRound_18EU"> + <Bidding initial="0" minimum="5" increment="5"/> + <Item name="1" type="Minor" basePrice="100"/> + <Item name="2" type="Minor" basePrice="100"/> + <Item name="3" type="Minor" basePrice="100"/> + <Item name="4" type="Minor" basePrice="100"/> + <Item name="5" type="Minor" basePrice="100"/> + <Item name="6" type="Minor" basePrice="100"/> + <Item name="7" type="Minor" basePrice="100"/> + <Item name="8" type="Minor" basePrice="100"/> + <Item name="9" type="Minor" basePrice="100"/> + <Item name="10" type="Minor" basePrice="100"/> + <Item name="11" type="Minor" basePrice="100"/> + <Item name="12" type="Minor" basePrice="100"/> + <Item name="13" type="Minor" basePrice="100"/> + <Item name="14" type="Minor" basePrice="100"/> + <Item name="15" type="Minor" basePrice="100"/> + </StartPacket> +</CompanyManager> \ No newline at end of file Modified: trunk/18xx/data/18EU/Game.xml =================================================================== --- trunk/18xx/data/18EU/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18EU/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -54,34 +54,34 @@ <Reach base="stops" countTowns="no"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" amount="15"/> + <Train name="2" majorStops="2" cost="100" quantity="15"/> <Train name="3" majorStops="3" cost="200" startPhase="3" releasedTrain="P"> <IfOption name="Extra3Trains" value="0"> - <Attributes amount="5"/> + <Attributes quantity="5"/> </IfOption> <IfOption name="Extra3Trains" value="1"> - <Attributes amount="6"/> + <Attributes quantity="6"/> </IfOption> <IfOption name="Extra3Trains" value="2"> - <Attributes amount="7"/> + <Attributes quantity="7"/> </IfOption> </Train> <Train name="4" majorStops="4" cost="300" startPhase="4" rustedTrain="2"> <IfOption name="Extra4Trains" value="0"> - <Attributes amount="4"/> + <Attributes quantity="4"/> </IfOption> <IfOption name="Extra4Trains" value="1"> - <Attributes amount="5"/> + <Attributes quantity="5"/> </IfOption> </Train> - <Train name="5" majorStops="5" cost="500" amount="3" startPhase="5"/> - <Train name="6" majorStops="6" cost="600" amount="2" startPhase="6" + <Train name="5" majorStops="5" cost="500" quantity="3" startPhase="5"/> + <Train name="6" majorStops="6" cost="600" quantity="2" startPhase="6" rustedTrain="3"/> - <Train name="8" majorStops="8" cost="800" amount="-1" startPhase="8" + <Train name="8" majorStops="8" cost="800" quantity="-1" startPhase="8" rustedTrain="4"/> <!-- majorStops="-1" indicates that this not a normally running train--> - <Train name="P" initialPortfolio="Pool" majorStops="-1" cost="100" amount="5"/> + <Train name="P" initialPortfolio="Pool" majorStops="-1" cost="100" quantity="5"/> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="2" > Modified: trunk/18xx/data/18GA/CompanyManager.xml =================================================================== --- trunk/18xx/data/18GA/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18GA/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -17,7 +17,7 @@ <HomeBase lay="firstOR"/> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanBuyPrivates/> <CanUseSpecialProperties/> </CompanyType> Modified: trunk/18xx/data/18GA/Game.xml =================================================================== --- trunk/18xx/data/18GA/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18GA/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -54,20 +54,20 @@ <Reach base="stops" countTowns="no"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" amount="5"/> - <Train name="3" majorStops="3" cost="180" amount="4" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" amount="3" startPhase="4" + <Train name="2" majorStops="2" cost="100" quantity="5"/> + <Train name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> + <Train name="4" majorStops="4" cost="300" quantity="3" startPhase="4" rustedTrain="2" /> - <Train name="5" majorStops="5" cost="450" amount="2" startPhase="5"/> - <Train name="6" majorStops="6" cost="630" amount="2" startPhase="6" + <Train name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> + <Train name="6" majorStops="6" cost="630" quantity="2" startPhase="6" rustedTrain="3"/> <Train name="8" majorStops="8" cost="800" startPhase="8" rustedTrain="4"> <IfOption name="UnlimitedTopTrains" value="yes"> - <Attributes amount="-1"/> + <Attributes quantity="-1"/> </IfOption> <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes amount="5"/> + <Attributes quantity="5"/> </IfOption> </Train> </Component> Modified: trunk/18xx/data/18JR/CompanyManager.xml =================================================================== --- trunk/18xx/data/18JR/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18JR/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -18,7 +18,7 @@ </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanUseSpecialProperties/> </CompanyType> <Company name="SVNRR" type="Private" basePrice="20" revenue="5" Modified: trunk/18xx/data/18JR/Game.xml =================================================================== --- trunk/18xx/data/18JR/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18JR/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -91,32 +91,32 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="80" amount="6"/> - <Train name="3" majorStops="3" cost="180" amount="5" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" amount="4" startPhase="4" + <Train name="2" majorStops="2" cost="80" quantity="6"/> + <Train name="3" majorStops="3" cost="180" quantity="5" startPhase="3"/> + <Train name="4" majorStops="4" cost="300" quantity="4" startPhase="4" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="450" amount="3" startPhase="5"/> - <!--Train name="6" majorStops="6" cost="630" amount="2" startPhase="6" + <Train name="5" majorStops="5" cost="450" quantity="3" startPhase="5"/> + <!--Train name="6" majorStops="6" cost="630" quantity="2" startPhase="6" rustedTrain="3" releasedTrain="D"/--> <Train name="6" majorStops="6" cost="630" startPhase="6" rustedTrain="3" releasedTrain="D"> <IfOption name="WithOptional6Train" value="yes"> - <Attributes amount="3"/> + <Attributes quantity="3"/> </IfOption> <IfOption name="WithOptional6Train" value="no"> - <Attributes amount="2"/> + <Attributes quantity="2"/> </IfOption> <IfOption name="Variant" value="Pere Marquette"> - <Attributes amount="3"/> + <Attributes quantity="3"/> </IfOption> </Train> <Train name="D" majorStops="99" cost="1100" startPhase="D" rustedTrain="4"> <IfOption name="UnlimitedTopTrains" value="yes"> - <Attributes amount="-1"/> + <Attributes quantity="-1"/> </IfOption> <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes amount="6"/> + <Attributes quantity="6"/> </IfOption> <Exchange cost="800"/> </Train> Modified: trunk/18xx/data/18Kaas/CompanyManager.xml =================================================================== --- trunk/18xx/data/18Kaas/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18Kaas/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -13,7 +13,7 @@ <BaseTokens> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanUseSpecialProperties/> </CompanyType> <Company name="SVNRR" type="Private" basePrice="20" revenue="5"> Modified: trunk/18xx/data/18Kaas/Game.xml =================================================================== --- trunk/18xx/data/18Kaas/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18Kaas/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -57,21 +57,21 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="80" amount="6"/> - <Train name="3" majorStops="3" cost="180" amount="5" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" amount="4" startPhase="4" + <Train name="2" majorStops="2" cost="80" quantity="6"/> + <Train name="3" majorStops="3" cost="180" quantity="5" startPhase="3"/> + <Train name="4" majorStops="4" cost="300" quantity="4" startPhase="4" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="450" amount="3" startPhase="5"/> + <Train name="5" majorStops="5" cost="450" quantity="3" startPhase="5"/> <Train name="6" majorStops="6" cost="630" startPhase="6" rustedTrain="3" releasedTrain="D"> <IfOption name="WithOptional6Train" value="yes"> - <Attributes amount="3"/> + <Attributes quantity="3"/> </IfOption> <IfOption name="WithOptional6Train" value="no"> - <Attributes amount="2"/> + <Attributes quantity="2"/> </IfOption> </Train> - <Train name="D" majorStops="99" cost="1100" amount="6" startPhase="D" + <Train name="D" majorStops="99" cost="1100" quantity="6" startPhase="D" rustedTrain="4"> <Exchange cost="800"/> </Train> Modified: trunk/18xx/data/18Scan/CompanyManager.xml =================================================================== --- trunk/18xx/data/18Scan/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18Scan/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -14,7 +14,7 @@ <BaseTokens> <HomeBase lay="whenStarted"/> </BaseTokens> - <Trains number="2,2,1,0" mandatory="no"/> + <Trains limit="2,2,1,0" mandatory="no"/> </CompanyType> <CompanyType name="Public" class="rails.game.PublicCompany"> @@ -28,7 +28,7 @@ <HomeBase lay="firstOR"/> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanUseSpecialProperties/> </CompanyType> <Company name="Ferry" type="Private" basePrice="120" revenue="20" @@ -66,7 +66,7 @@ </Company> <Company name="SJ" type="Public" tokens="6" fgColour="FFCC11" bgColour="9370DB" longname="Statens Järnvägar"> - <Trains number="3"/> + <Trains limit="3"/> </Company> <StartPacket roundClass="rails.game.StartRound_1830"> Modified: trunk/18xx/data/18Scan/Game.xml =================================================================== --- trunk/18xx/data/18Scan/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18Scan/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -44,14 +44,14 @@ <Reach base="stops" countTowns="no"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" amount="6"/> - <Train name="3" majorStops="3" cost="200" amount="4" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" amount="3" startPhase="4" + <Train name="2" majorStops="2" cost="100" quantity="6"/> + <Train name="3" majorStops="3" cost="200" quantity="4" startPhase="3"/> + <Train name="4" majorStops="4" cost="300" quantity="3" startPhase="4" rustedTrain="2" /> - <Train name="5" majorStops="5" cost="500" amount="2" startPhase="5" releasedTrain="5E"/> - <Train name="5E" majorStops="5" cost="600" amount="2" startPhase="6" releasedTrain="4D" + <Train name="5" majorStops="5" cost="500" quantity="2" startPhase="5" releasedTrain="5E"/> + <Train name="5E" majorStops="5" cost="600" quantity="2" startPhase="6" releasedTrain="4D" rustedTrain="3"/> - <Train name="4D" majorStops="4" cost="800" amount="6" startPhase="4D" + <Train name="4D" majorStops="4" cost="800" quantity="6" startPhase="4D" rustedTrain="4"> </Train> </Component> Modified: trunk/18xx/data/18TN/CompanyManager.xml =================================================================== --- trunk/18xx/data/18TN/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18TN/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -20,7 +20,7 @@ </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanUseSpecialProperties/> <TileLays> <Number colour="yellow" phase="3,4,5,6,8" number="2"/> Modified: trunk/18xx/data/18TN/Game.xml =================================================================== --- trunk/18xx/data/18TN/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18TN/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -66,14 +66,14 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="80" amount="5" obsoleting="yes"/> - <Train name="3" majorStops="3" cost="180" amount="5" obsoleting="yes" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" amount="3" obsoleting="yes" startPhase="4" + <Train name="2" majorStops="2" cost="80" quantity="5" obsoleting="yes"/> + <Train name="3" majorStops="3" cost="180" quantity="5" obsoleting="yes" startPhase="3"/> + <Train name="4" majorStops="4" cost="300" quantity="3" obsoleting="yes" startPhase="4" rustedTrain="2" /> - <Train name="5" majorStops="5" cost="450" amount="2" startPhase="5"/> - <Train name="6" majorStops="6" cost="630" amount="2" startPhase="6" + <Train name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> + <Train name="6" majorStops="6" cost="630" quantity="2" startPhase="6" rustedTrain="3" /> - <Train name="8" majorStops="8" cost="700" amount="7" startPhase="8" + <Train name="8" majorStops="8" cost="700" quantity="7" startPhase="8" rustedTrain="4" /> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> Modified: trunk/18xx/data/18VA/CompanyManager.xml =================================================================== --- trunk/18xx/data/18VA/CompanyManager.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18VA/CompanyManager.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -19,7 +19,7 @@ </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains number="4,4,3,2"/> + <Trains limit="4,4,3,2"/> <CanUseSpecialProperties/> </CompanyType> Modified: trunk/18xx/data/18VA/Game.xml =================================================================== --- trunk/18xx/data/18VA/Game.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/18VA/Game.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -71,16 +71,16 @@ cities="double" if city-revenue is doubled (e.g. 1826 TGV). --> </Defaults> - <Train name="2" majorStops="2" cost="100" amount="6"/> - <Train name="3" majorStops="3" cost="200" amount="5" startPhase="3"/> - <Train name="4" majorStops="4" cost="300" amount="4" startPhase="4" + <Train name="2" majorStops="2" cost="100" quantity="6"/> + <Train name="3" majorStops="3" cost="200" quantity="5" startPhase="3"/> + <Train name="4" majorStops="4" cost="300" quantity="4" startPhase="4" rustedTrain="2"/> - <Train name="5" majorStops="5" cost="500" amount="3" startPhase="5" + <Train name="5" majorStops="5" cost="500" quantity="3" startPhase="5" rustedTrain="3"/> <Train name="6" majorStops="6" cost="600" startPhase="6" releasedTrain="4D"> </Train> - <Train name="4D" majorStops="99" cost="800" amount="10" startPhase="4D" + <Train name="4D" majorStops="99" cost="800" quantity="10" startPhase="4D" rustedTrain="4"> </Train> </Component> Modified: trunk/18xx/data/GamesList.xml =================================================================== --- trunk/18xx/data/GamesList.xml 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/data/GamesList.xml 2011-05-19 12:13:55 UTC (rev 1562) @@ -28,7 +28,7 @@ - optionally, a default value (only affects a toggle; in a dropdown the first item is always the default). --> - <Option name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading,Wabash" default="Basegame" /> + <Option name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading,Simple,Wabash" default="Basegame" /> <Option name="RouteAwareness" values="Highlight,Deactivate" default="Highlight" /> <Option name="RevenueCalculation" values="Suggest,Deactivate" default="Suggest" /> <Option name="NoMapMode" type="toggle" default="no" /> Modified: trunk/18xx/rails/game/PublicCompany.java =================================================================== --- trunk/18xx/rails/game/PublicCompany.java 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/rails/game/PublicCompany.java 2011-05-19 12:13:55 UTC (rev 1562) @@ -256,7 +256,9 @@ protected boolean canClose = true; /** Initial train at floating time */ - protected String initialTrain = null; + protected String initialTrainType = null; + protected int initialTrainCost = 0; + protected boolean initialTrainTradeable = true; /* Loans */ protected int maxNumberOfLoans = 0; @@ -396,11 +398,19 @@ Tag trainsTag = tag.getChild("Trains"); if (trainsTag != null) { - trainLimit = trainsTag.getAttributeAsIntegerArray("number"); + trainLimit = trainsTag.getAttributeAsIntegerArray("limit"); mustOwnATrain = trainsTag.getAttributeAsBoolean("mandatory", mustOwnATrain); - initialTrain = trainsTag.getAttributeAsString("initial"); } + + Tag initialTrainTag = tag.getChild("InitialTrain"); + if (initialTrainTag != null) { + initialTrainType = initialTrainTag.getAttributeAsString("type"); + initialTrainCost = initialTrainTag.getAttributeAsInteger("cost", + initialTrainCost); + initialTrainTradeable = initialTrainTag.getAttributeAsBoolean("tradeable", + initialTrainTradeable); + } Tag firstTrainTag = tag.getChild("FirstTrainCloses"); if (firstTrainTag != null) { @@ -961,11 +971,12 @@ layHomeBaseTokens(); } - if (initialTrain != null) { + if (initialTrainType != null) { TrainManager trainManager = gameManager.getTrainManager(); - TrainTypeI type = trainManager.getTypeByName(initialTrain); + TrainTypeI type = trainManager.getTypeByName(initialTrainType); TrainI train = bank.getIpo().getTrainOfType(type); - buyTrain(train, 0); + buyTrain(train, initialTrainCost); + train.setTradeable(initialTrainTradeable); trainManager.checkTrainAvailability(train, bank.getIpo()); } } Modified: trunk/18xx/rails/game/Train.java =================================================================== --- trunk/18xx/rails/game/Train.java 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/rails/game/Train.java 2011-05-19 12:13:55 UTC (rev 1562) @@ -17,6 +17,9 @@ protected int cityScoreFactor; protected int townScoreFactor; protected int townCountIndicator; + + /** Some specific trains cannot be traded between companies */ + protected boolean tradeable = true; protected String uniqueId; @@ -142,4 +145,12 @@ return getName(); } + public boolean isTradeable() { + return tradeable; + } + + public void setTradeable(boolean tradeable) { + this.tradeable = tradeable; + } + } Modified: trunk/18xx/rails/game/TrainI.java =================================================================== --- trunk/18xx/rails/game/TrainI.java 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/rails/game/TrainI.java 2011-05-19 12:13:55 UTC (rev 1562) @@ -64,5 +64,7 @@ public boolean canBeExchanged(); public String toDisplay(); - + + public boolean isTradeable(); + public void setTradeable(boolean tradeable); } Modified: trunk/18xx/rails/game/TrainType.java =================================================================== --- trunk/18xx/rails/game/TrainType.java 2011-05-16 23:17:44 UTC (rev 1561) +++ trunk/18xx/rails/game/TrainType.java 2011-05-19 12:13:55 UTC (rev 1562) @@ -22,7 +22,7 @@ protected Class<? extends Train> trainClass; protected String name; - protected int amount; + protected int quantity; protected boolean infiniteAmount = false; /** Index: used for sorting trains lists in configured order. */ @@ -117,12 +117,12 @@ } // Amount - amount = tag.getAttributeAsInteger("amount"); - if (amount == -1) { + quantity = tag.getAttributeAsInteger("quantity"); + if (quantity == -1) { infiniteAmount = true; - } else if (amount <= 0) { + } else if (quantity <= 0) { throw new ConfigurationException( - LocalText.getText("InvalidAmount")); + LocalText.getText("InvalidQuantity", String.valueOf(quantity))); } // Major stops @@ -153,7 +153,7 @@ initialPortfolio); } else { name = ""; - amount = 0; + quantity = 0; } // Reach @@ -209,7 +209,7 @@ train = createTrain(); trains.add(train); } else { - for (int i = 0; i < amount; i++) { + for (int i = 0; i < quantity; i++) { train = createTrain (); trains.add(train); } @@ -479,7 +479,7 @@ public String getInfo() { StringBuilder b = new StringBuilder ("<html>"); - b.append(LocalText.getText("TrainInfo", name, Bank.format(cost), amount)); + b.append(LocalText.getText("TrainInfo", name, Bank.format(cost), quantity)); if (Util.hasValue(startedPhaseName)) { appendInfoText(b, LocalText.getText("StartsPhase", startedPhaseName)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wak...@us...> - 2011-05-16 23:17:50
|
Revision: 1561 http://rails.svn.sourceforge.net/rails/?rev=1561&view=rev Author: wakko666 Date: 2011-05-16 23:17:44 +0000 (Mon, 16 May 2011) Log Message: ----------- Tag 1.4.2 Added Paths: ----------- tags/rails_1_4_2/ tags/rails_1_4_2/.classpath tags/rails_1_4_2/.project Added: tags/rails_1_4_2/.classpath =================================================================== --- tags/rails_1_4_2/.classpath (rev 0) +++ tags/rails_1_4_2/.classpath 2011-05-16 23:17:44 UTC (rev 1561) @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: tags/rails_1_4_2/.project =================================================================== --- tags/rails_1_4_2/.project (rev 0) +++ tags/rails_1_4_2/.project 2011-05-16 23:17:44 UTC (rev 1561) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>18xx</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-05-13 15:44:13
|
Revision: 1560 http://rails.svn.sourceforge.net/rails/?rev=1560&view=rev Author: evos Date: 2011-05-13 15:44:06 +0000 (Fri, 13 May 2011) Log Message: ----------- 1830 Simple variant Modified Paths: -------------- trunk/18xx/data/1830/CompanyManager.xml trunk/18xx/data/1830/Game.xml trunk/18xx/data/1830/Map.xml trunk/18xx/data/1830/TileSet.xml trunk/18xx/data/1830/Tiles.xml Modified: trunk/18xx/data/1830/CompanyManager.xml =================================================================== --- trunk/18xx/data/1830/CompanyManager.xml 2011-05-12 20:26:14 UTC (rev 1559) +++ trunk/18xx/data/1830/CompanyManager.xml 2011-05-13 15:44:06 UTC (rev 1560) @@ -82,7 +82,7 @@ </Company> <Company name="C&O" type="Public" tokens="3" fgColour="000000" bgColour="A0E0FF" longname="Chesapeake & Ohio"> - <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Simple,Wabash"> <Home hex="F6"/> </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> @@ -99,6 +99,18 @@ in each city one slot has to be available --> <Home hex="E11" city="0" allCitiesBlocked="yes"/> </Company> + <IfOption name="Variant" value="Simple"> + <Company name="L&N" type="Public" tokens="3" fgColour="FFE600" bgColour="FF0000" + longname="Louisville & Nashville"> + <Home hex="H4" city="0" allCitiesBlocked="yes" /> + </Company> + </IfOption> + <IfOption name="Variant" value="Simple"> + <Company name="MILW" type="Public" tokens="3" fgColour="FFFFFF" bgColour="FF8000" + longname="Milwaukee Road"> + <Home hex="D2" city="0" allCitiesBlocked="yes" /> + </Company> + </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> <Company name="N&W" type="Public" tokens="3" fgColour="FFFF00" bgColour="000080" longname="Norfolk & Western"> @@ -132,7 +144,7 @@ </Company> </IfOption> <IfOption name="Variant" value="Wabash"> - <Company name="WR" type="Public" tokens="2" fgColour="000000" bgColour="FFFFFF" + <Company name="WAB" type="Public" tokens="2" fgColour="000000" bgColour="FFFFFF" longname="Wabash Railroad"> <Home hex="H2"/> <Certificate type="President" shares="2"/> Modified: trunk/18xx/data/1830/Game.xml =================================================================== --- trunk/18xx/data/1830/Game.xml 2011-05-12 20:26:14 UTC (rev 1559) +++ trunk/18xx/data/1830/Game.xml 2011-05-13 15:44:06 UTC (rev 1560) @@ -15,7 +15,7 @@ <!-- The options in Game.xml are not currently used. See GamesList.xml for the real ones. --> - <GameOption name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading,Wabash" default="Basegame" /> + <GameOption name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading,Simple,Wabash" default="Basegame" /> <GameOption name="NoMapMode" type="toggle" default="no" /> <GameOption name="RouteAwareness" values="Highlight,Deactivate" default="Deactivate" /> <GameOption name="RevenueCalculation" values="Suggest,Deactivate" default="Deactivate" /> @@ -50,7 +50,7 @@ </EndOfGame> </Component> <Component name="PlayerManager" class="rails.game.PlayerManager"> - <IfOption name="Variant" value="Basegame"> + <IfOption name="Variant" value="Basegame,Simple"> <Players number="2" cash="1200" certLimit="28"/> <Players number="3" cash="800" certLimit="20"/> <Players number="4" cash="600" certLimit="16"/> @@ -96,7 +96,7 @@ </IfOption> </Component> <Component name="Bank" class="rails.game.Bank"> - <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Reading,Simple"> <Bank amount="12000"/> </IfOption> <IfOption name="Variant" value="Coalfields&Reading"> @@ -177,7 +177,7 @@ <IfOption name="Variant" value="Coalfields&Reading"> <Attributes amount="4" releasedTrain="7,D"/> </IfOption> - <IfOption name="Variant" value="Wabash"> + <IfOption name="Variant" value="Simple,Wabash"> <Attributes amount="3"/> </IfOption> </Train> @@ -187,9 +187,9 @@ <IfOption name="Variant" value="Wabash"> <Train name="7" majorStops="7" cost="830" amount="-1"/> </IfOption> - <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading,Simple"> <Train name="D" majorStops="99" startPhase="D" rustedTrain="4"> - <IfOption name="Variant" value="Basegame,Pere Marquette"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Simple"> <Attributes cost="1100"/> <Exchange cost="800"/> </IfOption> Modified: trunk/18xx/data/1830/Map.xml =================================================================== --- trunk/18xx/data/1830/Map.xml 2011-05-12 20:26:14 UTC (rev 1559) +++ trunk/18xx/data/1830/Map.xml 2011-05-13 15:44:06 UTC (rev 1560) @@ -30,14 +30,14 @@ <Hex name="D14" tile="-102" value="20"/> <Hex name="D16" tile="0"/> <Hex name="D18" tile="0"/> - <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading,Simple"> <Hex name="D20" tile="0"/> </IfOption> <IfOption name="Variant" value="Wabash"> <Hex name="D20" tile="-25007" orientation="3"/> </IfOption> <Hex name="D22" tile="0" cost="120"/> - <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash,Simple"> <Hex name="D24" tile="-7" orientation="2"/> </IfOption> <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading"> @@ -54,7 +54,7 @@ <Hex name="E19" tile="-10"/> <Hex name="E21" tile="0" cost="120"/> <Hex name="E23" tile="-11" orientation="5" label="B" city="Boston"/> - <IfOption name="Variant" value="Basegame,Pere Marquette,Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Simple"> <Hex name="F2" tile="-903" orientation="5" value="40,70" city="Chicago"/> </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> @@ -71,7 +71,7 @@ <Hex name="F14" tile="0"/> <Hex name="F16" tile="-10" cost="120"/> <Hex name="F18" tile="0"/> - <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Wabash"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Simple,Wabash"> <Hex name="F20" tile="-2"/> </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> @@ -97,20 +97,20 @@ <Hex name="H0" tile="0"/> <Hex name="H2" tile="-10"/> </IfOption> - <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading,Simple"> <Hex name="H2" tile="0"/> </IfOption> <Hex name="H4" tile="-10"/> <Hex name="H6" tile="0"/> <Hex name="H8" tile="0"/> <Hex name="H10" tile="-10"/> - <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Simple,Wabash"> <Hex name="H12" tile="-101" city="Altoona" runThrough="tokenOnly"/> </IfOption> <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading"> <Hex name="H12" tile="-30003" pic="-30002" city="Altoona" runThrough="tokenOnly"/> </IfOption> - <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Wabash"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Simple,Wabash"> <Hex name="H14" tile="0"/> </IfOption> <IfOption name="Variant" value="Reading,Coalfields&Reading"> @@ -123,7 +123,7 @@ <Hex name="I-1" tile="0"/> <Hex name="I1" tile="0"/> </IfOption> - <IfOption name="Variant" value="Basegame,Pere Marquette,Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Simple"> <Hex name="I1" tile="-901" orientation="5" value="30,60" city="Gulf"/> </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> @@ -143,7 +143,7 @@ <Hex name="J0" tile="0"/> <Hex name="J2" tile="-10" city="Cincinnati"/> </IfOption> - <IfOption name="Variant" value="Basegame,Pere Marquette,Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Simple"> <Hex name="J2" tile="-902" orientation="5" value="30,60" city="Gulf"/> </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> @@ -155,7 +155,7 @@ <Hex name="J10" tile="0" cost="120"/> <Hex name="J12" tile="0" cost="120"/> <Hex name="J14" tile="-10" cost="80" city="Washington"/> - <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Simple,Wabash"> <Hex name="K13" tile="-902" orientation="4" value="30,40" city="Deep South"/> <Hex name="K15" tile="-104" orientation="3"/> </IfOption> Modified: trunk/18xx/data/1830/TileSet.xml =================================================================== --- trunk/18xx/data/1830/TileSet.xml 2011-05-12 20:26:14 UTC (rev 1559) +++ trunk/18xx/data/1830/TileSet.xml 2011-05-13 15:44:06 UTC (rev 1560) @@ -16,7 +16,7 @@ <Upgrade id="57"/> </Tile> <Tile id="-11"><!-- B yellow --> - <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Simple,Wabash"> <Upgrade id="53"/> </IfOption> <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading"> @@ -80,7 +80,7 @@ </IfOption> </Tile> <Tile id="57"> - <IfOption name="Variant" value="Basegame,Pere Marquette,Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Simple"> <Attributes quantity="4"/> </IfOption> <IfOption name="Variant" value="Wabash"> @@ -100,7 +100,7 @@ <!-- Green tiles --> <Tile id="14"> - <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Wabash"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Simple,Wabash"> <Attributes quantity="3"/> </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> @@ -115,7 +115,7 @@ <IfOption name="Variant" value="Wabash"> <Upgrade id="63,448"/> </IfOption> - <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Coalfields&Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Coalfields&Reading,Simple"> <Upgrade id="63" /> </IfOption> </Tile> @@ -152,7 +152,7 @@ <Tile id="29" quantity="1"> <Upgrade id="39,43,45,70" /> </Tile> - <IfOption name="Variant" value="Basegame,Pere Marquette"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Simple,Wabash"> <Tile id="53" quantity="2"> <Upgrade id="61" /> </Tile> @@ -169,7 +169,7 @@ </Tile> </IfOption> <Tile id="54" quantity="1"> - <IfOption name="Variant" value="Basegame,Pere Marquette,Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Simple"> <Upgrade id="62" /> </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> @@ -190,9 +190,14 @@ <Tile id="45" quantity="2" /> <Tile id="46" quantity="2" /> <Tile id="47" quantity="1" /> - <IfOption name="Variant" value="Basegame,Pere Marquette"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash"> <Tile id="61" quantity="2" /> </IfOption> + <IfOption name="Variant" value="Simple"> + <Tile id="61" quantity="2" > + <Upgrade id="368" /> + </Tile> + </IfOption> <IfOption name="Variant" value="Reading"> <Tile id="1061" quantity="2" /> </IfOption> @@ -203,11 +208,16 @@ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading"> <Tile id="62" quantity="1" /> </IfOption> + <IfOption name="Variant" value="Simple"> + <Tile id="62" quantity="1" > + <Upgrade id="124" /> + </Tile> + </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> <Tile id="1062" extId="62" quantity="1" /> </IfOption> <Tile id="63"> - <IfOption name="Variant" value="Basegame,Pere Marquette,Reading"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Simple"> <Attributes quantity="3"/> </IfOption> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> @@ -223,6 +233,12 @@ <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> <Tile id="1717" extId="G17" quantity="1" /> </IfOption> + <IfOption name="Variant" value="Simple"> + <Tile id="124" quantity="1" /> + </IfOption> + <IfOption name="Variant" value="Simple"> + <Tile id="368" quantity="1" /> + </IfOption> <IfOption name="Variant" value="Wabash"> <Tile id="448" quantity="2" /> </IfOption> Modified: trunk/18xx/data/1830/Tiles.xml =================================================================== --- trunk/18xx/data/1830/Tiles.xml 2011-05-12 20:26:14 UTC (rev 1559) +++ trunk/18xx/data/1830/Tiles.xml 2011-05-13 15:44:06 UTC (rev 1560) @@ -432,6 +432,20 @@ <Track from="side5" gauge="normal" to="side0"/> <Track from="side4" gauge="normal" to="side0"/> </Tile> + <Tile colour="gray" id="124" name="124"> + <Station id="city1" position="0" slots="4" type="City" value="100"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> + <Tile colour="brown" id="368" name="1889 dc K brown"> + <Station id="city1" position="0" slots="2" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> <Tile colour="brown" id="1717" name="G17"> <Station id="city1" position="0" type="Town" value="20"/> <Track from="city1" gauge="normal" to="side0"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-05-12 20:26:20
|
Revision: 1559 http://rails.svn.sourceforge.net/rails/?rev=1559&view=rev Author: evos Date: 2011-05-12 20:26:14 +0000 (Thu, 12 May 2011) Log Message: ----------- 18Scan: companies and Game.xml Modified Paths: -------------- trunk/18xx/data/18Scan/CompanyManager.xml trunk/18xx/data/18Scan/Game.xml Modified: trunk/18xx/data/18Scan/CompanyManager.xml =================================================================== --- trunk/18xx/data/18Scan/CompanyManager.xml 2011-05-11 20:58:45 UTC (rev 1558) +++ trunk/18xx/data/18Scan/CompanyManager.xml 2011-05-12 20:26:14 UTC (rev 1559) @@ -4,12 +4,23 @@ <ClosingConditions> <Phase>5</Phase> </ClosingConditions> - <Tradeable toCompany="yes" lowerPriceFactor="0.5" upperPriceFactor="1.5"/> - <Tradeable toPlayer="yes"/> </CompanyType> + + <CompanyType name="Minor" class="rails.game.PublicCompany" fgColour="FFCC11" bgColour="9370DB"> + <ShareUnit percentage="100"/> + <Certificate type="President" shares="1"/> + <StockPrice market="no"/> + <Payout split="always"/> + <BaseTokens> + <HomeBase lay="whenStarted"/> + </BaseTokens> + <Trains number="2,2,1,0" mandatory="no"/> + </CompanyType> + <CompanyType name="Public" class="rails.game.PublicCompany"> - <PoolPaysOut/> - <Float percentage="60"/> + <Capitalisation type="incremental"/> + <Float percentage="20"/> + <StockPrice par="no"/> <ShareUnit percentage="10"/> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> @@ -18,17 +29,59 @@ <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> <Trains number="4,4,3,2"/> - <CanBuyPrivates/> <CanUseSpecialProperties/> </CompanyType> - <Company name="P1" type="Private" basePrice="20" revenue="5" - longname="Private 1"></Company> - + <Company name="Ferry" type="Private" basePrice="120" revenue="20" + longname="Stockholm-Åbo Ferry Company (Ferry)"></Company> + <Company name="Mine" type="Private" basePrice="150" revenue="25" + longname="Lapland Ore Line (Mine)"></Company> + <Company name="ZRC" type="Private" basePrice="180" revenue="30" + longname="Sjællandske Jernbaneselskab (Zeeland Railway Company)"></Company> + <Company name="1" type="Minor" tokens="2" longname="Västra Stambanan (Western Mainline)"> + <Home hex="G4" /> + </Company> + <Company name="2" type="Minor" tokens="2" longname="Nordvästra Stambanan (Northwestern Mainline)"> + <Home hex="F11" /> + </Company> + <Company name="3" type="Minor" tokens="2" longname="Södra Stambanan (Southern Mainline)"> + <Home hex="F11" /> + </Company> + + <Company name="DSB" type="Public" tokens="3" fgColour="FFFFFF" + bgColour="EE2C2C" longname="Danske Statsbaner"> + <Home hex="F3" /> + </Company> + <Company name="NSB" type="Public" tokens="4" fgColour="FFFFFF" + bgColour="23238E" longname="Norges Statsbaner"> + <Home hex="D7" /> + </Company> + <Company name="S&NJ" type="Public" tokens="3" fgColour="FFFFFF" + bgColour="228B22" longname="Sveriges & Norges Järnvägar"> + <Home hex="B19" /> + </Company> + <Company name="VR" type="Public" tokens="4" fgColour="FFFFFF" + bgColour="1464F4" longname="Valtionrautatiet"> + <Home hex="G14" /> + </Company> + <Company name="SJ" type="Public" tokens="6" fgColour="FFCC11" + bgColour="9370DB" longname="Statens Järnvägar"> + <Trains number="3"/> + </Company> + <StartPacket roundClass="rails.game.StartRound_1830"> <Bidding initial="5" minimum="5" increment="1"/> - <Item name="P1" type="Private" basePrice="20"/> - - + <Item name="Ferry" type="Private" basePrice="120"> + <SubItem name="VR" type="Public" /> + </Item> + <Item name="Mine" type="Private" basePrice="150"> + <SubItem name="S&NJ" type="Public" /> + </Item> + <Item name="ZRC" type="Private" basePrice="180"> + <SubItem name="DSB" type="Public" president="yes"/> + </Item> + <Item name="1" type="Minor" basePrice="200"/> + <Item name="2" type="Minor" basePrice="220"/> + <Item name="3" type="Minor" basePrice="260"/> </StartPacket> </CompanyManager> \ No newline at end of file Modified: trunk/18xx/data/18Scan/Game.xml =================================================================== --- trunk/18xx/data/18Scan/Game.xml 2011-05-11 20:58:45 UTC (rev 1558) +++ trunk/18xx/data/18Scan/Game.xml 2011-05-12 20:26:14 UTC (rev 1559) @@ -11,15 +11,14 @@ </IfOption> </PlayerShareLimit> <BankPoolLimit percentage="50"/> - <StockRound> - <NoSaleInFirstSR/> + <StockRound sequence="SellBuy"> + <NoSaleIfNotOperated/> </StockRound> </GameParameters> <GuiClasses> </GuiClasses> <EndOfGame> - <Bankruptcy/> - <BankBreaks limit="0" finish="currentOR"/> + <BankBreaks limit="0" finish="setOfORs"/> <!-- "Runs out"; when "broken", -1 is the limit --> <!-- Also when the share value reaches $300; this is configured in the stock market XML, but uses the 'finish' attribute value defined above. --> @@ -45,47 +44,36 @@ <Reach base="stops" countTowns="no"/> <Score towns="yes"/> </Defaults> - <Train name="2" majorStops="2" cost="100" amount="5"/> - <Train name="3" majorStops="3" cost="180" amount="4" startPhase="3"/> + <Train name="2" majorStops="2" cost="100" amount="6"/> + <Train name="3" majorStops="3" cost="200" amount="4" startPhase="3"/> <Train name="4" majorStops="4" cost="300" amount="3" startPhase="4" rustedTrain="2" /> - <Train name="5" majorStops="5" cost="450" amount="2" startPhase="5"/> - <Train name="6" majorStops="6" cost="630" amount="2" startPhase="6" + <Train name="5" majorStops="5" cost="500" amount="2" startPhase="5" releasedTrain="5E"/> + <Train name="5E" majorStops="5" cost="600" amount="2" startPhase="6" releasedTrain="4D" rustedTrain="3"/> - <Train name="8" majorStops="8" cost="800" startPhase="8" + <Train name="4D" majorStops="4" cost="800" amount="6" startPhase="4D" rustedTrain="4"> - <IfOption name="UnlimitedTopTrains" value="yes"> - <Attributes amount="-1"/> - </IfOption> - <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes amount="5"/> - </IfOption> </Train> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="2" > <Tiles colour="yellow"/> - <OperatingRounds number="1"/> + <OperatingRounds number="2"/> <Trains onePerTurn="yes" tradingAllowed="yes"/> </Phase> <Phase name="3"> <Tiles colour="yellow,green"/> - <Privates sellingAllowed="yes"/> - <OperatingRounds number="2"/> + <OffBoardRevenue step="2"/> </Phase> - <Phase name="4"> - <Trains onePerTurn="no"/> - </Phase> + <Phase name="4"/> <Phase name="5"> <Tiles colour="yellow,green,brown"/> - <OperatingRounds number="3"/> <Privates close="yes"/> - <OffBoardRevenue step="2"/> + <OffBoardRevenue step="3"/> </Phase> - <Phase name="6" /> - <Phase name="8"> - <Tiles colour="yellow,green,brown"/> - </Phase> + <Phase name="5E" /> + <Phase name="4D"/> + </Component> <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> </Component> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-05-11 20:58:51
|
Revision: 1558 http://rails.svn.sourceforge.net/rails/?rev=1558&view=rev Author: evos Date: 2011-05-11 20:58:45 +0000 (Wed, 11 May 2011) Log Message: ----------- 18Scan: fixes to the map and the tile upgrade rules. Modified Paths: -------------- trunk/18xx/data/18Scan/Map.xml trunk/18xx/data/18Scan/TileSet.xml trunk/18xx/data/18Scan/Tiles.xml Modified: trunk/18xx/data/18Scan/Map.xml =================================================================== --- trunk/18xx/data/18Scan/Map.xml 2011-05-11 20:29:31 UTC (rev 1557) +++ trunk/18xx/data/18Scan/Map.xml 2011-05-11 20:58:45 UTC (rev 1558) @@ -25,7 +25,7 @@ <Hex name="C16" tile="0" cost="60"/> <Hex name="C18" tile="-1" city="Lulea"/> <Hex name="D5" tile="-1" city="Kristiansand" impassable="E4,E6"/> - <Hex name="D7" tile="-10" city="Oslo"/> + <Hex name="D7" tile="-3007" city="Oslo"/> <Hex name="D9" tile="0"/> <Hex name="D11" tile="0"/> <Hex name="D13" tile="0" impassable="E14"/> @@ -55,7 +55,7 @@ <Hex name="G6" tile="0"/> <Hex name="G8" tile="0"/> <Hex name="G12" tile="-4007" orientation="2"/> - <Hex name="G14" tile="-10" city="Helsinki"/> + <Hex name="G14" tile="-3007" city="Helsinki"/> <Hex name="G16" tile="-1" city="Lahti"/> <Hex name="H13" tile="-911" city="Tallinn" value="0,30,60" orientation="4"/> <Hex name="H17" tile="-911" city="Vyborg" value="30,50,80" orientation="3"/> Modified: trunk/18xx/data/18Scan/TileSet.xml =================================================================== --- trunk/18xx/data/18Scan/TileSet.xml 2011-05-11 20:29:31 UTC (rev 1557) +++ trunk/18xx/data/18Scan/TileSet.xml 2011-05-11 20:58:45 UTC (rev 1558) @@ -7,73 +7,81 @@ <Upgrade id="58"/> </Tile> <Tile id="-10"> - <Upgrade id="5"/> + <Upgrade id="5" hex="-F3"/> + <Upgrade id="403" hex="F3"/> </Tile> <Tile id="-911"/> <Tile id="-912"/> + <Tile id="-3007"> + <Upgrade id="5"/> + </Tile> <Tile id="-4002"/> <Tile id="-4007"/> - <Tile id="-10004"/> + <Tile id="-10004"> + <Upgrade id="622"/> + </Tile> <!-- Yellow Tiles --> - <Tile id="5"> - <Upgrade id="15"/> + <Tile id="5" quantity="12"> + <Upgrade id="15" hex="-D7,G14"/> + <Upgrade id="622" hex="D7,G14"/> </Tile> - <Tile id="8"> + <Tile id="8" quantity="8"> <Upgrade id="80,81,82,83"/> </Tile> - <Tile id="9"> + <Tile id="9" quantity="8"> <Upgrade id="82,83"/> </Tile> - <Tile id="58"> + <Tile id="58" quantity="7"> <Upgrade id="141,142,143,144"/> </Tile> - <Tile id="403"> + <Tile id="403" quantity="1"> <Upgrade id="1121"/> </Tile> <!-- Green Tiles --> - <Tile id="15"/> - <Tile id="80"> + <Tile id="15" quantity="6"/> + <Tile id="80" pic="3080" quantity="3"> <Upgrade id="545,546"/> </Tile> - <Tile id="81"> + <Tile id="81" pic="3081" quantity="3"> <Upgrade id="546"/> </Tile> - <Tile id="82"> + <Tile id="82" pic="3082" quantity="3"> <Upgrade id="544,545,546"/> </Tile> - <Tile id="83"> + <Tile id="83" pic="3083" quantity="3"> <Upgrade id="544,545,546"/> </Tile> - <Tile id="1121" extId="121"> + <Tile id="1121" extId="121" quantity="1"> <Upgrade id="1584"/> </Tile> - <Tile id="141"> + <Tile id="141" quantity="3"> <Upgrade id="145,146,147"/> </Tile> - <Tile id="142"> + <Tile id="142" quantity="3"> <Upgrade id="145,146,147"/> </Tile> - <Tile id="143"> + <Tile id="143" quantity="3"> <Upgrade id="146,147"/> </Tile> - <Tile id="144"> + <Tile id="144" quantity="3"> <Upgrade id="147"/> </Tile> - <Tile id="622"> - <Upgrade id="623"/> + <Tile id="622" quantity="3"> + <Upgrade id="623" hex="D7"/> + <Upgrade id="582" hex="F11,H14"/> </Tile> <!-- Brown Tiles --> - <Tile id="145"/> - <Tile id="146"/> - <Tile id="147"/> - <Tile id="544"/> - <Tile id="545"/> - <Tile id="546"/> - <Tile id="582"/> - <Tile id="1584" extId="584"/> - <Tile id="623"/> + <Tile id="145" quantity="3"/> + <Tile id="146" quantity="3"/> + <Tile id="147" quantity="4"/> + <Tile id="544" pic="3544" quantity="3"/> + <Tile id="545" pic="3545" quantity="3"/> + <Tile id="546" pic="3546" quantity="4"/> + <Tile id="582" quantity="2"/> + <Tile id="1584" extId="584" quantity="1"/> + <Tile id="623" quantity="1"/> </TileManager> Modified: trunk/18xx/data/18Scan/Tiles.xml =================================================================== --- trunk/18xx/data/18Scan/Tiles.xml 2011-05-11 20:29:31 UTC (rev 1557) +++ trunk/18xx/data/18Scan/Tiles.xml 2011-05-11 20:58:45 UTC (rev 1558) @@ -16,6 +16,9 @@ <Track from="city1" gauge="normal" to="side1"/> <Track from="city1" gauge="normal" to="side2"/> </Tile> + <Tile colour="white" id="-3007" name="Y city (cent)"> + <Station id="city1" position="0" slots="1" type="City"/> + </Tile> <Tile colour="red" id="-4002" name="Port-2"> <Station id="city1" position="0" type="OffMapCity"/> <Track from="city1" gauge="normal" to="side2"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |