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: Erik V. <ev...@us...> - 2011-10-25 14:06:34
|
data/18GA/Map.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 147edb8de4cad85a7308a1bad4e9248815c29427 Author: Erik Vos <eri...@xs...> Date: Tue Oct 25 16:05:55 2011 +0200 Fixed 18GA: missing cost of hex J10 Bug #3326993. diff --git a/data/18GA/Map.xml b/data/18GA/Map.xml index 1fc279d..fb4927c 100644 --- a/data/18GA/Map.xml +++ b/data/18GA/Map.xml @@ -131,7 +131,7 @@ </Hex> <Hex name="J6" tile="0"/> <Hex name="J8" tile="0"/> - <Hex name="J10" tile="0"> + <Hex name="J10" tile="0" cost="40"> </Hex> <Hex name="J12" tile="-912" orientation="3" value="30,60" city="Jacksonville"/> </Map> \ No newline at end of file |
From: Erik V. <ev...@us...> - 2011-10-24 17:39:48
|
data/18GA/StockMarket.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6213166fdf63a04d45364cb9d0cea534fbb574b6 Author: Erik Vos <eri...@xs...> Date: Mon Oct 24 19:39:22 2011 +0200 Fixed 18GA stock market value of square M3 from 100 to 190. diff --git a/data/18GA/StockMarket.xml b/data/18GA/StockMarket.xml index b1b1595..087b06b 100644 --- a/data/18GA/StockMarket.xml +++ b/data/18GA/StockMarket.xml @@ -90,7 +90,7 @@ <StockSpace name="M1" price="230" /> <StockSpace name="M2" price="210" /> - <StockSpace name="M3" price="100" /> + <StockSpace name="M3" price="190" /> <StockSpace name="N1" price="250" /> <StockSpace name="N2" price="230" /> |
From: Stefan F. <ste...@us...> - 2011-10-14 04:57:13
|
rails/algorithms/NetworkCompanyGraph.java | 14 rails/algorithms/NetworkGraphBuilder.java | 20 rails/algorithms/NetworkIterator.java | 4 rails/algorithms/NetworkTrain.java | 10 rails/algorithms/NetworkVertex.java | 8 rails/algorithms/RevenueAdapter.java | 34 rails/algorithms/RevenueBonus.java | 28 rails/algorithms/RevenueBonusTemplate.java | 10 rails/algorithms/RevenueManager.java | 4 rails/common/DisplayBuffer.java | 6 rails/common/parser/ConfigurableComponentI.java | 4 rails/game/Bank.java | 63 - rails/game/BaseToken.java | 17 rails/game/Bonus.java | 12 rails/game/BonusToken.java | 15 rails/game/CashHolder.java | 26 rails/game/Certificate.java | 7 rails/game/Company.java | 51 rails/game/CompanyI.java | 115 -- rails/game/CompanyManager.java | 2 rails/game/CompanyManagerI.java | 13 rails/game/CompanyType.java | 17 rails/game/CompanyTypeI.java | 5 rails/game/EndOfGameRound.java | 2 rails/game/Game.java | 5 rails/game/GameManager.java | 218 ++-- rails/game/GameManagerI.java | 252 ---- rails/game/MapHex.java | 159 +-- rails/game/MapManager.java | 5 rails/game/OperatingRound.java | 271 ++--- rails/game/Phase.java | 19 rails/game/PhaseI.java | 45 rails/game/PhaseManager.java | 22 rails/game/Player.java | 65 - rails/game/PlayerManager.java | 14 rails/game/Portfolio.java | 734 -------------- rails/game/PrivateCompany.java | 94 - rails/game/PrivateCompanyI.java | 71 - rails/game/PublicCertificate.java | 39 rails/game/PublicCertificateI.java | 87 - rails/game/PublicCompany.java | 197 ++- rails/game/PublicCompanyI.java | 358 ------ rails/game/ReportBuffer.java | 12 rails/game/Round.java | 96 - rails/game/ShareSellingRound.java | 49 rails/game/StartItem.java | 38 rails/game/StartPacket.java | 4 rails/game/StartRound.java | 10 rails/game/StartRound_1830.java | 4 rails/game/StartRound_1835.java | 2 rails/game/StockMarket.java | 32 rails/game/StockMarketI.java | 18 rails/game/StockRound.java | 163 +-- rails/game/StockSpace.java | 31 rails/game/StockSpaceI.java | 16 rails/game/Stop.java | 66 - rails/game/SwitchableUIRound.java | 2 rails/game/Tile.java | 10 rails/game/TileI.java | 4 rails/game/TileManager.java | 2 rails/game/Token.java | 52 rails/game/TokenHolder.java | 51 rails/game/TokenI.java | 26 rails/game/Train.java | 49 rails/game/TrainCertificateType.java | 8 rails/game/TrainI.java | 80 - rails/game/TrainManager.java | 5 rails/game/TrainType.java | 4 rails/game/TreasuryShareRound.java | 50 rails/game/action/BuyBonusToken.java | 22 rails/game/action/BuyCertificate.java | 13 rails/game/action/BuyPrivate.java | 8 rails/game/action/BuyStartItem.java | 4 rails/game/action/BuyTrain.java | 33 rails/game/action/DiscardTrain.java | 18 rails/game/action/LayBonusToken.java | 2 rails/game/action/MergeCompanies.java | 28 rails/game/action/PossibleAction.java | 4 rails/game/action/PossibleORAction.java | 6 rails/game/action/ReachDestinations.java | 22 rails/game/action/RepayLoans.java | 8 rails/game/action/SellShares.java | 4 rails/game/action/StartCompany.java | 8 rails/game/action/TakeLoans.java | 8 rails/game/correct/CashCorrectionAction.java | 10 rails/game/correct/CashCorrectionManager.java | 19 rails/game/correct/ClosePrivate.java | 6 rails/game/correct/MapCorrectionManager.java | 2 rails/game/model/AbstractModel.java | 40 rails/game/model/AbstractOwnable.java | 27 rails/game/model/BaseTokensModel.java | 10 rails/game/model/BonusModel.java | 2 rails/game/model/CalculatedMoneyModel.java | 11 rails/game/model/CashModel.java | 22 rails/game/model/CashOwner.java | 11 rails/game/model/CertificateCountModel.java | 14 rails/game/model/CertificatesModel.java | 98 + rails/game/model/DirectCashOwner.java | 15 rails/game/model/DirectOwner.java | 45 rails/game/model/Holder.java | 37 rails/game/model/HolderModel.java | 70 + rails/game/model/Model.java | 9 rails/game/model/MoneyModel.java | 5 rails/game/model/Observer.java | 14 rails/game/model/Ownable.java | 19 rails/game/model/Owner.java | 29 rails/game/model/OwnerState.java | 16 rails/game/model/Owners.java | 75 + rails/game/model/Portfolio.java | 630 ++++++++++++ rails/game/model/PortfolioCashOwner.java | 21 rails/game/model/PortfolioOwner.java | 35 rails/game/model/PresidentModel.java | 13 rails/game/model/PriceModel.java | 11 rails/game/model/PrivatesModel.java | 9 rails/game/model/SingleOwner.java | 55 + rails/game/model/TrainsModel.java | 45 rails/game/model/View.java | 12 rails/game/special/LocatedBonus.java | 2 rails/game/special/SellBonusToken.java | 17 rails/game/special/SpecialProperty.java | 38 rails/game/special/SpecialPropertyI.java | 17 rails/game/special/SpecialRight.java | 2 rails/game/special/SpecialTileLay.java | 2 rails/game/special/SpecialTokenLay.java | 10 rails/game/specific/_1825/OperatingRound_1825.java | 14 rails/game/specific/_1825/PublicCompany_1825.java | 4 rails/game/specific/_1825/StartRound_1825.java | 2 rails/game/specific/_1825/StockRound_1825.java | 15 rails/game/specific/_1835/FoldIntoPrussian.java | 22 rails/game/specific/_1835/GameManager_1835.java | 4 rails/game/specific/_1835/OperatingRound_1835.java | 32 rails/game/specific/_1835/PrussianFormationRound.java | 77 - rails/game/specific/_1835/StockRound_1835.java | 26 rails/game/specific/_1851/BirminghamTileModifier.java | 4 rails/game/specific/_1851/StartRound_1851.java | 2 rails/game/specific/_1856/CGRFormationRound.java | 92 - rails/game/specific/_1856/OperatingRound_1856.java | 49 rails/game/specific/_1856/PublicCompany_1856.java | 4 rails/game/specific/_1856/PublicCompany_CGR.java | 20 rails/game/specific/_1856/ShareSellingRound_1856.java | 4 rails/game/specific/_1856/StockRound_1856.java | 27 rails/game/specific/_1880/OperatingRound_1880.java | 4 rails/game/specific/_1880/StartRound_1880.java | 4 rails/game/specific/_1880/StockRound_1880.java | 6 rails/game/specific/_1889/OperatingRound_1889.java | 6 rails/game/specific/_18AL/AssignNamedTrains.java | 30 rails/game/specific/_18AL/NameTrains.java | 8 rails/game/specific/_18AL/NameableTrain.java | 10 rails/game/specific/_18AL/NamedTrainRevenueModifier.java | 8 rails/game/specific/_18AL/NamedTrainToken.java | 2 rails/game/specific/_18AL/OperatingRound_18AL.java | 10 rails/game/specific/_18EU/FinalMinorExchangeRound.java | 16 rails/game/specific/_18EU/GameManager_18EU.java | 14 rails/game/specific/_18EU/OffBoardRevenueModifier.java | 4 rails/game/specific/_18EU/OperatingRound_18EU.java | 43 rails/game/specific/_18EU/StartCompany_18EU.java | 18 rails/game/specific/_18EU/StartRound_18EU.java | 4 rails/game/specific/_18EU/StockRound_18EU.java | 141 +- rails/game/specific/_18GA/OperatingRound_18GA.java | 11 rails/game/specific/_18Kaas/RuhrRevenueModifier.java | 4 rails/game/specific/_18TN/OperatingRound_18TN.java | 14 rails/game/specific/_18TN/PublicCompany_18TN.java | 4 rails/game/state/AbstractItem.java | 10 rails/game/state/AbstractState.java | 73 - rails/game/state/ArrayListMultimapState.java | 12 rails/game/state/ArrayListState.java | 8 rails/game/state/ChangeSet.java | 8 rails/game/state/ChangeStack.java | 9 rails/game/state/DoubleMapChange.java | 59 - rails/game/state/Formatter.java | 7 rails/game/state/GenericState.java | 6 rails/game/state/GenericStateChange.java | 35 rails/game/state/HashMultimapState.java | 43 rails/game/state/Holder.java | 16 rails/game/state/MoveUtils.java | 50 rails/game/state/Moveable.java | 9 rails/game/state/Notifiable.java | 5 rails/game/state/Observable.java | 20 rails/game/state/PriceMove.java | 3 rails/game/state/PriceTokenMove.java | 7 rails/game/state/State.java | 5 rails/game/state/StateChange.java | 35 rails/game/state/StateManager.java | 93 + rails/game/state/TileMove.java | 4 rails/ui/swing/GameSetupWindow.java | 2 rails/ui/swing/GameStatus.java | 25 rails/ui/swing/GameUIManager.java | 16 rails/ui/swing/GridPanel.java | 13 rails/ui/swing/ORPanel.java | 28 rails/ui/swing/ORUIManager.java | 41 rails/ui/swing/ReportWindow.java | 4 rails/ui/swing/StatusWindow.java | 2 rails/ui/swing/TokenIcon.java | 6 rails/ui/swing/UpgradesPanel.java | 42 rails/ui/swing/elements/Field.java | 26 rails/ui/swing/elements/GUIStockSpace.java | 17 rails/ui/swing/elements/ViewObject.java | 7 rails/ui/swing/gamespecific/_1835/GameUIManager_1835.java | 4 rails/ui/swing/gamespecific/_1835/StatusWindow_1835.java | 6 rails/ui/swing/gamespecific/_18AL/NameTrainsDialog.java | 2 rails/ui/swing/gamespecific/_18EU/GameStatus_18EU.java | 10 rails/ui/swing/gamespecific/_18EU/GameUIManager_18EU.java | 10 rails/ui/swing/gamespecific/_18EU/StatusWindow_18EU.java | 10 rails/ui/swing/hexmap/GUIHex.java | 43 rails/ui/swing/hexmap/HexMap.java | 4 rails/util/GameFileIO.java | 4 rails/util/RunGame.java | 4 rails/util/SequenceUtil.java | 18 rails/util/Util.java | 31 test/GameTestServlet.java | 30 test/StockMarketTestServlet.java | 8 test/StockTest.java | 12 212 files changed, 3361 insertions(+), 4079 deletions(-) New commits: commit a37c54431b540d1b0b169a9cb774c1051fa84c85 Author: Stefan Frey <ste...@we...> Date: Sat Oct 1 07:51:20 2011 +0200 First checkin to Rails 2.0 without compile errors. Further redesigning of basic Rails concepts. Mainly effected are Portfolio and Holding of other objects by defining owner and ownable interfaces and derived abstract classes. Removed many of the superflous postfix I-interfaces (e.g. GameManagerI etc.). diff --git a/rails/algorithms/NetworkCompanyGraph.java b/rails/algorithms/NetworkCompanyGraph.java index bd93113..00469dd 100644 --- a/rails/algorithms/NetworkCompanyGraph.java +++ b/rails/algorithms/NetworkCompanyGraph.java @@ -16,8 +16,8 @@ import org.jgrapht.graph.SimpleGraph; import org.jgrapht.graph.Subgraph; import rails.algorithms.RevenueAdapter.EdgeTravel; -import rails.game.PublicCompanyI; -import rails.game.TokenI; +import rails.game.PublicCompany; +import rails.game.Token; /** * This class stores and creates the various graphs @@ -29,7 +29,7 @@ public class NetworkCompanyGraph { Logger.getLogger(NetworkCompanyGraph.class.getPackage().getName()); private final NetworkGraphBuilder graphBuilder; - private final PublicCompanyI company; + private final PublicCompany company; private SimpleGraph<NetworkVertex, NetworkEdge> routeGraph; private SimpleGraph<NetworkVertex, NetworkEdge> revenueGraph; @@ -40,7 +40,7 @@ public class NetworkCompanyGraph { private Collection<NetworkVertex> protectedVertices; - private NetworkCompanyGraph(NetworkGraphBuilder graphBuilder, PublicCompanyI company) { + private NetworkCompanyGraph(NetworkGraphBuilder graphBuilder, PublicCompany company) { this.graphBuilder = graphBuilder; this.company = company; this.routeGraph = null; @@ -48,7 +48,7 @@ public class NetworkCompanyGraph { this.phase2Graph = null; } - public static NetworkCompanyGraph create(NetworkGraphBuilder graphBuilder, PublicCompanyI company) { + public static NetworkCompanyGraph create(NetworkGraphBuilder graphBuilder, PublicCompany company) { return new NetworkCompanyGraph(graphBuilder, company); } @@ -112,9 +112,9 @@ public class NetworkCompanyGraph { return graph; } - public List<NetworkVertex> getCompanyBaseTokenVertexes(PublicCompanyI company) { + public List<NetworkVertex> getCompanyBaseTokenVertexes(PublicCompany company) { List<NetworkVertex> vertexes = new ArrayList<NetworkVertex>(); - for (TokenI token:company.getTokens()){ + for (Token token:company.getTokens()){ NetworkVertex vertex = graphBuilder.getVertex(token); if (vertex == null) continue; vertexes.add(vertex); diff --git a/rails/algorithms/NetworkGraphBuilder.java b/rails/algorithms/NetworkGraphBuilder.java index 4246dc6..2dd1f0e 100644 --- a/rails/algorithms/NetworkGraphBuilder.java +++ b/rails/algorithms/NetworkGraphBuilder.java @@ -27,15 +27,15 @@ import com.jgraph.layout.organic.JGraphFastOrganicLayout; import rails.game.BaseToken; import rails.game.Stop; -import rails.game.GameManagerI; +import rails.game.GameManager; import rails.game.MapHex; import rails.game.MapManager; -import rails.game.PublicCompanyI; +import rails.game.PublicCompany; import rails.game.Station; import rails.game.TileI; -import rails.game.TokenHolder; -import rails.game.TokenI; +import rails.game.Token; import rails.game.Track; +import rails.game.model.Owner; public final class NetworkGraphBuilder implements Iterable<NetworkVertex> { @@ -53,7 +53,7 @@ public final class NetworkGraphBuilder implements Iterable<NetworkVertex> { mapVertexes = new HashMap<String, NetworkVertex> (); } - public static NetworkGraphBuilder create(GameManagerI gameManager) { + public static NetworkGraphBuilder create(GameManager gameManager) { NetworkGraphBuilder graphBuilder = new NetworkGraphBuilder(); graphBuilder.generateGraph(gameManager.getMapManager(), gameManager.getRevenueManager()); return graphBuilder; @@ -175,11 +175,11 @@ public final class NetworkGraphBuilder implements Iterable<NetworkVertex> { return mapVertexes.get(identVertex); } - public NetworkVertex getVertex(TokenI token) { + public NetworkVertex getVertex(Token token) { if (!(token instanceof BaseToken)) return null; - TokenHolder holder = token.getHolder(); - if (!(holder instanceof Stop)) return null; - Stop city = (Stop)holder; + Owner owner = token.getOwner(); + if (!(owner instanceof Stop)) return null; + Stop city = (Stop)owner; MapHex hex = city.getHolder(); Station station = city.getRelatedStation(); return getVertex(hex, station); @@ -212,7 +212,7 @@ public final class NetworkGraphBuilder implements Iterable<NetworkVertex> { } public static List<MapHex> getTokenableStationHexes(Graph<NetworkVertex, NetworkEdge> graph, - PublicCompanyI company){ + PublicCompany company){ List<MapHex> hexes = new ArrayList<MapHex>(); for(NetworkVertex vertex:graph.vertexSet()) { Stop city = vertex.getCity(); diff --git a/rails/algorithms/NetworkIterator.java b/rails/algorithms/NetworkIterator.java index f4029e8..9f9026a 100644 --- a/rails/algorithms/NetworkIterator.java +++ b/rails/algorithms/NetworkIterator.java @@ -10,7 +10,7 @@ import org.apache.log4j.Logger; import org.jgrapht.*; import org.jgrapht.traverse.*; -import rails.game.PublicCompanyI; +import rails.game.PublicCompany; public class NetworkIterator extends AbstractGraphIterator<NetworkVertex, NetworkEdge> { @@ -48,7 +48,7 @@ public class NetworkIterator extends * Returns NetworkIterator for specific company */ public NetworkIterator(Graph<NetworkVertex, NetworkEdge> graph, NetworkVertex startVertex, - PublicCompanyI company) { + PublicCompany company) { super(); if (graph == null) diff --git a/rails/algorithms/NetworkTrain.java b/rails/algorithms/NetworkTrain.java index 7536686..9b2a9cf 100644 --- a/rails/algorithms/NetworkTrain.java +++ b/rails/algorithms/NetworkTrain.java @@ -3,7 +3,7 @@ package rails.algorithms; import org.apache.log4j.Logger; -import rails.game.TrainI; +import rails.game.Train; import rails.game.TrainType; public final class NetworkTrain implements Comparable<NetworkTrain>{ @@ -18,11 +18,11 @@ public final class NetworkTrain implements Comparable<NetworkTrain>{ private final int multiplyMinors; private final boolean isHTrain; private String trainName; - private final TrainI railsTrain; + private final Train railsTrain; private NetworkTrain(int majors, int minors, boolean ignoreMinors, - int multiplyMajors, int multiplyMinors, boolean isHTrain, String trainName, TrainI train) { + int multiplyMajors, int multiplyMinors, boolean isHTrain, String trainName, Train train) { this.majors = majors; this.minors = minors; this.ignoreMinors = ignoreMinors; @@ -34,7 +34,7 @@ public final class NetworkTrain implements Comparable<NetworkTrain>{ log.info("Created NetworkTrain " + this.toString() + " / " + this.attributes()); } - static NetworkTrain createFromRailsTrain(TrainI railsTrain){ + static NetworkTrain createFromRailsTrain(Train railsTrain){ int majors = railsTrain.getMajorStops(); int minors = railsTrain.getMinorStops(); if (railsTrain.getTownCountIndicator() == 0) { @@ -139,7 +139,7 @@ public final class NetworkTrain implements Comparable<NetworkTrain>{ return trainName; } - public TrainI getRailsTrain() { + public Train getRailsTrain() { return railsTrain; } diff --git a/rails/algorithms/NetworkVertex.java b/rails/algorithms/NetworkVertex.java index de85f2c..cfbe510 100644 --- a/rails/algorithms/NetworkVertex.java +++ b/rails/algorithms/NetworkVertex.java @@ -77,7 +77,7 @@ public final class NetworkVertex implements Comparable<NetworkVertex> { } /** constructor for public company hq */ - public NetworkVertex(PublicCompanyI company) { + public NetworkVertex(PublicCompany company) { this(VertexType.HQ, "HQ"); } @@ -219,7 +219,7 @@ public final class NetworkVertex implements Comparable<NetworkVertex> { * Initialize for rails vertexes * @return true = can stay inside the network, false = has to be removed */ - public boolean initRailsVertex(PublicCompanyI company) { + public boolean initRailsVertex(PublicCompany company) { // side vertices use the defaults, virtuals cannot use this function if (virtual || type == VertexType.SIDE) return true; @@ -264,7 +264,7 @@ public final class NetworkVertex implements Comparable<NetworkVertex> { } - public void setRailsVertexValue(PhaseI phase) { + public void setRailsVertexValue(Phase phase) { // side vertices and virtuals cannot use this function if (virtual || type == VertexType.SIDE) return; @@ -310,7 +310,7 @@ public final class NetworkVertex implements Comparable<NetworkVertex> { * @param phase the current phase (with regard to values) */ public static void initAllRailsVertices(Graph<NetworkVertex, NetworkEdge> graph, - PublicCompanyI company, PhaseI phase) { + PublicCompany company, Phase phase) { // store vertices for removal List<NetworkVertex> verticesToRemove = new ArrayList<NetworkVertex>(); diff --git a/rails/algorithms/RevenueAdapter.java b/rails/algorithms/RevenueAdapter.java index 9df031a..931b668 100644 --- a/rails/algorithms/RevenueAdapter.java +++ b/rails/algorithms/RevenueAdapter.java @@ -18,11 +18,11 @@ import org.jgrapht.Graphs; import org.jgrapht.graph.SimpleGraph; import rails.common.LocalText; -import rails.game.GameManagerI; +import rails.game.GameManager; import rails.game.MapHex; -import rails.game.PhaseI; -import rails.game.PublicCompanyI; -import rails.game.TrainI; +import rails.game.Phase; +import rails.game.PublicCompany; +import rails.game.Train; import rails.game.TrainType; import rails.ui.swing.hexmap.HexMap; @@ -59,12 +59,12 @@ public final class RevenueAdapter implements Runnable { } // basic links, to be defined at creation - private final GameManagerI gameManager; + private final GameManager gameManager; private final RevenueManager revenueManager; private final NetworkGraphBuilder graphBuilder; private final NetworkCompanyGraph companyGraph; - private final PublicCompanyI company; - private final PhaseI phase; + private final PublicCompany company; + private final Phase phase; // basic components, defined empty at creation private SimpleGraph<NetworkVertex, NetworkEdge> graph; @@ -88,8 +88,8 @@ public final class RevenueAdapter implements Runnable { // revenue listener to communicate results private RevenueListener revenueListener; - public RevenueAdapter(GameManagerI gameManager, NetworkGraphBuilder graphBuilder, NetworkCompanyGraph companyGraph, - PublicCompanyI company, PhaseI phase){ + public RevenueAdapter(GameManager gameManager, NetworkGraphBuilder graphBuilder, NetworkCompanyGraph companyGraph, + PublicCompany company, Phase phase){ this.gameManager = gameManager; this.revenueManager = gameManager.getRevenueManager(); this.graphBuilder = graphBuilder; @@ -106,7 +106,7 @@ public final class RevenueAdapter implements Runnable { this.protectedVertices = new HashSet<NetworkVertex>(); } - public static RevenueAdapter createRevenueAdapter(GameManagerI gm, PublicCompanyI company, PhaseI phase) { + public static RevenueAdapter createRevenueAdapter(GameManager gm, PublicCompany company, Phase phase) { NetworkGraphBuilder nwGraph = NetworkGraphBuilder.create(gm); NetworkCompanyGraph companyGraph = NetworkCompanyGraph.create(nwGraph, company); RevenueAdapter ra = new RevenueAdapter(gm, nwGraph, companyGraph, company, phase); @@ -115,11 +115,11 @@ public final class RevenueAdapter implements Runnable { } - public PublicCompanyI getCompany() { + public PublicCompany getCompany() { return company; } - public PhaseI getPhase() { + public Phase getPhase() { return phase; } @@ -161,7 +161,7 @@ public final class RevenueAdapter implements Runnable { return trains; } - public boolean addTrain(TrainI railsTrain){ + public boolean addTrain(Train railsTrain){ NetworkTrain train = NetworkTrain.createFromRailsTrain(railsTrain); if (train == null) { return false; @@ -183,7 +183,7 @@ public final class RevenueAdapter implements Runnable { 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.getCertificateType()); + Train railsTrain = gameManager.getTrainManager().cloneTrain(trainType.getCertificateType()); return addTrain(railsTrain); } else { // otherwise interpret the train NetworkTrain train = NetworkTrain.createFromString(trainString); @@ -229,7 +229,7 @@ public final class RevenueAdapter implements Runnable { // define Trains company.getPortfolio().getTrainList(); - for (TrainI train:company.getPortfolio().getTrainList()) { + for (Train train:company.getPortfolio().getTrainList()) { addTrain(train); } @@ -529,7 +529,7 @@ public final class RevenueAdapter implements Runnable { rc.setDynamicModifiers(hasDynamicModifiers); } - public int getVertexValue(NetworkVertex vertex, NetworkTrain train, PhaseI phase) { + public int getVertexValue(NetworkVertex vertex, NetworkTrain train, Phase phase) { // base value int value = vertex.getValueByTrain(train); @@ -544,7 +544,7 @@ public final class RevenueAdapter implements Runnable { return value; } - public String getVertexValueAsString(NetworkVertex vertex, NetworkTrain train, PhaseI phase) { + public String getVertexValueAsString(NetworkVertex vertex, NetworkTrain train, Phase phase) { StringBuffer s = new StringBuffer(); // base value diff --git a/rails/algorithms/RevenueBonus.java b/rails/algorithms/RevenueBonus.java index 710128c..162f022 100644 --- a/rails/algorithms/RevenueBonus.java +++ b/rails/algorithms/RevenueBonus.java @@ -8,8 +8,8 @@ import java.util.Map; import org.apache.log4j.Logger; -import rails.game.PhaseI; -import rails.game.TrainI; +import rails.game.Phase; +import rails.game.Train; import rails.game.TrainType; public final class RevenueBonus { @@ -26,8 +26,8 @@ public final class RevenueBonus { // internal attributes private List<NetworkVertex> vertices; private List<TrainType> trainTypes; - private List<TrainI> trains; - private List<PhaseI> phases; + private List<Train> trains; + private List<Phase> phases; public RevenueBonus(int value, String name) { this.value = value; @@ -35,8 +35,8 @@ public final class RevenueBonus { vertices = new ArrayList<NetworkVertex>(); trainTypes = new ArrayList<TrainType>(); - trains = new ArrayList<TrainI>(); - phases = new ArrayList<PhaseI>(); + trains = new ArrayList<Train>(); + phases = new ArrayList<Phase>(); } public void addVertex(NetworkVertex vertex) { @@ -51,11 +51,11 @@ public final class RevenueBonus { trainTypes.add(trainType); } - public void addTrain(TrainI train) { + public void addTrain(Train train) { trains.add(train); } - public void addPhase(PhaseI phase) { + public void addPhase(Phase phase) { phases.add(phase); } @@ -75,11 +75,11 @@ public final class RevenueBonus { return trainTypes; } - public List<TrainI> getTrains() { + public List<Train> getTrains() { return trains; } - public List<PhaseI> getPhases() { + public List<Phase> getPhases() { return phases; } @@ -87,7 +87,7 @@ public final class RevenueBonus { return (vertices.size() == 1); } - public boolean addToRevenueCalculator(RevenueCalculator rc, int bonusId, List<NetworkVertex> allVertices, List<NetworkTrain> trains, PhaseI phase) { + public boolean addToRevenueCalculator(RevenueCalculator rc, int bonusId, List<NetworkVertex> allVertices, List<NetworkTrain> trains, Phase phase) { if (isSimpleBonus() || !phases.isEmpty() && !phases.contains(phase)) return false; // only non-simple bonuses and checks phase condition @@ -109,11 +109,11 @@ public final class RevenueBonus { return true; } - public boolean checkSimpleBonus(NetworkVertex vertex, TrainI train, PhaseI phase) { + public boolean checkSimpleBonus(NetworkVertex vertex, Train train, Phase phase) { return (isSimpleBonus() && vertices.contains(vertex) && checkConditions(train, phase)); } - public boolean checkComplexBonus(List<NetworkVertex> visitVertices, TrainI train, PhaseI phase) { + public boolean checkComplexBonus(List<NetworkVertex> visitVertices, Train train, Phase phase) { boolean result = !isSimpleBonus() && checkConditions(train, phase); if (result) { for (NetworkVertex vertex:vertices) { @@ -126,7 +126,7 @@ public final class RevenueBonus { return result; } - public boolean checkConditions(TrainI train, PhaseI phase) { + public boolean checkConditions(Train train, Phase phase) { boolean result = true; // check train diff --git a/rails/algorithms/RevenueBonusTemplate.java b/rails/algorithms/RevenueBonusTemplate.java index 23646f9..a4b5cfa 100644 --- a/rails/algorithms/RevenueBonusTemplate.java +++ b/rails/algorithms/RevenueBonusTemplate.java @@ -8,9 +8,9 @@ import org.apache.log4j.Logger; import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; -import rails.game.GameManagerI; +import rails.game.GameManager; import rails.game.MapHex; -import rails.game.PhaseI; +import rails.game.Phase; import rails.game.PhaseManager; import rails.game.TrainManager; import rails.game.TrainType; @@ -85,12 +85,12 @@ public final class RevenueBonusTemplate implements ConfigurableComponentI { /** * is not used, use toRevenueBonus instead */ - public void finishConfiguration(GameManagerI parent) + public void finishConfiguration(GameManager parent) throws ConfigurationException { throw new ConfigurationException("Use toRevenueBonus"); } - public RevenueBonus toRevenueBonus(MapHex hex, GameManagerI gm, NetworkGraphBuilder ngb) { + public RevenueBonus toRevenueBonus(MapHex hex, GameManager gm, NetworkGraphBuilder ngb) { log.info("Convert " + this); RevenueBonus bonus = new RevenueBonus(value, name); if (!convertVertices(bonus, ngb, hex)) { @@ -126,7 +126,7 @@ public final class RevenueBonusTemplate implements ConfigurableComponentI { private void convertPhases(RevenueBonus bonus, PhaseManager pm) { for (String identPhase:identPhases) { - PhaseI phase = pm.getPhaseByName(identPhase); + Phase phase = pm.getPhaseByName(identPhase); if (phase != null) { bonus.addPhase(phase); } diff --git a/rails/algorithms/RevenueManager.java b/rails/algorithms/RevenueManager.java index 87e0cf5..7b9d17e 100644 --- a/rails/algorithms/RevenueManager.java +++ b/rails/algorithms/RevenueManager.java @@ -11,7 +11,7 @@ import rails.common.LocalText; import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; -import rails.game.GameManagerI; +import rails.game.GameManager; import rails.game.state.AbstractItem; import rails.game.state.ArrayListState; @@ -100,7 +100,7 @@ public final class RevenueManager extends AbstractItem implements ConfigurableCo } - public void finishConfiguration(GameManagerI parent) + public void finishConfiguration(GameManager parent) throws ConfigurationException { for (ConfigurableComponentI modifier:configurableModifiers) { modifier.finishConfiguration(parent); diff --git a/rails/common/DisplayBuffer.java b/rails/common/DisplayBuffer.java index ea4ccc8..68ad46f 100644 --- a/rails/common/DisplayBuffer.java +++ b/rails/common/DisplayBuffer.java @@ -7,7 +7,7 @@ import java.util.List; import org.apache.log4j.Logger; import rails.game.GameManager; -import rails.game.GameManagerI; +import rails.game.GameManager; import rails.util.Util; /** @@ -51,7 +51,7 @@ public final class DisplayBuffer { } public static void add(String message, boolean autoDisplay) { - GameManagerI gm = GameManager.getInstance(); + GameManager gm = GameManager.getInstance(); DisplayBuffer instance = null; if (gm != null) instance = gm.getDisplayBuffer(); if (gm == null || instance == null) { @@ -75,7 +75,7 @@ public final class DisplayBuffer { } private static DisplayBuffer getInstance() { - GameManagerI gm = GameManager.getInstance(); + GameManager gm = GameManager.getInstance(); if (gm == null) { return null; } else { diff --git a/rails/common/parser/ConfigurableComponentI.java b/rails/common/parser/ConfigurableComponentI.java index 3427496..c0741f2 100644 --- a/rails/common/parser/ConfigurableComponentI.java +++ b/rails/common/parser/ConfigurableComponentI.java @@ -1,7 +1,7 @@ /* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/ConfigurableComponentI.java,v 1.7 2009/10/31 17:08:26 evos Exp $ */ package rails.common.parser; -import rails.game.GameManagerI; +import rails.game.GameManager; /** * Interface for rails.game components which can be configured from an XML @@ -31,7 +31,7 @@ public interface ConfigurableComponentI { * the 'child' to access any other object without the need to resort to * static calls where possible. */ - void finishConfiguration (GameManagerI parent) + void finishConfiguration (GameManager parent) throws ConfigurationException; } diff --git a/rails/game/Bank.java b/rails/game/Bank.java index 22b0a4c..e9da1b7 100644 --- a/rails/game/Bank.java +++ b/rails/game/Bank.java @@ -10,14 +10,20 @@ import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; import rails.game.model.CashModel; -import rails.game.model.AbstractModel; -import rails.game.model.Model; +import rails.game.model.CashOwner; +import rails.game.model.Portfolio; import rails.game.state.AbstractItem; import rails.game.state.BooleanState; import rails.util.*; -public class Bank extends AbstractItem implements CashHolder, ConfigurableComponentI { +public class Bank extends AbstractItem implements CashOwner, ConfigurableComponentI { + /** Specific portfolio names */ + public static final String IPO_NAME = "IPO"; + public static final String POOL_NAME = "Pool"; + public static final String SCRAPHEAP_NAME = "ScrapHeap"; + public static final String UNAVAILABLE_NAME = "Unavailable"; + /** Default limit of shares in the bank pool */ private static final int DEFAULT_BANK_AMOUNT = 12000; private static final String DEFAULT_MONEY_FORMAT = "$@"; @@ -54,10 +60,10 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon money = new CashModel(this); // Create the IPO and the Bank Pool. - ipo = new Portfolio(Portfolio.IPO_NAME, this); - pool = new Portfolio(Portfolio.POOL_NAME, this); - unavailable = new Portfolio(Portfolio.UNAVAILABLE_NAME, this); - scrapHeap = new Portfolio(Portfolio.SCRAPHEAP_NAME, this); + ipo = new Portfolio(ipo, IPO_NAME); + pool = new Portfolio(pool, POOL_NAME); + unavailable = new Portfolio(unavailable, UNAVAILABLE_NAME); + scrapHeap = new Portfolio(scrapHeap, SCRAPHEAP_NAME); String configFormat = Config.get("money_format"); if (Util.hasValue(configFormat) && configFormat.matches(".*@.*")) { @@ -88,33 +94,33 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon Tag bankTag = tag.getChild("Bank"); if (bankTag != null) { - money.setCash(bankTag.getAttributeAsInteger("amount", + money.set(bankTag.getAttributeAsInteger("amount", DEFAULT_BANK_AMOUNT)); } } - public void finishConfiguration (GameManagerI gameManager) { + public void finishConfiguration (GameManager gameManager) { ReportBuffer.add(LocalText.getText("BankSizeIs", - format(money.getCash()))); + format(money.value()))); // Add privates - List<PrivateCompanyI> privates = + List<PrivateCompany> privates = gameManager.getCompanyManager().getAllPrivateCompanies(); - for (PrivateCompanyI priv : privates) { + for (PrivateCompany priv : privates) { ipo.addPrivate(priv, -1); } // Add public companies - List<PublicCompanyI> companies = + List<PublicCompany> companies = gameManager.getCompanyManager().getAllPublicCompanies(); - for (PublicCompanyI comp : companies) { - for (PublicCertificateI cert : comp.getCertificates()) { + for (PublicCompany comp : companies) { + for (PublicCertificate cert : comp.getCertificates()) { if (cert.isInitiallyAvailable()) { - ipo.addCertificate(cert); + cert.moveTo(ipo); } else { - unavailable.addCertificate(cert); + cert.moveTo(unavailable); } } } @@ -134,8 +140,8 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon /** * @return Bank's current cash level */ - public int getCash() { - return money.getCash(); + public int getCashValue() { + return money.value(); } /** @@ -143,13 +149,13 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon */ public void addCash(int amount) { - money.addCash(amount); + money.add(amount); /* * Check if the bank has broken. In some games <0 could apply, so this * will become configurable. */ - if (money.getCash() <= 0 && !broken.booleanValue()) { + if (money.value() <= 0 && !broken.booleanValue()) { broken.set(true); money.setText(LocalText.getText("BROKEN")); GameManager.getInstance().registerBrokenBank(); @@ -174,7 +180,7 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon * @param Set Bank's cash. */ public void setCash(int i) { - money.setCash(i); + money.set(i); } public String getId() { @@ -185,10 +191,6 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon return money.getData(); } - public Model<String> getCashModel() { - return money; - } - public static String format(int amount) { // Replace @ with the amount String result = instance.moneyFormat.replaceFirst("@", String.valueOf(amount)); @@ -206,4 +208,13 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon return result.toString(); } // end sfy 1889 + + public int getCash() { + return money.value(); + } + + public CashModel getCashModel() { + return money; + } + } diff --git a/rails/game/BaseToken.java b/rails/game/BaseToken.java index fb2b6bd..bba6edd 100644 --- a/rails/game/BaseToken.java +++ b/rails/game/BaseToken.java @@ -1,8 +1,3 @@ -/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/BaseToken.java,v 1.4 2008/06/04 19:00:30 evos Exp $ - * - * Created on Jan 1, 2007 - * Change Log: - */ package rails.game; /** @@ -17,28 +12,30 @@ package rails.game; */ public class BaseToken extends Token { - PublicCompanyI company; + PublicCompany company; /** * Create a BaseToken. */ - public BaseToken(PublicCompanyI company) { + + // TODO: Seems that company is a duplicated reference to owner + public BaseToken(PublicCompany company) { super(); this.company = company; /* Initially. a BaseToken is always owned by a company. */ - setHolder(company); + this.moveTo(company); } public boolean isPlaced() { - return (holder instanceof Stop); + return (getOwner() instanceof Stop); } public String getId() { return company.getId(); } - public PublicCompanyI getCompany() { + public PublicCompany getCompany() { return company; } diff --git a/rails/game/Bonus.java b/rails/game/Bonus.java index cfafc5b..45da940 100644 --- a/rails/game/Bonus.java +++ b/rails/game/Bonus.java @@ -24,14 +24,16 @@ import rails.algorithms.RevenueStaticModifier; */ public class Bonus implements Closeable, RevenueStaticModifier { - private PublicCompanyI owner; + private PublicCompany owner; private List<MapHex> locations = null; private String name; private int value; - private String removingObjectDesc = null; + // TODO: What was the intention of those? +/* private String removingObjectDesc = null; private Object removingObject = null; - - public Bonus (PublicCompanyI owner, +*/ + + public Bonus (PublicCompany owner, String name, int value, List<MapHex> locations) { this.owner = owner; this.name = name; @@ -46,7 +48,7 @@ public class Bonus implements Closeable, RevenueStaticModifier { return false; } - public PublicCompanyI getOwner() { + public PublicCompany getOwner() { return owner; } diff --git a/rails/game/BonusToken.java b/rails/game/BonusToken.java index ee9c6a0..0d01a43 100644 --- a/rails/game/BonusToken.java +++ b/rails/game/BonusToken.java @@ -8,8 +8,6 @@ package rails.game; import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; -import rails.game.state.MoveUtils; -import rails.game.state.ObjectMove; import rails.util.Util; /** @@ -26,14 +24,15 @@ public class BonusToken extends Token implements Closeable, ConfigurableComponen String name; String removingObjectDesc = null; Object removingObject = null; - PublicCompanyI user = null; + PublicCompany user = null; /** * Create a BonusToken. */ + // TODO: Check if moveTo null is possible public BonusToken() { super(); - setHolder(null); + this.moveTo(null); } public void configureFromXML(Tag tag) throws ConfigurationException { @@ -56,7 +55,7 @@ public class BonusToken extends Token implements Closeable, ConfigurableComponen removingObjectDesc = bonusTokenTag.getAttributeAsString("removed"); } - public void finishConfiguration(GameManagerI gameManager) { + public void finishConfiguration(GameManager gameManager) { prepareForRemoval (gameManager.getPhaseManager()); } @@ -66,7 +65,7 @@ public class BonusToken extends Token implements Closeable, ConfigurableComponen * See prepareForRemovel(). */ public void close() { - MoveUtils.objectMove(this, holder.getTokens(), GameManager.getInstance().getBank().getScrapHeap().tokens); + this.moveTo(GameManager.getInstance().getBank().getScrapHeap()); if (user != null) { user.removeBonus(name); } @@ -94,12 +93,12 @@ public class BonusToken extends Token implements Closeable, ConfigurableComponen } } - public void setUser(PublicCompanyI user) { + public void setUser(PublicCompany user) { this.user = user; } public boolean isPlaced() { - return (holder instanceof MapHex); + return (getOwner() instanceof MapHex); } public String getId() { diff --git a/rails/game/CashHolder.java b/rails/game/CashHolder.java deleted file mode 100644 index 6da408a..0000000 --- a/rails/game/CashHolder.java +++ /dev/null @@ -1,26 +0,0 @@ -/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/CashHolder.java,v 1.4 2008/06/04 19:00:30 evos Exp $ - */ -package rails.game; - -import rails.game.model.Model; -import rails.game.state.Item; - -public interface CashHolder extends Item { - - /** - * Returns the amount of cash. - * - * @return current amount. - */ - public abstract int getCash(); - - public Model<String> getCashModel(); - - /** - * Add (or subtract) cash. - */ - public abstract void addCash(int amount); - - /** Get the cash owner's name (needed for logging) */ - public abstract String getId(); -} \ No newline at end of file diff --git a/rails/game/Certificate.java b/rails/game/Certificate.java index c802fbe..01c13e7 100644 --- a/rails/game/Certificate.java +++ b/rails/game/Certificate.java @@ -1,13 +1,14 @@ package rails.game; -import rails.game.state.Moveable; +import rails.game.model.Ownable; +import rails.game.model.Portfolio; /** - * The superinterface of PrivateCompanyI and PublicCertificateI, which allows + * The superinterface of PrivateCompany and PublicCertificate, which allows * objects implementating these interfaces to be combined in start packets and * other contexts where their "certificateship" is of interest. */ -public interface Certificate extends Moveable { +public interface Certificate extends Ownable { /** * @return Portfolio diff --git a/rails/game/Company.java b/rails/game/Company.java index 474c717..588c73e 100644 --- a/rails/game/Company.java +++ b/rails/game/Company.java @@ -1,23 +1,33 @@ -/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/Company.java,v 1.18 2010/05/24 11:20:42 evos Exp $ */ package rails.game; -import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; +import com.google.common.collect.ImmutableList; + import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; +import rails.game.model.DirectOwner; +import rails.game.model.HolderModel; +import rails.game.model.Portfolio; import rails.game.special.SpecialPropertyI; -import rails.game.state.AbstractItem; import rails.game.state.BooleanState; -import rails.game.state.Holder; import rails.util.Util; -public abstract class Company extends AbstractItem implements CompanyI, ConfigurableComponentI, +public abstract class Company extends DirectOwner implements ConfigurableComponentI, Cloneable, Comparable<Company> { + /** The name of the XML tag used to configure a company. */ + public static final String COMPANY_ELEMENT_ID = "Company"; + + /** The name of the XML attribute for the company's name. */ + public static final String COMPANY_NAME_TAG = "name"; + + /** The name of the XML attribute for the company's type. */ + public static final String COMPANY_TYPE_TAG = "type"; + protected String name; protected String longName; protected String alias = null; // To allow reloading files with old names after name changes @@ -48,7 +58,7 @@ Cloneable, Comparable<Company> { protected BooleanState closedObject; // Moved here from PrivayeCOmpany on behalf of 1835 - protected List<SpecialPropertyI> specialProperties = null; + protected HolderModel<SpecialPropertyI> specialProperties = null; protected static Logger log = Logger.getLogger(Company.class.getPackage().getName()); @@ -83,10 +93,11 @@ Cloneable, Comparable<Company> { log.fatal ("Cannot instantiate "+className, e); System.exit(-1); } - sp.setCompany(this); - if (specialProperties == null) specialProperties = new ArrayList<SpecialPropertyI>(2); - specialProperties.add(sp); + if (specialProperties == null) { + specialProperties = HolderModel.create(this, SpecialPropertyI.class); + } sp.configureFromXML(spTag); + sp.moveTo(this); parentInfoText += "<br>" + sp.getInfo(); } } @@ -95,8 +106,8 @@ Cloneable, Comparable<Company> { /** * @return ArrayList of all special properties we have. */ - public List<SpecialPropertyI> getSpecialProperties() { - return specialProperties; + public ImmutableList<SpecialPropertyI> getSpecialProperties() { + return specialProperties.view(); } /** @@ -108,6 +119,10 @@ Cloneable, Comparable<Company> { return specialProperties != null && !specialProperties.isEmpty(); } + public boolean hasPortfolio() { + return true; + } + /** * Get the Portfolio of this company, containing all privates and * certificates owned.. @@ -207,9 +222,11 @@ Cloneable, Comparable<Company> { value = i; } - public Holder getHolder() { + // TODO: Check if this is still required, moved to subclasses +/* public Portfolio getHolder() { return portfolio; } +*/ @Override public Object clone() throws CloneNotSupportedException { @@ -217,12 +234,12 @@ Cloneable, Comparable<Company> { } /** - * Stub method implemented to comply with TokenHolderI interface. Always + * Stub method implemented to comply with HolderModel<Token>I interface. Always * returns false. * * Use addToken(MapHex hex) method instead. */ - public boolean addToken(CompanyI company, int position) { + public boolean addToken(Company company, int position) { return false; } @@ -232,7 +249,7 @@ Cloneable, Comparable<Company> { + " $" + this.getValue(); } - public boolean equals(CompanyI company) { + public boolean equals(Company company) { if (this.companyNumber == company.getCompanyNumber() && this.name.equals(company.getId()) && this.type.equals(company.getType())) return true; @@ -251,10 +268,10 @@ Cloneable, Comparable<Company> { return result; } - public static String joinNamesWithDelimiter (List<CompanyI> companies, String delimiter) { + public static String joinNamesWithDelimiter (List<Company> companies, String delimiter) { StringBuilder b = new StringBuilder(""); if (companies != null) { - for (CompanyI company : companies) { + for (Company company : companies) { if (b.length() > 0) b.append(delimiter); b.append(company.getId()); } diff --git a/rails/game/CompanyI.java b/rails/game/CompanyI.java deleted file mode 100644 index 0e3eb6e..0000000 --- a/rails/game/CompanyI.java +++ /dev/null @@ -1,115 +0,0 @@ -/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/CompanyI.java,v 1.8 2010/02/28 21:38:05 evos Exp $ */ -package rails.game; - -import java.util.List; - -import rails.common.parser.ConfigurableComponentI; -import rails.game.special.SpecialPropertyI; -import rails.game.state.Item; -import rails.game.state.Holder; - -/** - * To be implemented by any Company object. - */ -public interface CompanyI extends Item, ConfigurableComponentI, Holder { - - /** The name of the XML tag used to configure a company. */ - public static final String COMPANY_ELEMENT_ID = "Company"; - - /** The name of the XML attribute for the company's name. */ - public static final String COMPANY_NAME_TAG = "name"; - - /** The name of the XML attribute for the company's type. */ - public static final String COMPANY_TYPE_TAG = "type"; - - void init(String name, CompanyTypeI type); - - /** - * @return ArrayList of all special properties we have. - */ - public List<SpecialPropertyI> getSpecialProperties(); - - /** - * Do we have any special properties? - * - * @return Boolean - */ - public boolean hasSpecialProperties(); - - /** - * Get the Portfolio of this company, containing all privates and - * certificates owned.. - * - * @return The Portfolio of this company. - */ - public Portfolio getPortfolio(); - - /** - * Returns the name of the Company - * - * @return the name of the Company - */ - public String getId(); - - public String getLongName(); - - public String getInfoText(); - - public String getAlias(); - - /** - * Returns the CompanyType of the Company - * - * @return the type of the Company - */ - CompanyTypeI getType(); - - /** - * Returns the type name of the Company - * - * @return type name - */ - public String getTypeName(); - - /** - * @return Company Value - */ - int getValue(); - - /** - * @param Company Value - */ - void setValue(int i); - - /** - * @return Company number - */ - int getCompanyNumber(); - - /** - * @return true if Company is closed. - */ - boolean isClosed(); - - /** - * Set company to closed - */ - void setClosed(); - - /** - * @return - */ - public int getCertLimitCount(); - - /** - * @param i - */ - public void setCertLimitCount(int i); - - public abstract Object clone() throws CloneNotSupportedException; - - // Overriding some standard methods with something more useful. - public String toString(); - - public boolean equals(CompanyI company); -} diff --git a/rails/game/CompanyManager.java b/rails/game/CompanyManager.java index 002d54f..455f565 100644 --- a/rails/game/CompanyManager.java +++ b/rails/game/CompanyManager.java @@ -1 +1 @@ -/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/CompanyManager.java,v 1.24 2010/04/15 19:49:50 evos Exp $ */ package rails.game; import java.util.*; import org.apache.log4j.Logger; import rails.common.LocalText; import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; public class CompanyManager implements CompanyManagerI, ConfigurableComponentI { /** A List with all private companies */ private List<PrivateCompanyI> lPrivateCompanies = new ArrayList<PrivateCompanyI>(); /** A List with all public companies */ private List<PublicCompanyI> lPublicCompanies = new ArrayList<PublicCompanyI>(); /** A map with all private companies by name */ private Map<String, PrivateCompanyI> mPrivateCompanies = new HashMap<String, PrivateCompanyI>(); /** A map with all public (i.e. non-private) companies by name */ private Map<String, PublicCompanyI> mPublicCompanies = new HashMap<String, PublicCompanyI>(); /** A map of all type names to maps of companies of that type by name */ // TODO Redundant, current usage can be replaced. private Map<String, Map<String, CompanyI>> mCompaniesByTypeAndName = new HashMap<String, Map<String, CompanyI>>(); /** A list of all company types */ private List<CompanyTypeI> lCompanyTypes = new ArrayList<CompanyTypeI>(); /** A list of all start packets (usually one) */ private List<StartPacket> startPackets = new ArrayList<StartPacket>(); /** A map of all start packets, keyed by name. Default name is "Initial" */ private Map<String, StartPacket> startPacketMap = new HashMap<String, StartPacket>(); /** A map to enable translating aliases to names */ protected Map<String, String> aliases = null; private int numberOfPublicCompanies = 0; protected static Logger log = Logger.getLogger(CompanyManager.class.getPackage().getName()); protected GameMan |
From: Erik V. <ev...@us...> - 2011-10-13 21:21:41
|
data/1835/CompanyManager.xml | 2 rails/game/GameManager.java | 2 rails/game/StartRound_1835.java | 274 ------------------------ rails/game/action/PossibleActions.java | 11 - rails/game/specific/_1835/StartRound_1835.java | 275 +++++++++++++++++++++++++ 5 files changed, 284 insertions(+), 280 deletions(-) New commits: commit 1893c34a2ea53e78be3bd4828ccff1e675018e0c Author: Erik Vos <eri...@xs...> Date: Thu Oct 13 22:30:03 2011 +0200 In 1835 Start Round, removed popups that reported forced passes. Also removed some redundant/ineffective code. diff --git a/rails/game/GameManager.java b/rails/game/GameManager.java index 8507931..b7f9859 100644 --- a/rails/game/GameManager.java +++ b/rails/game/GameManager.java @@ -893,9 +893,11 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { getCurrentRound().setPossibleActions(); // only pass available => execute automatically + /* if (!isGameOver() && possibleActions.containsOnlyPass()) { result = process(possibleActions.getList().get(0)); } + */ // moveStack closing is done here to allow state changes to occur // when setting possible actions diff --git a/rails/game/action/PossibleActions.java b/rails/game/action/PossibleActions.java index 3126948..8eabf5d 100644 --- a/rails/game/action/PossibleActions.java +++ b/rails/game/action/PossibleActions.java @@ -27,7 +27,7 @@ public class PossibleActions { private List<PossibleAction> possibleActions; protected static Logger log = - Logger.getLogger(PossibleActions.class.getPackage().getName()); + Logger.getLogger(PossibleActions.class.getPackage().getName()); /** * This class can only be instantiated locally. @@ -82,7 +82,8 @@ public class PossibleActions { public boolean isEmpty() { return possibleActions.isEmpty(); } - + + /* OBSOLETE public boolean containsOnlyPass() { if (possibleActions.size() != 1) return false; PossibleAction action = possibleActions.get(0); @@ -91,7 +92,7 @@ public class PossibleActions { } else { return false; } - } + }*/ /** Check if a given action exists in the current list of possible actions */ public boolean validate(PossibleAction checkedAction) { @@ -99,8 +100,8 @@ public class PossibleActions { // Some actions are always allowed if (checkedAction instanceof GameAction && (((GameAction)checkedAction).getMode() == GameAction.SAVE - || ((GameAction)checkedAction).getMode() == GameAction.RELOAD - || ((GameAction)checkedAction).getMode() == GameAction.EXPORT)) { + || ((GameAction)checkedAction).getMode() == GameAction.RELOAD + || ((GameAction)checkedAction).getMode() == GameAction.EXPORT)) { return true; } diff --git a/rails/game/specific/_1835/StartRound_1835.java b/rails/game/specific/_1835/StartRound_1835.java index cfca1c1..0768fce 100644 --- a/rails/game/specific/_1835/StartRound_1835.java +++ b/rails/game/specific/_1835/StartRound_1835.java @@ -128,7 +128,7 @@ public class StartRound_1835 extends StartRound { LocalText.getText("CannotBuyAnything", currentPlayer.getName()); ReportBuffer.add(message); - DisplayBuffer.add(message); + //DisplayBuffer.add(message); numPasses.add(1); if (numPasses.intValue() >= numPlayers) { /* commit b5cb481a353309e04d48c49b9ca363f4f9e6c532 Author: Erik Vos <eri...@xs...> Date: Thu Oct 13 21:15:53 2011 +0200 Moved StartRound_1835 to the game-specific package. diff --git a/data/1835/CompanyManager.xml b/data/1835/CompanyManager.xml index dc0030a..dcc124d 100644 --- a/data/1835/CompanyManager.xml +++ b/data/1835/CompanyManager.xml @@ -214,7 +214,7 @@ <Trains limit="4,4,3"/> </Company> - <StartPacket roundClass="rails.game.StartRound_1835" variant="Snake"> + <StartPacket roundClass="rails.game.specific._1835.StartRound_1835" variant="Snake"> <Item name="NF" type="Private" basePrice="100" row="1"> <SubItem name="Bay" type="Major"/> </Item> diff --git a/rails/game/StartRound_1835.java b/rails/game/StartRound_1835.java deleted file mode 100644 index 80710e7..0000000 --- a/rails/game/StartRound_1835.java +++ /dev/null @@ -1,274 +0,0 @@ -/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/StartRound_1835.java,v 1.26 2010/03/30 21:59:03 evos Exp $ */ -package rails.game; - -import java.util.ArrayList; -import java.util.List; - -import rails.common.DisplayBuffer; -import rails.common.LocalText; -import rails.game.action.*; -import rails.game.state.IntegerState; - -/** - * Implements an 1835-style startpacket sale. - */ -public class StartRound_1835 extends StartRound { - - /* To control the player sequence in the Clemens and Snake variants */ - private static IntegerState turn = new IntegerState("TurnNumber", 0); - - private static IntegerState startRoundNumber = - new IntegerState("StartRoundNumber", 0); - - /* Additional variants */ - public static final String CLEMENS_VARIANT = "Clemens"; - public static final String SNAKE_VARIANT = "Snake"; - - /** - * Constructor, only to be used in dynamic instantiation. - */ - public StartRound_1835(GameManagerI gameManager) { - super(gameManager); - hasBidding = false; - } - - /** - * Start the 1835-style start round. - * - * @param startPacket The startpacket to be sold in this start round. - */ - @Override - public void start() { - super.start(); - startRoundNumber.add(1); - - if (variant.equalsIgnoreCase(CLEMENS_VARIANT)) { - setCurrentPlayerIndex (numPlayers-1); - } - - - if (!setPossibleActions()) { - /* - * If nobody can do anything, keep executing Operating and Start - * rounds until someone has got enough money to buy one of the - * remaining items. The game mechanism ensures that this will - * ultimately be possible. - */ - //gameManager.nextRound(this); - finishRound(); - } - - } - - @Override - public boolean setPossibleActions() { - - List<StartItem> startItems = startPacket.getItems(); - List<StartItem> buyableItems = new ArrayList<StartItem>(); - int row; - boolean buyable; - int items = 0; - int minRow = 0; - - /* - * First, mark which items are buyable. Once buyable, they always remain - * so until bought, so there is no need to check is an item is still - * buyable. - */ - for (StartItem item : startItems) { - buyable = false; - - if (item.isSold()) { - // Already sold: skip - } else if (variant.equalsIgnoreCase(CLEMENS_VARIANT)) { - buyable = true; - } else { - row = item.getRow(); - if (minRow == 0) minRow = row; - if (row == minRow) { - // Allow all items in the top row. - buyable = true; - } else if (row == minRow + 1 && items == 1) { - // Allow the first item in the next row if the - // top row has only one item. - buyable = true; - } - } - if (buyable) { - items++; - item.setStatus(StartItem.BUYABLE); - buyableItems.add(item); - } - } - possibleActions.clear(); - - /* - * Repeat until we have found a player with enough money to buy some - * item - */ - while (possibleActions.isEmpty()) { - - Player currentPlayer = getCurrentPlayer(); - if (currentPlayer == startPlayer) ReportBuffer.add(""); - - int cashToSpend = currentPlayer.getCash(); - - for (StartItem item : buyableItems) { - - if (item.getBasePrice() <= cashToSpend) { - /* Player does have the cash */ - possibleActions.add(new BuyStartItem(item, - item.getBasePrice(), false)); - } - } - - if (possibleActions.isEmpty()) { - String message = - LocalText.getText("CannotBuyAnything", - currentPlayer.getName()); - ReportBuffer.add(message); - DisplayBuffer.add(message); - numPasses.add(1); - if (numPasses.intValue() >= numPlayers) { - /* - * No-one has enough cash left to buy anything, so close the - * Start Round. - */ - numPasses.set(0); - finishRound(); - gameManager.getCurrentRound().setPossibleActions(); - - // This code may be called recursively. - // Jump out as soon as we have something to do - if (!possibleActions.isEmpty()) break; - - return false; - } - setNextPlayer(); - } - } - - /* Pass is always allowed */ - possibleActions.add(new NullAction(NullAction.PASS)); - - return true; - } - - /*----- moveStack methods -----*/ - - @Override - public boolean bid(String playerName, BidStartItem item) { - - DisplayBuffer.add(LocalText.getText("InvalidAction")); - return false; - } - - /** - * Set the next player turn. - * - */ - @Override - protected void setNextPlayer() { - - /* Select the player that has the turn. */ - - if (startRoundNumber.intValue() == 1) { - /* - * Some variants have a reversed player order in the first or second - * cycle of the first round (a cycle spans one turn of all players). - * In such a case we need to keep track of the number of player - * turns. - */ - turn.add(1); - int turnNumber = turn.intValue(); - int cycleNumber = turnNumber / numPlayers; - int turnIndex = turnNumber % numPlayers; - int newIndex; - - if (variant.equalsIgnoreCase(CLEMENS_VARIANT)) { - /* Reverse order in the first cycle only */ - newIndex = - cycleNumber == 0 ? numPlayers - 1 - turnIndex - : turnIndex; - } else if (variant.equalsIgnoreCase(SNAKE_VARIANT)) { - /* Reverse order in the second cycle only */ - newIndex = - cycleNumber == 1 ? numPlayers - 1 - turnIndex - : turnIndex; - } else { - newIndex = turnIndex; - } - Player oldPlayer = getCurrentPlayer(); - setCurrentPlayerIndex(newIndex); - Player newPlayer = getCurrentPlayer(); - log.debug("Game turn has moved from " + oldPlayer.getName() - + " to " + newPlayer.getName() + " [startRound=" - + startRoundNumber + " cycle=" + cycleNumber + " turn=" - + turnNumber + " newIndex=" + newIndex + "]"); - - } else { - - /* In any subsequent Round, the normal order applies. */ - Player oldPlayer = getCurrentPlayer(); - super.setNextPlayer(); - Player newPlayer = getCurrentPlayer(); - log.debug("Game turn has moved from " + oldPlayer.getName() - + " to " + newPlayer.getName()); - } - - return; - } - - /** - * Process a player's pass. - * - * @param playerName The name of the current player (for checking purposes). - */ - @Override - public boolean pass(String playerName) { - - String errMsg = null; - Player player = getCurrentPlayer(); - - while (true) { - - // Check player - if (!playerName.equals(player.getName())) { - errMsg = LocalText.getText("WrongPlayer", playerName, player.getName()); - break; - } - break; - } - - if (errMsg != null) { - DisplayBuffer.add(LocalText.getText("InvalidPass", - playerName, - errMsg )); - return false; - } - - ReportBuffer.add(LocalText.getText("PASSES", playerName)); - - moveStack.start(false); - - numPasses.add(1); - - if (numPasses.intValue() >= numPlayers) { - // All players have passed. - ReportBuffer.add(LocalText.getText("ALL_PASSED")); - numPasses.set(0); - //gameManager.nextRound(this); - finishRound(); - } else { - setNextPlayer(); - } - - return true; - } - - @Override - public String getHelp() { - return "1835 Start Round help text"; - } - -} diff --git a/rails/game/specific/_1835/StartRound_1835.java b/rails/game/specific/_1835/StartRound_1835.java new file mode 100644 index 0000000..cfca1c1 --- /dev/null +++ b/rails/game/specific/_1835/StartRound_1835.java @@ -0,0 +1,275 @@ +/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/StartRound_1835.java,v 1.26 2010/03/30 21:59:03 evos Exp $ */ +package rails.game.specific._1835; + +import java.util.ArrayList; +import java.util.List; + +import rails.common.DisplayBuffer; +import rails.common.LocalText; +import rails.game.*; +import rails.game.action.*; +import rails.game.state.IntegerState; + +/** + * Implements an 1835-style startpacket sale. + */ +public class StartRound_1835 extends StartRound { + + /* To control the player sequence in the Clemens and Snake variants */ + private static IntegerState turn = new IntegerState("TurnNumber", 0); + + private static IntegerState startRoundNumber = + new IntegerState("StartRoundNumber", 0); + + /* Additional variants */ + public static final String CLEMENS_VARIANT = "Clemens"; + public static final String SNAKE_VARIANT = "Snake"; + + /** + * Constructor, only to be used in dynamic instantiation. + */ + public StartRound_1835(GameManagerI gameManager) { + super(gameManager); + hasBidding = false; + } + + /** + * Start the 1835-style start round. + * + * @param startPacket The startpacket to be sold in this start round. + */ + @Override + public void start() { + super.start(); + startRoundNumber.add(1); + + if (variant.equalsIgnoreCase(CLEMENS_VARIANT)) { + setCurrentPlayerIndex (numPlayers-1); + } + + + if (!setPossibleActions()) { + /* + * If nobody can do anything, keep executing Operating and Start + * rounds until someone has got enough money to buy one of the + * remaining items. The game mechanism ensures that this will + * ultimately be possible. + */ + //gameManager.nextRound(this); + finishRound(); + } + + } + + @Override + public boolean setPossibleActions() { + + List<StartItem> startItems = startPacket.getItems(); + List<StartItem> buyableItems = new ArrayList<StartItem>(); + int row; + boolean buyable; + int items = 0; + int minRow = 0; + + /* + * First, mark which items are buyable. Once buyable, they always remain + * so until bought, so there is no need to check is an item is still + * buyable. + */ + for (StartItem item : startItems) { + buyable = false; + + if (item.isSold()) { + // Already sold: skip + } else if (variant.equalsIgnoreCase(CLEMENS_VARIANT)) { + buyable = true; + } else { + row = item.getRow(); + if (minRow == 0) minRow = row; + if (row == minRow) { + // Allow all items in the top row. + buyable = true; + } else if (row == minRow + 1 && items == 1) { + // Allow the first item in the next row if the + // top row has only one item. + buyable = true; + } + } + if (buyable) { + items++; + item.setStatus(StartItem.BUYABLE); + buyableItems.add(item); + } + } + possibleActions.clear(); + + /* + * Repeat until we have found a player with enough money to buy some + * item + */ + while (possibleActions.isEmpty()) { + + Player currentPlayer = getCurrentPlayer(); + if (currentPlayer == startPlayer) ReportBuffer.add(""); + + int cashToSpend = currentPlayer.getCash(); + + for (StartItem item : buyableItems) { + + if (item.getBasePrice() <= cashToSpend) { + /* Player does have the cash */ + possibleActions.add(new BuyStartItem(item, + item.getBasePrice(), false)); + } + } + + if (possibleActions.isEmpty()) { + String message = + LocalText.getText("CannotBuyAnything", + currentPlayer.getName()); + ReportBuffer.add(message); + DisplayBuffer.add(message); + numPasses.add(1); + if (numPasses.intValue() >= numPlayers) { + /* + * No-one has enough cash left to buy anything, so close the + * Start Round. + */ + numPasses.set(0); + finishRound(); + gameManager.getCurrentRound().setPossibleActions(); + + // This code may be called recursively. + // Jump out as soon as we have something to do + if (!possibleActions.isEmpty()) break; + + return false; + } + setNextPlayer(); + } + } + + /* Pass is always allowed */ + possibleActions.add(new NullAction(NullAction.PASS)); + + return true; + } + + /*----- moveStack methods -----*/ + + @Override + public boolean bid(String playerName, BidStartItem item) { + + DisplayBuffer.add(LocalText.getText("InvalidAction")); + return false; + } + + /** + * Set the next player turn. + * + */ + @Override + protected void setNextPlayer() { + + /* Select the player that has the turn. */ + + if (startRoundNumber.intValue() == 1) { + /* + * Some variants have a reversed player order in the first or second + * cycle of the first round (a cycle spans one turn of all players). + * In such a case we need to keep track of the number of player + * turns. + */ + turn.add(1); + int turnNumber = turn.intValue(); + int cycleNumber = turnNumber / numPlayers; + int turnIndex = turnNumber % numPlayers; + int newIndex; + + if (variant.equalsIgnoreCase(CLEMENS_VARIANT)) { + /* Reverse order in the first cycle only */ + newIndex = + cycleNumber == 0 ? numPlayers - 1 - turnIndex + : turnIndex; + } else if (variant.equalsIgnoreCase(SNAKE_VARIANT)) { + /* Reverse order in the second cycle only */ + newIndex = + cycleNumber == 1 ? numPlayers - 1 - turnIndex + : turnIndex; + } else { + newIndex = turnIndex; + } + Player oldPlayer = getCurrentPlayer(); + setCurrentPlayerIndex(newIndex); + Player newPlayer = getCurrentPlayer(); + log.debug("Game turn has moved from " + oldPlayer.getName() + + " to " + newPlayer.getName() + " [startRound=" + + startRoundNumber + " cycle=" + cycleNumber + " turn=" + + turnNumber + " newIndex=" + newIndex + "]"); + + } else { + + /* In any subsequent Round, the normal order applies. */ + Player oldPlayer = getCurrentPlayer(); + super.setNextPlayer(); + Player newPlayer = getCurrentPlayer(); + log.debug("Game turn has moved from " + oldPlayer.getName() + + " to " + newPlayer.getName()); + } + + return; + } + + /** + * Process a player's pass. + * + * @param playerName The name of the current player (for checking purposes). + */ + @Override + public boolean pass(String playerName) { + + String errMsg = null; + Player player = getCurrentPlayer(); + + while (true) { + + // Check player + if (!playerName.equals(player.getName())) { + errMsg = LocalText.getText("WrongPlayer", playerName, player.getName()); + break; + } + break; + } + + if (errMsg != null) { + DisplayBuffer.add(LocalText.getText("InvalidPass", + playerName, + errMsg )); + return false; + } + + ReportBuffer.add(LocalText.getText("PASSES", playerName)); + + moveStack.start(false); + + numPasses.add(1); + + if (numPasses.intValue() >= numPlayers) { + // All players have passed. + ReportBuffer.add(LocalText.getText("ALL_PASSED")); + numPasses.set(0); + //gameManager.nextRound(this); + finishRound(); + } else { + setNextPlayer(); + } + + return true; + } + + @Override + public String getHelp() { + return "1835 Start Round help text"; + } + +} |
From: Erik V. <ev...@us...> - 2011-10-13 15:41:56
|
data/GamesList.xml | 6 - rails/game/GameManager.java | 10 ++ rails/game/StartRound_1835.java | 35 +++++----- rails/game/specific/_1835/GameManager_1835.java | 49 +++++++++----- rails/game/specific/_1835/OperatingRound_1835.java | 36 +++++----- rails/game/specific/_1835/PrussianFormationRound.java | 63 ++++++++---------- 6 files changed, 110 insertions(+), 89 deletions(-) New commits: commit d5283097c814b535456a530af604b9640b68d603 Author: Erik Vos <eri...@xs...> Date: Thu Oct 13 17:31:12 2011 +0200 Fixed two 1835 bugs and updated Game Notes. - Crash in final PR formation round. Cause: already closed privates were not excluded from the merge process. - Hangs in first OR if Start Packet not sold. Caused by missing call to setPossibleActions() in StartRound_1835. Also corrected 'operate' flag for this case when creating OR object (unclear if this omission was causing problems). Removed bug description and workaround from the Game Notes. Replaced workaround for the non-closing privates bug. diff --git a/data/GamesList.xml b/data/GamesList.xml index de88eb3..9d9b161 100644 --- a/data/GamesList.xml +++ b/data/GamesList.xml @@ -204,10 +204,8 @@ Three variants have been implemented: - Snake Known bugs: - - Game hangs in OR if Start Packet has not been sold and minors run. - Workaround: save the game. - - OBB and PfB do not always close when required. - Workaround: close minor via the Special menu. + - OBB and PfB do not always close when required. + Workaround: close minor via the Special menu. </Description> <Option name="Variant" values="Standard,Clemens,Snake"/> <Option name="RouteAwareness" values="Highlight,Deactivate" default="Highlight" /> diff --git a/rails/game/specific/_1835/PrussianFormationRound.java b/rails/game/specific/_1835/PrussianFormationRound.java index 79faa66..aa9a3b0 100644 --- a/rails/game/specific/_1835/PrussianFormationRound.java +++ b/rails/game/specific/_1835/PrussianFormationRound.java @@ -2,9 +2,7 @@ package rails.game.specific._1835; import java.util.*; -import rails.common.DisplayBuffer; -import rails.common.GuiDef; -import rails.common.LocalText; +import rails.common.*; import rails.game.*; import rails.game.action.DiscardTrain; import rails.game.action.PossibleAction; @@ -18,10 +16,10 @@ public class PrussianFormationRound extends StockRound { private PublicCompanyI m2; private PhaseI phase; - private boolean startPr; - private boolean forcedStart; - private boolean mergePr; - private boolean forcedMerge; + private boolean startPr; + private boolean forcedStart; + private boolean mergePr; + private boolean forcedMerge; private List<CompanyI> foldablePrePrussians; @@ -33,7 +31,7 @@ public class PrussianFormationRound extends StockRound { Step step; - private static String PR_ID = GameManager_1835.PR_ID; + private static String PR_ID = GameManager_1835.PR_ID; private static String M2_ID = GameManager_1835.M2_ID; public PrussianFormationRound (GameManagerI gameManager) { @@ -44,19 +42,19 @@ public class PrussianFormationRound extends StockRound { } - @Override - public void start() { + @Override + public void start() { prussian = companyManager.getPublicCompany(PR_ID); phase = getCurrentPhase(); - startPr = !prussian.hasStarted(); + startPr = !prussian.hasStarted(); forcedMerge = phase.getName().equals("5"); forcedStart = phase.getName().equals("4+4") || forcedMerge; - mergePr = !prussianIsComplete(gameManager); + mergePr = !prussianIsComplete(gameManager); ReportBuffer.add(LocalText.getText("StartFormationRound", PR_ID)); log.debug("StartPr="+startPr+" forcedStart="+forcedStart - +" mergePr="+mergePr+" forcedMerge="+forcedMerge); + +" mergePr="+mergePr+" forcedMerge="+forcedMerge); step = startPr ? Step.START : Step.MERGE; @@ -72,7 +70,7 @@ public class PrussianFormationRound extends StockRound { if (step == Step.MERGE) { startingPlayer - = ((GameManager_1835)gameManager).getPrussianFormationStartingPlayer(); + = ((GameManager_1835)gameManager).getPrussianFormationStartingPlayer(); log.debug("Original Prussian starting player was "+startingPlayer.getName()); setCurrentPlayer(startingPlayer); if (forcedMerge) { @@ -80,6 +78,7 @@ public class PrussianFormationRound extends StockRound { setFoldablePrePrussians(); List<CompanyI> foldables = new ArrayList<CompanyI> (); for (PrivateCompanyI company : gameManager.getAllPrivateCompanies()) { + if (company.isClosed()) continue; sps = company.getSpecialProperties(); if (sps != null && !sps.isEmpty() && sps.get(0) instanceof ExchangeForShare) { foldables.add(company); @@ -101,7 +100,7 @@ public class PrussianFormationRound extends StockRound { } @Override - public boolean setPossibleActions() { + public boolean setPossibleActions() { if (step == Step.START) { Player m2Owner = m2.getPresident(); @@ -150,7 +149,7 @@ public class PrussianFormationRound extends StockRound { } @Override - protected boolean processGameSpecificAction(PossibleAction action) { + protected boolean processGameSpecificAction(PossibleAction action) { if (action instanceof FoldIntoPrussian) { @@ -256,13 +255,13 @@ public class PrussianFormationRound extends StockRound { if (cash > 0) { new CashMove(bank, prussian, cash); ReportBuffer.add(LocalText.getText("FloatsWithCash", - prussian.getName(), - Bank.format(cash) )); + prussian.getName(), + Bank.format(cash) )); } else { ReportBuffer.add(LocalText.getText("Floats", prussian.getName())); } - + executeExchange (Arrays.asList(new CompanyI[]{m2}), true, false); prussian.setFloated(); } @@ -280,7 +279,7 @@ public class PrussianFormationRound extends StockRound { break; } - // This is now dead code, but won't be when some sensible validations exist + // This is now dead code, but won't be when some sensible validations exist if (errMsg != null) { DisplayBuffer.add(LocalText.getText("CannotMerge", action.getFoldedCompanyNames(), @@ -301,7 +300,7 @@ public class PrussianFormationRound extends StockRound { } private void executeExchange (List<CompanyI> companies, boolean president, - boolean display) { + boolean display) { ExchangeForShare efs; PublicCertificateI cert; @@ -316,7 +315,7 @@ public class PrussianFormationRound extends StockRound { // Shortcut, sp should be checked efs = (ExchangeForShare) company.getSpecialProperties().get(0); cert = unavailable.findCertificate(prussian, efs.getShare()/prussian.getShareUnit(), - president); + president); cert.moveTo(player.getPortfolio()); //company.setClosed(); String message = LocalText.getText("MERGE_MINOR_LOG", @@ -325,8 +324,8 @@ public class PrussianFormationRound extends StockRound { PR_ID, company instanceof PrivateCompanyI ? "no" : Bank.format(((PublicCompanyI)company).getCash()), - company instanceof PrivateCompanyI ? "no" - : ((PublicCompanyI)company).getPortfolio().getTrainList().size()); + company instanceof PrivateCompanyI ? "no" + : ((PublicCompanyI)company).getPortfolio().getTrainList().size()); ReportBuffer.add(message); if (display) DisplayBuffer.add (message); message = LocalText.getText("GetShareForMinor", @@ -352,8 +351,8 @@ public class PrussianFormationRound extends StockRound { message = LocalText.getText("ExchangesBaseToken", PR_ID, minor.getName(), city.getName()); - ReportBuffer.add(message); - if (display) DisplayBuffer.add (message); + ReportBuffer.add(message); + if (display) DisplayBuffer.add (message); prussian.layBaseToken(hex, 0); } @@ -400,9 +399,9 @@ public class PrussianFormationRound extends StockRound { // Does the company own such a train? if (!company.getPortfolio().getTrainList().contains(train)) { errMsg = - LocalText.getText("CompanyDoesNotOwnTrain", - company.getName(), - train.getName() ); + LocalText.getText("CompanyDoesNotOwnTrain", + company.getName(), + train.getName() ); break; } @@ -436,9 +435,9 @@ public class PrussianFormationRound extends StockRound { protected void finishRound() { RoundI interruptedRound = gameManager.getInterruptedRound(); ReportBuffer.add(" "); - if (interruptedRound != null) { - ReportBuffer.add(LocalText.getText("EndOfFormationRound", PR_ID, - interruptedRound.getRoundName())); + if (interruptedRound != null) { + ReportBuffer.add(LocalText.getText("EndOfFormationRound", PR_ID, + interruptedRound.getRoundName())); } else { ReportBuffer.add(LocalText.getText("EndOfFormationRoundNoInterrupt", PR_ID)); } commit cd9efcef8d70134015e96e25a809f49b468800ea Author: Erik Vos <eri...@xs...> Date: Thu Oct 13 17:11:37 2011 +0200 Fixed 1835 bug: Hangs in first OR if Start Packet not sold. Missing call to setPossibleActions() in StartRound_1835. Also corrected 'operate' flag for this case when creating OR object (unclear if this omission was causing problems). diff --git a/rails/game/GameManager.java b/rails/game/GameManager.java index c691147..8507931 100644 --- a/rails/game/GameManager.java +++ b/rails/game/GameManager.java @@ -644,7 +644,7 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { public void nextRound(RoundI round) { if (round instanceof StartRound) { if (startPacket != null && !startPacket.areAllSold()) { - startOperatingRound(false); + startOperatingRound(runIfStartPacketIsNotCompletelySold()); } else if (skipFirstStockRound) { PhaseI currentPhase = phaseManager.getCurrentPhase(); @@ -693,6 +693,14 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { } } + /** Stub, to be overridden if companies can run before the Start Packet has been completely sold + * (as in 1835). + * @return true if companies can run regardless. Default false. + */ + protected boolean runIfStartPacketIsNotCompletelySold() { + return false; + } + protected void startStartRound() { String startRoundClassName = startPacket.getRoundClassName(); Class<? extends StartRound> startRoundClass = null; diff --git a/rails/game/StartRound_1835.java b/rails/game/StartRound_1835.java index e982aad..80710e7 100644 --- a/rails/game/StartRound_1835.java +++ b/rails/game/StartRound_1835.java @@ -18,7 +18,7 @@ public class StartRound_1835 extends StartRound { private static IntegerState turn = new IntegerState("TurnNumber", 0); private static IntegerState startRoundNumber = - new IntegerState("StartRoundNumber", 0); + new IntegerState("StartRoundNumber", 0); /* Additional variants */ public static final String CLEMENS_VARIANT = "Clemens"; @@ -46,7 +46,7 @@ public class StartRound_1835 extends StartRound { setCurrentPlayerIndex (numPlayers-1); } - + if (!setPossibleActions()) { /* * If nobody can do anything, keep executing Operating and Start @@ -124,8 +124,8 @@ public class StartRound_1835 extends StartRound { if (possibleActions.isEmpty()) { String message = - LocalText.getText("CannotBuyAnything", - currentPlayer.getName()); + LocalText.getText("CannotBuyAnything", + currentPlayer.getName()); ReportBuffer.add(message); DisplayBuffer.add(message); numPasses.add(1); @@ -134,12 +134,13 @@ public class StartRound_1835 extends StartRound { * No-one has enough cash left to buy anything, so close the * Start Round. */ - numPasses.set(0); - finishRound(); + numPasses.set(0); + finishRound(); + gameManager.getCurrentRound().setPossibleActions(); - // This code may be called recursively. - // Jump out as soon as we have something to do - if (!possibleActions.isEmpty()) break; + // This code may be called recursively. + // Jump out as soon as we have something to do + if (!possibleActions.isEmpty()) break; return false; } @@ -187,13 +188,13 @@ public class StartRound_1835 extends StartRound { if (variant.equalsIgnoreCase(CLEMENS_VARIANT)) { /* Reverse order in the first cycle only */ newIndex = - cycleNumber == 0 ? numPlayers - 1 - turnIndex - : turnIndex; + cycleNumber == 0 ? numPlayers - 1 - turnIndex + : turnIndex; } else if (variant.equalsIgnoreCase(SNAKE_VARIANT)) { /* Reverse order in the second cycle only */ newIndex = - cycleNumber == 1 ? numPlayers - 1 - turnIndex - : turnIndex; + cycleNumber == 1 ? numPlayers - 1 - turnIndex + : turnIndex; } else { newIndex = turnIndex; } @@ -201,9 +202,9 @@ public class StartRound_1835 extends StartRound { setCurrentPlayerIndex(newIndex); Player newPlayer = getCurrentPlayer(); log.debug("Game turn has moved from " + oldPlayer.getName() - + " to " + newPlayer.getName() + " [startRound=" - + startRoundNumber + " cycle=" + cycleNumber + " turn=" - + turnNumber + " newIndex=" + newIndex + "]"); + + " to " + newPlayer.getName() + " [startRound=" + + startRoundNumber + " cycle=" + cycleNumber + " turn=" + + turnNumber + " newIndex=" + newIndex + "]"); } else { @@ -212,7 +213,7 @@ public class StartRound_1835 extends StartRound { super.setNextPlayer(); Player newPlayer = getCurrentPlayer(); log.debug("Game turn has moved from " + oldPlayer.getName() - + " to " + newPlayer.getName()); + + " to " + newPlayer.getName()); } return; diff --git a/rails/game/specific/_1835/GameManager_1835.java b/rails/game/specific/_1835/GameManager_1835.java index 1d92d44..8a44dca 100644 --- a/rails/game/specific/_1835/GameManager_1835.java +++ b/rails/game/specific/_1835/GameManager_1835.java @@ -1,12 +1,13 @@ /* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/specific/_1835/GameManager_1835.java,v 1.9 2010/05/15 19:05:39 evos Exp $ */ package rails.game.specific._1835; +import rails.common.parser.GameOption; import rails.game.*; public class GameManager_1835 extends GameManager { - private RoundI previousRound = null; - private Player prFormStartingPlayer = null; + private RoundI previousRound = null; + private Player prFormStartingPlayer = null; public static String M2_ID = "M2"; public static String PR_ID = "PR"; @@ -19,7 +20,21 @@ public class GameManager_1835 extends GameManager { public static String BY_ID = "BY"; public GameManager_1835() { - super(); + super(); + } + + /** In standard 1835, minors can run even if the start packet has not been completely sold, + * unless the "MinorsRequireFloatedBY" option is in effect and the Bayerische + * has not yet floated. + * @return true only if minors can run. + */ + @Override + protected boolean runIfStartPacketIsNotCompletelySold() { + if (getGameOption(GameOption.VARIANT).equalsIgnoreCase("Clemens") + || getGameOption("MinorsRequireFloatedBY").equalsIgnoreCase("yes")) { + return companyManager.getPublicCompany(GameManager_1835.BY_ID).hasFloated(); + } + return true; } @Override @@ -35,15 +50,15 @@ public class GameManager_1835 extends GameManager { previousRound = null; } } else { - PhaseI phase = getCurrentPhase(); - if ((phase.getName().equals("4") || phase.getName().equals("4+4") - || phase.getName().equals("5")) - && !PrussianFormationRound.prussianIsComplete(this)) { - previousRound = round; - startPrussianFormationRound (null); - } else { - super.nextRound(round); - } + PhaseI phase = getCurrentPhase(); + if ((phase.getName().equals("4") || phase.getName().equals("4+4") + || phase.getName().equals("5")) + && !PrussianFormationRound.prussianIsComplete(this)) { + previousRound = round; + startPrussianFormationRound (null); + } else { + super.nextRound(round); + } } } @@ -51,15 +66,15 @@ public class GameManager_1835 extends GameManager { public void startPrussianFormationRound(OperatingRound_1835 or) { interruptedRound = or; - createRound (PrussianFormationRound.class).start (); + createRound (PrussianFormationRound.class).start (); } public void setPrussianFormationStartingPlayer(Player prFormStartingPlayer) { - this.prFormStartingPlayer = prFormStartingPlayer; - } + this.prFormStartingPlayer = prFormStartingPlayer; + } - public Player getPrussianFormationStartingPlayer() { - return prFormStartingPlayer; + public Player getPrussianFormationStartingPlayer() { + return prFormStartingPlayer; } @Override diff --git a/rails/game/specific/_1835/OperatingRound_1835.java b/rails/game/specific/_1835/OperatingRound_1835.java index fe5589e..6f4d312 100644 --- a/rails/game/specific/_1835/OperatingRound_1835.java +++ b/rails/game/specific/_1835/OperatingRound_1835.java @@ -16,9 +16,9 @@ import rails.game.state.BooleanState; public class OperatingRound_1835 extends OperatingRound { private BooleanState needPrussianFormationCall - = new BooleanState ("NeedPrussianFormationCall", false); + = new BooleanState ("NeedPrussianFormationCall", false); private BooleanState hasLaidExtraOBBTile - = new BooleanState ("HasLaidExtraOBBTile", false); + = new BooleanState ("HasLaidExtraOBBTile", false); /** * Registry of percentage of PR revenue to be denied per player @@ -122,8 +122,8 @@ public class OperatingRound_1835 extends OperatingRound { return sharesPerRecipient; } - /** - * Register black minors as having operated + /** + * Register black minors as having operated * for the purpose of denying income after conversion to a PR share */ @Override @@ -162,7 +162,7 @@ public class OperatingRound_1835 extends OperatingRound { && !company.isClosed() && company != operatingCompany.get() && company.getCurrentSpace().getPrice() - < prussian.getCurrentSpace().getPrice()) { + < prussian.getCurrentSpace().getPrice()) { log.debug("PR will operate before "+company.getName()); break; } @@ -191,11 +191,11 @@ public class OperatingRound_1835 extends OperatingRound { if (operatingCompany.get().canUseSpecialProperties()) { for (SpecialTileLay stl : getSpecialProperties(SpecialTileLay.class)) { - 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 - && getCurrentPhase().isTileColourAllowed(stl.getTile().getColourName())) { + 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 + && getCurrentPhase().isTileColourAllowed(stl.getTile().getColourName())) { // Exclude the second OBB free tile if the first was laid in this round if (stl.getLocationNameString().matches("M1(7|9)") @@ -216,14 +216,14 @@ public class OperatingRound_1835 extends OperatingRound { } } } - + return currentSpecialTileLays; } @Override public boolean layTile(LayTile action) { - + boolean hasJustLaidExtraOBBTile = action.getSpecialProperty() != null - && action.getSpecialProperty().getLocationNameString().matches("M1(5|7)"); + && action.getSpecialProperty().getLocationNameString().matches("M1(5|7)"); // The extra OBB tiles may not both be laid in the same round if (hasJustLaidExtraOBBTile) { @@ -238,7 +238,7 @@ public class OperatingRound_1835 extends OperatingRound { return false; } else { moveStack.start(true); // Duplicate, but we have to - hasLaidExtraOBBTile.set(true); + hasLaidExtraOBBTile.set(true); // Done here to make getSpecialTileLays() return the correct value. // It's provisional, on the assumption that other validations are OK. // TODO To get it really right, we should separate validation and execution. @@ -258,11 +258,11 @@ public class OperatingRound_1835 extends OperatingRound { @Override protected void newPhaseChecks() { PhaseI phase = getCurrentPhase(); - if (phase.getName().equals("4") - || phase.getName().equals("4+4") - && !companyManager.getPublicCompany(GameManager_1835.PR_ID).hasStarted() + if (phase.getName().equals("4") + || phase.getName().equals("4+4") + && !companyManager.getPublicCompany(GameManager_1835.PR_ID).hasStarted() || phase.getName().equals("5") - && !PrussianFormationRound.prussianIsComplete(gameManager)) { + && !PrussianFormationRound.prussianIsComplete(gameManager)) { if (getStep() == GameDef.OrStep.DISCARD_TRAINS) { // Postpone until trains are discarded needPrussianFormationCall.set(true); commit df31d98077ce7d818cae7c671c77a403fdc3eeca Author: Erik Vos <eri...@xs...> Date: Thu Oct 13 13:14:01 2011 +0200 Updated 1835 Game Notes diff --git a/data/GamesList.xml b/data/GamesList.xml index 63b992c..de88eb3 100644 --- a/data/GamesList.xml +++ b/data/GamesList.xml @@ -205,9 +205,9 @@ Three variants have been implemented: Known bugs: - Game hangs in OR if Start Packet has not been sold and minors run. - Workaround: select option "Minors don't run if BY has not floated". + Workaround: save the game. - OBB and PfB do not always close when required. - Workaround: use Correction mode. + Workaround: close minor via the Special menu. </Description> <Option name="Variant" values="Standard,Clemens,Snake"/> <Option name="RouteAwareness" values="Highlight,Deactivate" default="Highlight" /> |
From: Erik V. <ev...@us...> - 2011-10-13 10:55:06
|
rails/game/PublicCompany.java | 14 ++++++++------ rails/game/Stop.java | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) New commits: commit adfb01e778893115aec455fd3755bd0e1bad3502 Author: Erik Vos <eri...@xs...> Date: Thu Oct 13 12:54:13 2011 +0200 Some code cleanups diff --git a/rails/game/PublicCompany.java b/rails/game/PublicCompany.java index b7e8d50..0a0aeb9 100644 --- a/rails/game/PublicCompany.java +++ b/rails/game/PublicCompany.java @@ -144,7 +144,7 @@ public class PublicCompany extends Company implements PublicCompanyI { * A map per tile colour, holding the number of turns that the tile lay * number applies. The default number is always 1. */ - protected Map<String, Integer> turnsWithExtraTileLaysInit = null; + //protected Map<String, Integer> turnsWithExtraTileLaysInit = null; /** Copy of turnsWithExtraTileLaysInit, per company */ protected Map<String, IntegerState> turnsWithExtraTileLays = null; /** @@ -449,7 +449,7 @@ public class PublicCompany extends Company implements PublicCompanyI { } } - Tag tileLaysTag = tag.getChild("TileLays"); + /*Tag tileLaysTag = tag.getChild("TileLays"); if (tileLaysTag != null) { for (Tag numberTag : tileLaysTag.getChildren("Number")) { @@ -471,9 +471,9 @@ public class PublicCompany extends Company implements PublicCompanyI { String[] colours = colourString.split(","); HashMap<String, Integer> phaseMap; /** - * TODO: should not be necessary to specify all phases - * separately - */ + * TODO: should not be necessary to specify all phases + * separately + *//* String[] phases = phaseString.split(","); for (int i = 0; i < colours.length; i++) { if (extraTileLays == null) @@ -494,7 +494,7 @@ public class PublicCompany extends Company implements PublicCompanyI { } } } - } + }*/ int certIndex = 0; List<Tag> certificateTags = tag.getChildren("Certificate"); @@ -678,6 +678,7 @@ public class PublicCompany extends Company implements PublicCompanyI { stockMarket = gameManager.getStockMarket(); mapManager = gameManager.getMapManager(); + /* if (turnsWithExtraTileLaysInit != null) { turnsWithExtraTileLays = new HashMap<String, IntegerState>(); for (String colour : turnsWithExtraTileLaysInit.keySet()) { @@ -686,6 +687,7 @@ public class PublicCompany extends Company implements PublicCompanyI { turnsWithExtraTileLaysInit.get(colour))); } } + */ if (maxNumberOfLoans != 0) { currentNumberOfLoans = new IntegerState (name+"_Loans", 0); diff --git a/rails/game/Stop.java b/rails/game/Stop.java index d1e918c..401f18f 100644 --- a/rails/game/Stop.java +++ b/rails/game/Stop.java @@ -171,9 +171,9 @@ public class Stop implements TokenHolder { if (scoreType == null) scoreType = tileManager.getScoreTypeDefault(type); if (scoreType == null) scoreType = type.getDefaultScoreType(); - log.debug("+++ Hex="+mapHex.getName()+" tile="+tile.getId()+" city="+number - +": stopType="+type+" runTo="+runToAllowed+" runThrough="+runThroughAllowed - +" loop="+loopAllowed+" scoreType="+scoreType); + //log.debug("+++ Hex="+mapHex.getName()+" tile="+tile.getId()+" city="+number + // +": stopType="+type+" runTo="+runToAllowed+" runThrough="+runThroughAllowed + // +" loop="+loopAllowed+" scoreType="+scoreType); } public String getName() { |
From: Erik V. <ev...@us...> - 2011-10-12 17:54:29
|
data/1825/CompanyManager.xml | 4 - data/1825/Game.xml | 4 + data/1835/Game.xml | 8 ++- data/1851/CompanyManager.xml | 4 - data/1851/Game.xml | 4 + data/1880/CompanyManager.xml | 4 - data/1880/Game.xml | 4 + data/18EU/CompanyManager.xml | 4 - data/18EU/Game.xml | 7 ++ data/18TN/CompanyManager.xml | 4 - data/18TN/Game.xml | 4 + rails/game/CompanyManager.java | 2 rails/game/CompanyManagerI.java | 3 + rails/game/OperatingRound.java | 6 +- rails/game/Phase.java | 100 +++++++++++++++++++++++++++++++------- rails/game/PhaseI.java | 11 ++-- rails/game/PublicCompany.java | 87 ++++++++++++++++++--------------- rails/game/PublicCompanyI.java | 5 + rails/ui/swing/UpgradesPanel.java | 4 - 19 files changed, 185 insertions(+), 84 deletions(-) New commits: commit 8d2469c1076b10c883cc6cd1c21f78f8bb668df1 Author: Erik Vos <eri...@xs...> Date: Wed Oct 12 00:37:21 2011 +0200 Phase management upgrade step 5: extra tile lays Extra tile lays are now registered in <Phase> rather than <CompanyType>. Affects Game.xml and CompanyManager.xml of the following games: 1825, 1835,1851, 1880, 18EU, 18TN. Additional fix: In 18EU, minors can no longer select yellow tiles for upgrading. Green tiles will no longer be displayed in this case. diff --git a/data/1825/CompanyManager.xml b/data/1825/CompanyManager.xml index 3785510..1493f2e 100644 --- a/data/1825/CompanyManager.xml +++ b/data/1825/CompanyManager.xml @@ -15,8 +15,8 @@ <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> <Trains limit="4,3"/> - <TileLays> - <Number colour="yellow" number="2" phase="1,2,3,4"></Number></TileLays></CompanyType> + <!--TileLays> + <Number colour="yellow" number="2" phase="1,2,3,4"></Number></TileLays--></CompanyType> <Company name="S&M" type="Private" basePrice="30" revenue="5" longname="Swansea and Mumbles"> </Company> <Company name="CHP" type="Private" basePrice="75" revenue="12" diff --git a/data/1825/Game.xml b/data/1825/Game.xml index 608dad5..545a562 100644 --- a/data/1825/Game.xml +++ b/data/1825/Game.xml @@ -73,7 +73,9 @@ 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" > - <Tiles colour="yellow"/> + <Tiles colour="yellow"> + <Lays companyType="Public" colour="yellow" number="2"/> + </Tiles> <Privates sellingAllowed="no"/> <OperatingRounds number="1"/> <Trains tradingAllowed="yes"/> diff --git a/data/1835/Game.xml b/data/1835/Game.xml index cc54f5b..6a7f7b7 100644 --- a/data/1835/Game.xml +++ b/data/1835/Game.xml @@ -80,11 +80,15 @@ </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="2" realName="1"> - <Tiles colour="yellow"/> + <Tiles colour="yellow"> + <Lays companyType="Major" colour="yellow" number="2"/> + </Tiles> <OperatingRounds number="1"/> </Phase> <Phase name="3" realName="2"> - <Tiles colour="yellow,green"/> + <Tiles colour="yellow,green"> + <Lays companyType="Major" colour="yellow" number="1"/> + </Tiles> <OperatingRounds number="2"/> <OffBoardRevenue step="2"/> <Trains tradingAllowed="yes"/> diff --git a/data/1851/CompanyManager.xml b/data/1851/CompanyManager.xml index 5673c23..058a94a 100644 --- a/data/1851/CompanyManager.xml +++ b/data/1851/CompanyManager.xml @@ -17,9 +17,9 @@ </BaseTokens> <Payout split="allowed" mustExceedPriceToMove="yes"/> <!--NumberOfTileLays colour="yellow" phase="3,4,5,6,8" number="2"/--> - <TileLays> + <!--TileLays> <Number colour="yellow" phase="3,4,5,6,8" number="2"/> - </TileLays> + </TileLays--> <TradeShares mustHaveOperated="yes"/> </CompanyType> <Company name="L&O" type="Private" basePrice="200" revenue="5" longname="Lexington & Ohio Railroad"> diff --git a/data/1851/Game.xml b/data/1851/Game.xml index bba23f2..936cf95 100644 --- a/data/1851/Game.xml +++ b/data/1851/Game.xml @@ -91,7 +91,9 @@ <Trains tradingAllowed="yes"/> </Phase> <Phase name="3"> - <Tiles colour="yellow,green"/> + <Tiles colour="yellow,green"> + <Lays companyType="Public" colour="yellow" number="2"/> + </Tiles> <OperatingRounds number="2"/> </Phase> <Phase name="4"> diff --git a/data/1880/CompanyManager.xml b/data/1880/CompanyManager.xml index cd8dc10..ecaea80 100644 --- a/data/1880/CompanyManager.xml +++ b/data/1880/CompanyManager.xml @@ -28,10 +28,10 @@ <CompanyType name="Major" class="rails.game.PublicCompany" capitalisation="incremental"> <Capitalisation Type="incremental"/> - <TileLays> + <!--TileLays> <Number colour="yellow" phase="2+2,3,3+3,4,4+4,6,6e,8,8e,10" number="2"/> - </TileLays> + </TileLays--> <Float percentage="60"/> <StockPrice par="yes"/> <ShareUnit percentage="10"/> diff --git a/data/1880/Game.xml b/data/1880/Game.xml index 8695192..9123c88 100644 --- a/data/1880/Game.xml +++ b/data/1880/Game.xml @@ -91,7 +91,9 @@ </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="2" realName="A1"> - <Tiles colour="yellow"/> + <Tiles colour="yellow"> + <Lays companyType="Major" colour="yellow" number="2"/> + </Tiles> <OperatingRounds number="-1"/> <Float percentage="20"/> <Trains tradingAllowed="yes"/> diff --git a/data/18EU/CompanyManager.xml b/data/18EU/CompanyManager.xml index 34cfd3a..c5f5791 100644 --- a/data/18EU/CompanyManager.xml +++ b/data/18EU/CompanyManager.xml @@ -6,12 +6,12 @@ <Certificate type="President" shares="1"/> <StockPrice market="no"/> <Payout split="always"/> - <TileLays> + <!--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> + </TileLays--> <BaseTokens> <HomeBase lay="whenStarted"/> </BaseTokens> diff --git a/data/18EU/Game.xml b/data/18EU/Game.xml index 6a3af0f..54aff6c 100644 --- a/data/18EU/Game.xml +++ b/data/18EU/Game.xml @@ -101,7 +101,12 @@ </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="2"> - <Tiles colour="yellow"/> + <Tiles colour="yellow"> + <Lays companyType="Minor" colour="yellow" number="2" occurrences="1"/> + <Lays companyType="Minor" colour="green" number="0"/> + <Lays companyType="Minor" colour="brown" number="0"/> + <Lays companyType="Minor" colour="grey" number="0"/> + </Tiles> <OperatingRounds number="2"/> <Trains tradingAllowed="yes"/> </Phase> diff --git a/data/18TN/CompanyManager.xml b/data/18TN/CompanyManager.xml index b08c3fb..564257c 100644 --- a/data/18TN/CompanyManager.xml +++ b/data/18TN/CompanyManager.xml @@ -20,9 +20,9 @@ <Certificate shares="1" number="8"/> <Trains limit="4,3,2"/> <CanUseSpecialProperties/> - <TileLays> + <!--TileLays> <Number colour="yellow" phase="2,3,3½,4,5,6,6½,8" number="2"/> - </TileLays> + </TileLays--> </CompanyType> <Company name="TCC" type="Private" basePrice="20" revenue="5" diff --git a/data/18TN/Game.xml b/data/18TN/Game.xml index 0a19ccc..7d4d118 100644 --- a/data/18TN/Game.xml +++ b/data/18TN/Game.xml @@ -90,7 +90,9 @@ <Component name="PhaseManager" class="rails.game.PhaseManager"> <!-- Each Phase's defaults are the previous one's values --> <Phase name="2" > - <Tiles colour="yellow"/> + <Tiles colour="yellow"> + <Lays companyType="Public" colour="yellow" number="2"/> + </Tiles> <Privates sellingAllowed="no"/> <OperatingRounds number="1"/> <Trains onePerTurn="yes" tradingAllowed="yes"/> diff --git a/rails/game/CompanyManager.java b/rails/game/CompanyManager.java index 002d54f..7e60f9f 100644 --- a/rails/game/CompanyManager.java +++ b/rails/game/CompanyManager.java @@ -1 +1 @@ -/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/CompanyManager.java,v 1.24 2010/04/15 19:49:50 evos Exp $ */ package rails.game; import java.util.*; import org.apache.log4j.Logger; import rails.common.LocalText; import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; public class CompanyManager implements CompanyManagerI, ConfigurableComponentI { /** A List with all private companies */ private List<PrivateCompanyI> lPrivateCompanies = new ArrayList<PrivateCompanyI>(); /** A List with all public companies */ private List<PublicCompanyI> lPublicCompanies = new ArrayList<PublicCompanyI>(); /** A map with all private companies by name */ private Map<String, PrivateCompanyI> mPrivateCompanies = new HashMap<String, PrivateCompanyI>(); /** A map with all public (i.e. non-private) companies by name */ private Map<String, PublicCompanyI> mPublicCompanies = new HashMap<String, PublicCompanyI>(); /** A map of all type names to maps of companies of that type by name */ // TODO Redundant, current usage can be replaced. private Map<String, Map<String, CompanyI>> mCompaniesByTypeAndName = new HashMap<String, Map<String, CompanyI>>(); /** A list of all company types */ private List<CompanyTypeI> lCompanyTypes = new ArrayList<CompanyTypeI>(); /** A list of all start packets (usually one) */ private List<StartPacket> startPackets = new ArrayList<StartPacket>(); /** A map of all start packets, keyed by name. Default name is "Initial" */ private Map<String, StartPacket> startPacketMap = new HashMap<String, StartPacket>(); /** A map to enable translating aliases to names */ protected Map<String, String> aliases = null; private int numberOfPublicCompanies = 0; protected static Logger log = Logger.getLogger(CompanyManager.class.getPackage().getName()); protected GameMan |
From: Erik V. <ev...@us...> - 2011-10-12 13:43:46
|
data/1835/Tiles.xml | 2 +- rails/game/Game.java | 2 +- rails/ui/swing/GameStatus.java | 14 ++++++++------ rails/ui/swing/elements/Caption.java | 11 ++++------- rails/ui/swing/elements/Field.java | 33 ++++++++++++++++++++++----------- tiles/TileDictionary.18t | 2 +- tiles/TileDictionary.xml | 2 +- tiles/Tiles.xml | 2 +- 8 files changed, 39 insertions(+), 29 deletions(-) New commits: commit c7277d4d9659931ddd2996d48fc20e6bf32b80fc Author: Erik Vos <eri...@xs...> Date: Wed Oct 12 15:28:57 2011 +0200 Fixed wrong revenue value (20) of NW city on tile -803 (1835 Hamburg) diff --git a/data/1835/Tiles.xml b/data/1835/Tiles.xml index fb95273..f2e99d8 100644 --- a/data/1835/Tiles.xml +++ b/data/1835/Tiles.xml @@ -68,7 +68,7 @@ <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="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"/> diff --git a/tiles/TileDictionary.18t b/tiles/TileDictionary.18t index 2c295a6..d14e28d 100644 --- a/tiles/TileDictionary.18t +++ b/tiles/TileDictionary.18t @@ -12835,7 +12835,7 @@ object TTilesWrapper item JunType = jtCity Position = tp2SideF - Revenue = 20 + Revenue = 40 RevenuePosition = tpCenter end item diff --git a/tiles/TileDictionary.xml b/tiles/TileDictionary.xml index 8ecd5ae..5843696 100644 --- a/tiles/TileDictionary.xml +++ b/tiles/TileDictionary.xml @@ -17555,7 +17555,7 @@ <junType>jtCity</junType> <position>tp2SideF</position> <revenue> - <value>20</value> + <value>40</value> <position>tpCenter</position> </revenue> </junction> diff --git a/tiles/Tiles.xml b/tiles/Tiles.xml index fc210d3..d7741b5 100644 --- a/tiles/Tiles.xml +++ b/tiles/Tiles.xml @@ -3087,7 +3087,7 @@ <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="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"/> commit 919a2ba43dec0595a445e163d2f008104dc27852 Author: Erik Vos <eri...@xs...> Date: Wed Oct 12 13:24:16 2011 +0200 In GameStatus window, make train list fields auto-wrapping. By embedding the text in <html>...</html> and setting the JLabel preferred size to (1,1). diff --git a/rails/ui/swing/GameStatus.java b/rails/ui/swing/GameStatus.java index 71a1ce4..da0f965 100644 --- a/rails/ui/swing/GameStatus.java +++ b/rails/ui/swing/GameStatus.java @@ -1,10 +1,10 @@ package rails.ui.swing; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; +import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.*; +import java.util.List; import javax.swing.*; @@ -494,7 +494,7 @@ public class GameStatus extends GridPanel implements ActionListener { for (int i = 0; i < np; i++) { f = playerCertCount[i] = - new Field(players[i].getCertCountModel(), true); + new Field(players[i].getCertCountModel(), false, true); addField(f, playerCertCountXOffset + i, playerCertCountYOffset, 1, 1, WIDE_TOP, true); } @@ -546,14 +546,16 @@ public class GameStatus extends GridPanel implements ActionListener { // Future trains addField(new Caption(LocalText.getText("Future")), futureTrainsXOffset, futureTrainsYOffset - 1, futureTrainsWidth, 1, WIDE_TOP, true); - futureTrains = new Field(bank.getUnavailable().getTrainsModel()); + futureTrains = new Field(bank.getUnavailable().getTrainsModel(), true, false); + futureTrains.setPreferredSize(new Dimension (1,1)); // To enable auto word wrap addField(futureTrains, futureTrainsXOffset, futureTrainsYOffset, futureTrainsWidth, 1, 0, true); // Train cost overview String text = gameUIManager.getGameManager().getTrainManager().getTrainCostOverview(); - addField (new Caption(text), poolTrainsXOffset, newTrainsYOffset + 1, - futureTrainsWidth + 2, 1, 0, true); + addField (f = new Caption("<html>" + text + "</html>"), poolTrainsXOffset, newTrainsYOffset + 1, + futureTrainsWidth + 2, 2, 0, true); + f.setPreferredSize(new Dimension (1,1));// To enable auto word wrap dummyButton = new ClickField("", "", "", this, buySellGroup); } diff --git a/rails/ui/swing/elements/Caption.java b/rails/ui/swing/elements/Caption.java index 6af9fc4..aacaa96 100644 --- a/rails/ui/swing/elements/Caption.java +++ b/rails/ui/swing/elements/Caption.java @@ -2,11 +2,8 @@ package rails.ui.swing.elements; import java.awt.Color; -import java.awt.Font; -import javax.swing.BorderFactory; -import javax.swing.JLabel; -import javax.swing.SwingConstants; +import javax.swing.*; import javax.swing.border.Border; public class Caption extends JLabel { @@ -17,9 +14,9 @@ public class Caption extends JLabel { private static final Color NORMAL_BG_COLOUR = new Color(240, 240, 240); private static final Color HIGHLIGHT_BG_COLOUR = new Color(255, 255, 80); - + private static final Color NORMAL_FG_COLOUR = new Color (0, 0, 0); - + private static final Color LOCAL_PLAYER_COLOUR = new Color (255, 0, 0); public Caption(String text) { @@ -34,7 +31,7 @@ public class Caption extends JLabel { public void setHighlight(boolean highlight) { this.setBackground(highlight ? HIGHLIGHT_BG_COLOUR : NORMAL_BG_COLOUR); } - + public void setLocalPlayer (boolean highlight) { this.setForeground(highlight ? LOCAL_PLAYER_COLOUR : NORMAL_FG_COLOUR); } diff --git a/rails/ui/swing/elements/Field.java b/rails/ui/swing/elements/Field.java index 5eaac15..76b674f 100644 --- a/rails/ui/swing/elements/Field.java +++ b/rails/ui/swing/elements/Field.java @@ -29,6 +29,8 @@ public class Field extends JLabel implements ViewObject { private boolean pull = false; + private boolean html = false; + public Field(String text) { super(text.equals("0%") ? "" : text); this.setBackground(NORMAL_BG_COLOUR); @@ -46,18 +48,16 @@ public class Field extends JLabel implements ViewObject { } public Field(ModelObject modelObject) { - this(""); - //this(modelObject.getText()); + this(modelObject, false, false); this.modelObject = modelObject; - //Object mu = modelObject.getUpdate(); - //if (mu instanceof ViewUpdate) { - // updateDetails ((ViewUpdate) mu); - //} modelObject.addObserver(this); } - public Field(ModelObject modelObject, boolean pull) { - this(modelObject); + public Field(ModelObject modelObject, boolean html, boolean pull) { + this(""); + this.modelObject = modelObject; + this.html = html; + this.modelObject.addObserver(this); this.pull = pull; } @@ -103,14 +103,23 @@ public class Field extends JLabel implements ViewObject { } } + @Override + public void setText (String text) { + if (html) { + super.setText("<html>" + text + "</html>"); + } else { + super.setText(text); + } + } + protected void updateDetails (ViewUpdate vu) { for (String key : vu.getKeys()) { if (ViewUpdate.TEXT.equalsIgnoreCase(key)) { setText (vu.getText()); } else if (ViewUpdate.BGCOLOUR.equalsIgnoreCase(key)) { setBackground((Color)vu.getValue(key)); - normalBgColour = getBackground(); - setForeground (Util.isDark(normalBgColour) ? Color.WHITE : Color.BLACK); + normalBgColour = getBackground(); + setForeground (Util.isDark(normalBgColour) ? Color.WHITE : Color.BLACK); } } } @@ -130,5 +139,7 @@ public class Field extends JLabel implements ViewObject { return dependents; } - + public void setHtml() { + html = true; + } } commit 15fa441bd80ceb32615bd8706d620d811166be77 Author: Erik Vos <eri...@xs...> Date: Mon Oct 10 16:12:11 2011 +0200 Set version # to 1.5.1+ diff --git a/rails/game/Game.java b/rails/game/Game.java index 9a6b6bb..c670a7b 100644 --- a/rails/game/Game.java +++ b/rails/game/Game.java @@ -14,7 +14,7 @@ import rails.game.action.PossibleAction; import rails.util.GameFileIO; public class Game { - public static final String version = "1.5"; + public static final String version = "1.5.1+"; /** The component Manager */ protected GameManager gameManager; |
From: Stefan F. <ste...@us...> - 2011-10-10 18:49:50
|
make_rails_pkg.sh | 4 test/data/bugs/1889_presidentContribution.rails |binary test/data/bugs/1889_presidentContribution.report | 1045 +++++++++++++++++++++ test/data/real/18GA_A.rails |binary test/data/real/18GA_A.report | 1117 +++++++++++++++++++++++ 5 files changed, 2164 insertions(+), 2 deletions(-) New commits: commit 4b9247bd63ddf2003e0c8f5538d29b207cb92ed7 Author: Stefan Frey <ste...@we...> Date: Mon Oct 10 20:51:52 2011 +0200 adding further test games diff --git a/test/data/bugs/1889_presidentContribution.rails b/test/data/bugs/1889_presidentContribution.rails new file mode 100644 index 0000000..7ddb0ff Binary files /dev/null and b/test/data/bugs/1889_presidentContribution.rails differ diff --git a/test/data/bugs/1889_presidentContribution.report b/test/data/bugs/1889_presidentContribution.report new file mode 100644 index 0000000..95f1fe7 --- /dev/null +++ b/test/data/bugs/1889_presidentContribution.report @@ -0,0 +1,1045 @@ +GameIs,1889 +PlayerIs,1,Chris +PlayerIs,2,Breno +PlayerIs,3,Peter +PlayerIs,4,Mark +PlayerCash,420 +BankHas,5320 +StartOfPhase,2 +BankSizeIs,5320 +StartOfInitialRound +HasPriority,Chris +BID_ITEM_LOG,Chris,45,C,375 +BID_ITEM_LOG,Breno,55,D,365 +BID_ITEM_LOG,Peter,95,F,325 +BID_ITEM_LOG,Mark,65,E,355 +BID_ITEM_LOG,Chris,60,D,315 +BID_ITEM_LOG,Breno,35,B,330 +BuysItemFor,Peter,A,20 +BuysItemFor,Breno,B,35 +BuysItemFor,Chris,C,45 +TO_AUCTION,D +PASSES,Breno +BuysItemFor,Chris,D,60 +BuysItemFor,Mark,E,65 +BuysItemFor,Peter,F,95 +PASSES,Mark +PASSES,Chris +BuysItemFor,Breno,G,150 +Has,Chris,315 +Has,Breno,235 +Has,Peter,305 +Has,Mark,355 +StartStockRound,1 +HasPriority,Peter +PASSES,Peter +START_COMPANY_LOG,Mark,IR,70,140,2,20,BANK +START_COMPANY_LOG,Chris,UR,65,130,2,20,BANK +BUY_SHARE_LOG,Breno,10,IR,IPO,70 +Autopasses,Peter +BUY_SHARE_LOG,Mark,10,IR,IPO,70 +BUY_SHARE_LOG,Chris,10,UR,IPO,65 +Autopasses,Breno +Autopasses,Peter +BUY_SHARE_LOG,Mark,10,IR,IPO,70 +FloatsWithCash,IR,700 +BUY_SHARE_LOG,Chris,10,UR,IPO,65 +Autopasses,Breno +Autopasses,Peter +BUY_SHARE_LOG,Mark,10,IR,IPO,70 +PASSES,Chris +Autopasses,Breno +Autopasses,Peter +PASSES,Mark + +END_SR,1 +Has,IR,700 +Has,Chris,55 +Has,Breno,165 +Has,Peter,305 +Has,Mark,5 +START_OR,1.1 +ReceivesFor,Peter,5,A +ReceivesFor,Breno,5,B +ReceivesFor,Chris,10,C +ReceivesFor,Chris,15,D +ReceivesFor,Mark,15,E +ReceivesFor,Peter,20,F +ReceivesFor,Breno,30,G + +CompanyOperates,IR,Mark +LaysTileAt,IR,5,E2,S +CompanyDoesNotPayDividend,IR +PRICE_MOVES_LOG,IR,70,D5,65,C5 +BuysTrain,IR,2,IPO,80 +FirstTrainBought,2 +BuysTrain,IR,2,IPO,80 +BuysTrain,IR,2,IPO,80 + +EndOfOperatingRound,1.1 +ORWorthIncrease,Chris,1.1,25 +ORWorthIncrease,Breno,1.1,30 +ORWorthIncrease,Peter,1.1,25 +ORWorthIncrease,Mark,1.1,-10 +Has,IR,460 +Has,Chris,80 +Has,Breno,200 +Has,Peter,330 +Has,Mark,20 +StartStockRound,2 +HasPriority,Chris +BUY_SHARE_LOG,Chris,10,UR,IPO,65 +FloatsWithCash,UR,650 +Autopasses,Breno +START_COMPANY_LOG,Peter,KO,65,130,2,20,BANK +Autopasses,Mark +Autopasses,Chris +Autopasses,Breno +BUY_SHARE_LOG,Peter,10,KO,IPO,65 +Autopasses,Mark +Autopasses,Chris +Autopasses,Breno +BUY_SHARE_LOG,Peter,10,KO,IPO,65 +Autopasses,Mark +Autopasses,Chris +Autopasses,Breno +BUY_SHARE_LOG,Peter,10,KO,IPO,65 +FloatsWithCash,KO,650 +Autopasses,Mark +Autopasses,Chris +Autopasses,Breno +PASSES,Peter + +END_SR,2 +Has,IR,460 +Has,KO,650 +Has,UR,650 +Has,Chris,15 +Has,Breno,200 +Has,Peter,5 +Has,Mark,20 +START_OR,2.1 +ReceivesFor,Peter,5,A +ReceivesFor,Breno,5,B +ReceivesFor,Chris,10,C +ReceivesFor,Chris,15,D +ReceivesFor,Mark,15,E +ReceivesFor,Peter,20,F +ReceivesFor,Breno,30,G + +CompanyOperates,UR,Chris +LaysTileAt,UR,8,B5,NE +CompanyDoesNotPayDividend,UR +PRICE_MOVES_LOG,UR,65,D6,60,C6 +BuysTrain,UR,2,IPO,80 + +CompanyOperates,KO,Peter +LaysTileAt,KO,8,J3,N +CompanyDoesNotPayDividend,KO +PRICE_MOVES_LOG,KO,65,D6,60,C6 +BuysTrain,KO,2,IPO,80 + +CompanyOperates,IR,Mark +LaysTileAt,IR,5,F3,NE +LAYS_TOKEN_ON,IR,F3,40 +CompanyRevenue,IR,140 +CompanyPaysOutFull,IR,140 +Payout,Breno,14,1,10 +Payout,Mark,70,5,10 +PRICE_MOVES_LOG,IR,65,C5,70,D5 + +EndOfOperatingRound,2.1 +ORWorthIncrease,Chris,2.1,0 +ORWorthIncrease,Breno,2.1,54 +ORWorthIncrease,Peter,2.1,0 +ORWorthIncrease,Mark,2.1,110 +Has,IR,420 +Has,KO,570 +Has,UR,570 +Has,Chris,40 +Has,Breno,249 +Has,Peter,30 +Has,Mark,105 +StartStockRound,3 +HasPriority,Mark +BUY_SHARE_LOG,Mark,10,KO,IPO,65 +Autopasses,Chris +BUY_SHARE_LOG,Breno,10,IR,IPO,70 +Autopasses,Peter +Autopasses,Mark +Autopasses,Chris +BUY_SHARE_LOG,Breno,10,IR,IPO,70 +Autopasses,Peter +Autopasses,Mark +Autopasses,Chris +BUY_SHARE_LOG,Breno,10,IR,IPO,70 +Autopasses,Peter +Autopasses,Mark +Autopasses,Chris +PASSES,Breno + +END_SR,3 +Has,IR,420 +Has,KO,570 +Has,UR,570 +Has,Chris,40 +Has,Breno,39 +Has,Peter,30 +Has,Mark,40 +START_OR,3.1 +ReceivesFor,Peter,5,A +ReceivesFor,Breno,5,B +ReceivesFor,Chris,10,C +ReceivesFor,Chris,15,D +ReceivesFor,Mark,15,E +ReceivesFor,Peter,20,F +ReceivesFor,Breno,30,G + +CompanyOperates,IR,Mark +CompanyRevenue,IR,140 +CompanyPaysOutFull,IR,140 +Payout,Breno,56,4,10 +Payout,Mark,70,5,10 +PRICE_MOVES_LOG,IR,70,D5,75,E5 + +CompanyOperates,UR,Chris +LaysTileAt,UR,8,C8,S +CompanyRevenue,UR,0 +CompanyDoesNotPayDividend,UR +PRICE_MOVES_LOG,UR,60,C6,55,B6 +BuysTrain,UR,2,IPO,80 +All 2-trains are sold out, 3-trains now available +BuysTrain,UR,3,IPO,180 +FirstTrainBought,3 +StartOfPhase,3 +BuysPrivateFromFor,UR,C,Chris,80 +BuysPrivateFromFor,UR,D,Chris,100 +CorrectionModeActivate,Chris,CORRECT_MAP +CorrectionModeDeactivate,Chris,CORRECT_MAP +CorrectionModeActivate,Chris,CORRECT_MAP +CorrectMapLaysTileAt,206,C4,N +CorrectionModeDeactivate,Chris,CORRECT_MAP + +CompanyOperates,KO,Peter +BuysPrivateFromFor,KO,A,Peter,40 +LaysTileAt,KO,440,K4,S +CompanyRevenue,KO,60 +CompanyPaysOutFull,KO,60 +Payout,Mark,6,1,10 +Payout,Peter,30,5,10 +PRICE_MOVES_LOG,KO,60,C6,65,D6 +BuysTrain,KO,3,IPO,180 +BuysTrain,KO,3,IPO,180 + +EndOfOperatingRound,3.1 +ORWorthIncrease,Chris,3.1,90 +ORWorthIncrease,Breno,3.1,111 +ORWorthIncrease,Peter,3.1,100 +ORWorthIncrease,Mark,3.1,121 +Has,IR,420 +Has,KO,170 +Has,UR,130 +Has,Chris,245 +Has,Breno,130 +Has,Peter,125 +Has,Mark,131 +StartStockRound,4 +HasPriority,Peter +BUY_SHARE_LOG,Peter,10,IR,IPO,70 +BUY_SHARE_LOG,Mark,10,UR,IPO,65 +BUY_SHARE_LOG,Chris,10,KO,IPO,65 +SELL_SHARES_LOG,Breno,4,10,40,IR,300 +PRICE_MOVES_LOG,IR,75,E5,60,E8 +START_COMPANY_LOG,Breno,TR,80,160,2,20,BANK +PASSES,Peter +BUY_SHARE_LOG,Mark,10,KO,IPO,65 +BUY_SHARE_LOG,Chris,10,IR,Pool,60 +BUY_SHARE_LOG,Breno,10,KO,IPO,65 +SELL_SHARE_LOG,Breno,10,KO,65 +PRICE_MOVES_LOG,KO,65,D6,60,D7 +PASSES,Peter +PASSES,Mark +BUY_SHARE_LOG,Chris,10,UR,IPO,65 +BUY_SHARE_LOG,Breno,10,TR,IPO,80 +PASSES,Peter +Autopasses,Mark +PASSES,Chris +BUY_SHARE_LOG,Breno,10,TR,IPO,80 +PASSES,Peter +Autopasses,Mark +PASSES,Chris +BUY_SHARE_LOG,Breno,10,TR,IPO,80 +FloatsWithCash,TR,800 +PASSES,Peter +Autopasses,Mark +PASSES,Chris +PASSES,Breno + +END_SR,4 +Has,IR,420 +Has,KO,170 +Has,TR,800 +Has,UR,130 +Has,Chris,55 +Has,Breno,30 +Has,Peter,55 +Has,Mark,1 +START_OR,4.1 +ReceivesFor,KO,5,A +ReceivesFor,Breno,5,B +ReceivesFor,UR,10,C +ReceivesFor,UR,15,D +ReceivesFor,Mark,15,E +ReceivesFor,Peter,20,F +ReceivesFor,Breno,30,G + +CompanyOperates,TR,Breno +LaysTileAt,TR,437,G10,S +LaysTileAt,TR,57,G12,S +CompanyDoesNotPayDividend,TR +PRICE_MOVES_LOG,TR,80,D3,75,C3 +BuysTrain,TR,3,IPO,180 +BuysTrain,TR,3,IPO,180 +All 3-trains are sold out, 4-trains now available +BuysTrain,TR,4,IPO,300 +FirstTrainBought,4 +StartOfPhase,4 +BuysPrivateFromFor,TR,B,Breno,60 + +CompanyOperates,IR,Mark +LaysTileAt,IR,205,F3,N +CompanyDoesNotPayDividend,IR +PRICE_MOVES_LOG,IR,60,E8,55,D8 +BuysTrain,IR,4,IPO,300 + +CompanyOperates,KO,Peter +LaysTileAt,KO,58,J5,NW +CompanyRevenue,KO,110 +CompanyPaysOutFull,KO,110 +Payout,Mark,22,2,10 +Payout,Peter,55,5,10 +Payout,Chris,11,1,10 +Payout,KO,11,1,10 +PRICE_MOVES_LOG,KO,60,D7,65,E7 + +CompanyOperates,UR,Chris +LaysTileAt,UR,6,C10,NE +CompanyRevenue,UR,90 +CompanyWithholds,UR,90 +PRICE_MOVES_LOG,UR,55,B6,50,A6 + +EndOfOperatingRound,4.1 +ORWorthIncrease,Chris,4.1,-19 +ORWorthIncrease,Breno,4.1,40 +ORWorthIncrease,Peter,4.1,95 +ORWorthIncrease,Mark,4.1,17 +Has,IR,120 +Has,KO,186 +Has,TR,80 +Has,UR,245 +Has,Chris,66 +Has,Breno,125 +Has,Peter,130 +Has,Mark,38 +START_OR,4.2 +ReceivesFor,KO,5,A +ReceivesFor,TR,5,B +ReceivesFor,UR,10,C +ReceivesFor,UR,15,D +ReceivesFor,Mark,15,E +ReceivesFor,Peter,20,F +ReceivesFor,Breno,30,G + +CompanyOperates,TR,Breno +LaysTileAt,TR,15,G12,N +LAYS_TOKEN_ON,TR,G12,40 +CompanyRevenue,TR,170 +CompanyPaysOutFull,TR,170 +Payout,Breno,85,5,10 +PRICE_MOVES_LOG,TR,75,C3,80,D3 + +CompanyOperates,KO,Peter +LaysTileAtFor,KO,438,I4,NE,80 +LAYS_TOKEN_ON,KO,I4,40 +CompanyRevenue,KO,150 +CompanyPaysOutFull,KO,150 +Payout,Peter,75,5,10 +Payout,Mark,30,2,10 +Payout,Chris,15,1,10 +Payout,KO,15,1,10 +PRICE_MOVES_LOG,KO,65,E7,70,F7 +BuysPrivateFromFor,KO,F,Peter,80 + +CompanyOperates,IR,Mark +LaysTileAt,IR,15,E2,NE +CompanyRevenue,IR,90 +CompanyWithholds,IR,90 +PRICE_MOVES_LOG,IR,55,D8,50,C8 + +CompanyOperates,UR,Chris +LaysTileAt,UR,15,C10,SW +LAYS_TOKEN_ON,UR,C4,40 +CompanyRevenue,UR,100 +CompanyPaysOutFull,UR,100 +Payout,Mark,10,1,10 +Payout,Chris,60,6,10 +PRICE_MOVES_LOG,UR,50,A6,55,B6 + +EndOfOperatingRound,4.2 +ORWorthIncrease,Chris,4.2,105 +ORWorthIncrease,Breno,4.2,140 +ORWorthIncrease,Peter,4.2,115 +ORWorthIncrease,Mark,4.2,45 +Has,IR,210 +Has,KO,6 +Has,TR,45 +Has,UR,230 +Has,Chris,141 +Has,Breno,240 +Has,Peter,305 +Has,Mark,93 +StartStockRound,5 +HasPriority,Peter +SELL_SHARE_LOG,Peter,10,IR,50 +PRICE_MOVES_LOG,IR,50,C8,45,C9 +SELL_SHARES_LOG,Peter,2,10,20,KO,140 +START_COMPANY_LOG,Peter,AR,90,180,2,20,BANK +BUY_SHARE_LOG,Mark,10,TR,IPO,80 +BUY_SHARE_LOG,Chris,10,TR,IPO,80 +SELL_SHARES_LOG,Breno,2,10,20,TR,160 +PRICE_MOVES_LOG,TR,80,D3,70,D5 +START_COMPANY_LOG,Breno,SR,80,160,2,20,BANK +BUY_SHARE_LOG,Peter,10,AR,IPO,90 +SELL_SHARE_LOG,Mark,10,KO,70 +BUY_SHARE_LOG,Mark,10,TR,IPO,80 +BUY_SHARE_LOG,Chris,10,IR,Pool,45 +BUY_SHARE_LOG,Breno,10,SR,IPO,80 +BUY_SHARE_LOG,Peter,10,AR,IPO,90 +Autopasses,Mark +Autopasses,Chris +BUY_SHARE_LOG,Breno,10,SR,IPO,80 +BUY_SHARE_LOG,Peter,10,AR,IPO,90 +FloatsWithCash,AR,900 +Autopasses,Mark +Autopasses,Chris +BUY_SHARE_LOG,Breno,10,SR,IPO,80 +FloatsWithCash,SR,800 +PASSES,Peter +Autopasses,Mark +Autopasses,Chris +PASSES,Breno + +END_SR,5 +Has,AR,900 +Has,IR,210 +Has,SR,800 +Has,KO,6 +Has,TR,45 +Has,UR,230 +Has,Chris,16 +Has,Breno,0 +Has,Peter,45 +Has,Mark,3 +START_OR,5.1 +ReceivesFor,KO,5,A +ReceivesFor,TR,5,B +ReceivesFor,UR,10,C +ReceivesFor,UR,15,D +ReceivesFor,Mark,15,E +ReceivesFor,KO,20,F +ReceivesFor,Breno,30,G + +CompanyOperates,AR,Peter +LaysTileAt,AR,5,K8,SE +CompanyDoesNotPayDividend,AR +PRICE_MOVES_LOG,AR,90,D2,80,C2 +BuysTrain,AR,4,IPO,300 + +CompanyOperates,SR,Breno +LaysTileAt,SR,5,I2,NW +CompanyDoesNotPayDividend,SR +PRICE_MOVES_LOG,SR,80,D3,75,C3 +BuysTrain,SR,3,TR,270 + +CompanyOperates,KO,Peter +CompanyRevenue,KO,150 +CompanyPaysOutFull,KO,150 +Payout,Peter,45,3,10 +Payout,Chris,15,1,10 +Payout,Mark,15,1,10 +Payout,KO,60,4,10 +PRICE_MOVES_LOG,KO,70,F7,75,F6 + +CompanyOperates,TR,Breno +LaysTileAt,TR,8,E8,SE +CompanyRevenue,TR,140 +CompanyPaysOutFull,TR,140 +Payout,Breno,42,3,10 +Payout,Chris,14,1,10 +Payout,Mark,28,2,10 +Payout,TR,28,2,10 +PRICE_MOVES_LOG,TR,70,D5,75,E5 + +CompanyOperates,UR,Chris +LaysTileAt,UR,9,D9,SW +LAYS_TOKEN_ON,UR,F9,40 +CompanyRevenue,UR,100 +CompanyWithholds,UR,100 +PRICE_MOVES_LOG,UR,55,B6,50,A6 +BuysTrain,UR,4,IPO,300 +All 4-trains are sold out, 5-trains now available + +CompanyOperates,IR,Mark +LaysTileAt,IR,6,G4,SE +CompanyRevenue,IR,110 +CompanyWithholds,IR,110 +PRICE_MOVES_LOG,IR,45,C9,40,B9 + +EndOfOperatingRound,5.1 +ORWorthIncrease,Chris,5.1,-1 +ORWorthIncrease,Breno,5.1,62 +ORWorthIncrease,Peter,5.1,10 +ORWorthIncrease,Mark,5.1,43 +Has,AR,600 +Has,IR,320 +Has,SR,530 +Has,KO,91 +Has,TR,348 +Has,UR,15 +Has,Chris,45 +Has,Breno,72 +Has,Peter,90 +Has,Mark,61 +START_OR,5.2 +ReceivesFor,KO,5,A +ReceivesFor,TR,5,B +ReceivesFor,UR,10,C +ReceivesFor,UR,15,D +ReceivesFor,Mark,15,E +ReceivesFor,KO,20,F +ReceivesFor,Breno,30,G + +CompanyOperates,AR,Peter +LaysTileAtFor,AR,9,K6,S,80 +LAYS_TOKEN_ON,AR,K4,40 +CompanyRevenue,AR,110 +CompanyPaysOutFull,AR,110 +Payout,Peter,55,5,10 +PRICE_MOVES_LOG,AR,80,C2,90,D2 +BuysTrain,AR,5,IPO,450 +FirstTrainBought,5 +StartOfPhase,5 +PrivateCloses,A +PrivateCloses,B +PrivateCloses,C +PrivateCloses,D +PrivateCloses,E +PrivateCloses,F + +CompanyOperates,KO,Peter +LaysTileAt,KO,466,K4,S +CompanyRevenue,KO,230 +CompanyWithholds,KO,230 +PRICE_MOVES_LOG,KO,75,F6,70,E6 + +CompanyOperates,TR,Breno +LaysTileAt,TR,611,C4,SE +LAYS_TOKEN_ON,TR,C4,40 +CompanyRevenue,TR,230 +CompanyPaysOutFull,TR,230 +Payout,Breno,69,3,10 +Payout,Chris,23,1,10 +Payout,Mark,46,2,10 +Payout,TR,46,2,10 +PRICE_MOVES_LOG,TR,75,E5,80,F5 + +CompanyOperates,SR,Breno +LaysTileAt,SR,206,I2,NW +CompanyRevenue,SR,110 +CompanyPaysOutFull,SR,110 +Payout,Breno,55,5,10 +PRICE_MOVES_LOG,SR,75,C3,80,D3 +BuysTrain,SR,5,IPO,450 + +CompanyOperates,UR,Chris +LaysTileAt,UR,448,C10,NE +CompanyRevenue,UR,250 +CompanyPaysOutFull,UR,250 +Payout,Mark,25,1,10 +Payout,Chris,150,6,10 +PRICE_MOVES_LOG,UR,50,A6,55,B6 + +CompanyOperates,IR,Mark +LaysTileAt,IR,448,E2,SW +CompanyRevenue,IR,150 +CompanyWithholds,IR,150 +PRICE_MOVES_LOG,IR,40,B9,30,A9 +BuysTrain,IR,5,IPO,450 +All 5-trains are sold out, 6-trains now available + +EndOfOperatingRound,5.2 +ORWorthIncrease,Chris,5.2,183 +ORWorthIncrease,Breno,5.2,194 +ORWorthIncrease,Peter,5.2,90 +ORWorthIncrease,Mark,5.2,-14 +Has,AR,30 +Has,IR,20 +Has,SR,80 +Has,KO,346 +Has,TR,359 +Has,UR,40 +Has,Chris,218 +Has,Breno,226 +Has,Peter,145 +Has,Mark,147 +StartStockRound,6 +HasPriority,Peter +BUY_SHARE_LOG,Peter,10,KO,IPO,65 +BUY_SHARE_LOG,Mark,10,IR,Pool,30 +BUY_SHARE_LOG,Chris,10,IR,Pool,30 +BUY_SHARE_LOG,Breno,10,AR,IPO,90 +BUY_SHARE_LOG,Peter,10,IR,Pool,30 +BUY_SHARE_LOG,Mark,10,AR,IPO,90 +BUY_SHARE_LOG,Chris,10,AR,IPO,90 +BUY_SHARE_LOG,Breno,10,AR,IPO,90 +SELL_SHARES_LOG,Breno,2,10,20,AR,180 +PRICE_MOVES_LOG,AR,90,D2,75,D4 +PASSES,Peter +Autopasses,Mark +BUY_SHARE_LOG,Chris,10,SR,IPO,80 +BUY_SHARE_LOG,Breno,10,TR,IPO,80 +PASSES,Peter +Autopasses,Mark +Autopasses,Chris +BUY_SHARE_LOG,Breno,10,UR,IPO,65 +PASSES,Peter +Autopasses,Mark +Autopasses,Chris +BUY_SHARE_LOG,Breno,10,TR,IPO,80 +PASSES,Peter +Autopasses,Mark +Autopasses,Chris +PASSES,Breno + +END_SR,6 +PRICE_MOVES_LOG,IR,30,A9,40,A8 +SoldOut,IR,30,A9,40,A8 +Has,AR,30 +Has,IR,20 +Has,SR,80 +Has,KO,346 +Has,TR,359 +Has,UR,40 +Has,Chris,18 +Has,Breno,1 +Has,Peter,50 +Has,Mark,27 +START_OR,6.1 +ReceivesFor,Breno,50,G + +CompanyOperates,TR,Breno +LaysTileAt,TR,9,D3,SW +CompanyRevenue,TR,290 +CompanyPaysOutFull,TR,290 +Payout,Breno,145,5,10 +Payout,Chris,29,1,10 +Payout,Mark,58,2,10 +Payout,TR,58,2,10 +PRICE_MOVES_LOG,TR,80,F5,90,G5 + +CompanyOperates,SR,Breno +LaysTileAt,SR,9,H3,SW +CompanyRevenue,SR,190 +CompanyPaysOutFull,SR,190 +Payout,Breno,95,5,10 +Payout,Chris,19,1,10 +PRICE_MOVES_LOG,SR,80,D3,90,E3 + +CompanyOperates,AR,Peter +LaysTileAt,AR,15,K8,SW +CompanyRevenue,AR,280 +CompanyPaysOutFull,AR,280 +Payout,Chris,28,1,10 +Payout,Peter,140,5,10 +Payout,Mark,28,1,10 +Payout,AR,56,2,10 +PRICE_MOVES_LOG,AR,75,D4,80,E4 + +CompanyOperates,KO,Peter +LaysTileAt,KO,448,K8,NE +CompanyRevenue,KO,250 +CompanyPaysOutFull,KO,250 +Payout,Peter,100,4,10 +Payout,Chris,25,1,10 +Payout,Mark,25,1,10 +Payout,KO,100,4,10 +PRICE_MOVES_LOG,KO,70,E6,75,F6 + +CompanyOperates,UR,Chris +LaysTileAt,UR,448,G12,S +CompanyRevenue,UR,290 +CompanyPaysOutFull,UR,290 +Payout,Breno,29,1,10 +Payout,Chris,174,6,10 +Payout,Mark,29,1,10 +PRICE_MOVES_LOG,UR,55,B6,60,C6 + +CompanyOperates,IR,Mark +LaysTileAt,IR,611,F3,S +CompanyRevenue,IR,290 +CompanyPaysOutFull,IR,290 +Payout,Chris,87,3,10 +Payout,Peter,29,1,10 +Payout,Mark,174,6,10 +PRICE_MOVES_LOG,IR,40,A8,45,B8 + +EndOfOperatingRound,6.1 +ORWorthIncrease,Chris,6.1,437 +ORWorthIncrease,Breno,6.1,424 +ORWorthIncrease,Peter,6.1,319 +ORWorthIncrease,Mark,6.1,379 +Has,AR,86 +Has,IR,20 +Has,SR,80 +Has,KO,446 +Has,TR,417 +Has,UR,40 +Has,Chris,380 +Has,Breno,320 +Has,Peter,319 +Has,Mark,341 +START_OR,6.2 +ReceivesFor,Breno,50,G + +CompanyOperates,TR,Breno +LaysTileAt,TR,23,H3,NE +CompanyRevenue,TR,300 +CompanyPaysOutFull,TR,300 +Payout,Breno,150,5,10 +Payout,Chris,30,1,10 +Payout,Mark,60,2,10 +Payout,TR,60,2,10 +PRICE_MOVES_LOG,TR,90,G5,100,H5 + +CompanyOperates,SR,Breno +LaysTileAt,SR,13,G4,SW +CompanyRevenue,SR,310 +CompanyPaysOutFull,SR,310 +Payout,Breno,155,5,10 +Payout,Chris,31,1,10 +PRICE_MOVES_LOG,SR,90,E3,100,F3 + +CompanyOperates,AR,Peter +LaysTileAtFor,AR,439,I4,S,80 +CompanyRevenue,AR,340 +CompanyPaysOutFull,AR,340 +Payout,Chris,34,1,10 +Payout,Mark,34,1,10 +Payout,Peter,170,5,10 +Payout,AR,68,2,10 +PRICE_MOVES_LOG,AR,80,E4,90,F4 + +CompanyOperates,KO,Peter +LaysTileAtFor,KO,492,I4,S,80 +CompanyRevenue,KO,300 +CompanyPaysOutFull,KO,300 +Payout,Chris,30,1,10 +Payout,Peter,120,4,10 +Payout,Mark,30,1,10 +Payout,KO,120,4,10 +PRICE_MOVES_LOG,KO,75,F6,80,G6 + +CompanyOperates,UR,Chris +LaysTileAt,UR,58,B11,NW +CompanyRevenue,UR,300 +CompanyPaysOutFull,UR,300 +Payout,Breno,30,1,10 +Payout,Chris,180,6,10 +Payout,Mark,30,1,10 +PRICE_MOVES_LOG,UR,60,C6,65,D6 + +CompanyOperates,IR,Mark +CompanyRevenue,IR,400 +CompanyPaysOutFull,IR,400 +Payout,Chris,120,3,10 +Payout,Peter,40,1,10 +Payout,Mark,240,6,10 +PRICE_MOVES_LOG,IR,45,B8,50,C8 + +EndOfOperatingRound,6.2 +ORWorthIncrease,Chris,6.2,505 +ORWorthIncrease,Breno,6.2,490 +ORWorthIncrease,Peter,6.2,405 +ORWorthIncrease,Mark,6.2,464 +Has,AR,74 +Has,IR,20 +Has,SR,80 +Has,KO,486 +Has,TR,477 +Has,UR,40 +Has,Chris,805 +Has,Breno,705 +Has,Peter,649 +Has,Mark,735 +START_OR,6.3 +ReceivesFor,Breno,50,G + +CompanyOperates,TR,Breno +LaysTileAt,TR,25,J3,SE +CompanyRevenue,TR,300 +CompanyPaysOutFull,TR,300 +Payout,Breno,150,5,10 +Payout,Chris,30,1,10 +Payout,Mark,60,2,10 +Payout,TR,60,2,10 +PRICE_MOVES_LOG,TR,100,H5,110,H4 + +CompanyOperates,SR,Breno +CompanyRevenue,SR,370 +CompanyPaysOutFull,SR,370 +Payout,Breno,185,5,10 +Payout,Chris,37,1,10 +PRICE_MOVES_LOG,SR,100,F3,110,G3 + +CompanyOperates,AR,Peter +LaysTileAt,AR,58,J9,NE +CompanyRevenue,AR,460 +CompanyPaysOutFull,AR,460 +Payout,Chris,46,1,10 +Payout,Mark,46,1,10 +Payout,Peter,230,5,10 +Payout,AR,92,2,10 +PRICE_MOVES_LOG,AR,90,F4,100,G4 + +CompanyOperates,KO,Peter +LaysTileAt,KO,6,J11,NE +CompanyRevenue,KO,330 +CompanyPaysOutFull,KO,330 +Payout,Chris,33,1,10 +Payout,Peter,132,4,10 +Payout,Mark,33,1,10 +Payout,KO,132,4,10 +PRICE_MOVES_LOG,KO,80,G6,90,G5 + +CompanyOperates,UR,Chris +LaysTileAt,UR,6,A10,S +CompanyRevenue,UR,300 +CompanyPaysOutFull,UR,300 +Payout,Breno,30,1,10 +Payout,Chris,180,6,10 +Payout,Mark,30,1,10 +PRICE_MOVES_LOG,UR,65,D6,70,E6 + +CompanyOperates,IR,Mark +CompanyRevenue,IR,410 +CompanyPaysOutFull,IR,410 +Payout,Chris,123,3,10 +Payout,Peter,41,1,10 +Payout,Mark,246,6,10 +PRICE_MOVES_LOG,IR,50,C8,55,D8 + +EndOfOperatingRound,6.3 +ORWorthIncrease,Chris,6.3,534 +ORWorthIncrease,Breno,6.3,520 +ORWorthIncrease,Peter,6.3,498 +ORWorthIncrease,Mark,6.3,490 +Has,AR,166 +Has,IR,20 +Has,SR,80 +Has,KO,618 +Has,TR,537 +Has,UR,40 +Has,Chris,1254 +Has,Breno,1120 +Has,Peter,1052 +Has,Mark,1150 +StartStockRound,7 +HasPriority,Peter +START_COMPANY_LOG,Peter,KU,100,200,2,20,BANK +BUY_SHARE_LOG,Mark,10,SR,IPO,80 +BUY_SHARE_LOG,Chris,10,SR,IPO,80 +SELL_SHARE_LOG,Chris,10,SR,110 +PRICE_MOVES_LOG,SR,110,G3,100,G4 +BUY_SHARE_LOG,Breno,10,TR,Pool,110 +BUY_SHARE_LOG,Peter,10,KU,IPO,100 +BUY_SHARE_LOG,Mark,10,KU,IPO,100 +BUY_SHARE_LOG,Chris,10,AR,IPO,90 +SELL_SHARE_LOG,Chris,10,AR,100 +PRICE_MOVES_LOG,AR,100,G4,90,G5 +BUY_SHARE_LOG,Breno,10,SR,IPO,80 +BUY_SHARE_LOG,Peter,10,KU,IPO,100 +FloatsWithCash,KU,1000 +BUY_SHARE_LOG,Mark,10,SR,IPO,80 +BUY_SHARE_LOG,Chris,10,TR,Pool,110 +SELL_SHARE_LOG,Chris,10,TR,110 +PRICE_MOVES_LOG,TR,110,H4,100,H5 +BUY_SHARE_LOG,Breno,10,KU,IPO,100 +BUY_SHARE_LOG,Peter,10,AR,Pool,90 +BUY_SHARE_LOG,Mark,10,KU,IPO,100 +BUY_SHARE_LOG,Chris,10,KO,Pool,90 +SELL_SHARE_LOG,Chris,10,KO,90 +PRICE_MOVES_LOG,KO,90,G5,80,G6 +BUY_SHARE_LOG,Breno,10,KU,IPO,100 +SELL_SHARES_LOG,Breno,2,10,20,KU,200 +PRICE_MOVES_LOG,KU,100,D1,80,D3 +BUY_SHARE_LOG,Peter,10,KU,IPO,100 +Autopasses,Mark +BUY_SHARE_LOG,Chris,10,KU,Pool,80 +BUY_SHARE_LOG,Breno,10,AR,Pool,90 +BUY_SHARE_LOG,Peter,10,SR,Pool,100 +Autopasses,Mark +BUY_SHARE_LOG,Chris,10,KU,Pool,80 +SELL_SHARE_LOG,Chris,10,KU,80 +PRICE_MOVES_LOG,KU,80,D3,75,D4 +BUY_SHARE_LOG,Breno,10,KO,Pool,80 +SELL_SHARE_LOG,Peter,10,SR,100 +PRICE_MOVES_LOG,SR,100,G4,90,G5 +BUY_SHARE_LOG,Peter,10,TR,Pool,100 +Autopasses,Mark +PASSES,Chris +PASSES,Breno +PASSES,Peter + +END_SR,7 +PRICE_MOVES_LOG,TR,100,H5,110,H4 +SoldOut,TR,100,H5,110,H4 +PRICE_MOVES_LOG,IR,55,D8,60,D7 +SoldOut,IR,55,D8,60,D7 +Has,AR,166 +Has,IR,20 +Has,SR,80 +Has,KO,618 +Has,TR,537 +Has,KU,1000 +Has,UR,40 +Has,Chris,1214 +Has,Breno,760 +Has,Peter,362 +Has,Mark,790 +START_OR,7.1 +ReceivesFor,Breno,50,G + +CompanyOperates,TR,Breno +CompanyRevenue,TR,300 +CompanyPaysOutFull,TR,300 +Payout,Breno,180,6,10 +Payout,Chris,30,1,10 +Payout,Mark,60,2,10 +Payout,Peter,30,1,10 +PRICE_MOVES_LOG,TR,110,H4,125,I4 + +CompanyOperates,AR,Peter +LaysTileAt,AR,12,J11,N +CompanyRevenue,AR,460 +CompanyPaysOutFull,AR,460 +Payout,Breno,46,1,10 +Payout,Chris,46,1,10 +Payout,Mark,46,1,10 +Payout,Peter,276,6,10 +Payout,AR,46,1,10 +PRICE_MOVES_LOG,AR,90,G5,100,H5 + +CompanyOperates,SR,Breno +CompanyRevenue,SR,370 +CompanyPaysOutFull,SR,370 +Payout,Breno,222,6,10 +Payout,Chris,37,1,10 +Payout,Mark,74,2,10 +Payout,SR,37,1,10 +PRICE_MOVES_LOG,SR,90,G5,100,H5 + +CompanyOperates,KO,Peter +LaysTileAt,KO,8,I10,SE +CompanyRevenue,KO,330 +CompanyPaysOutFull,KO,330 +Payout,Breno,33,1,10 +Payout,Chris,33,1,10 +Payout,Mark,33,1,10 +Payout,Peter,132,4,10 +Payout,KO,99,3,10 +BankIsBrokenReportText +PRICE_MOVES_LOG,KO,80,G6,90,G5 + +CompanyOperates,KU,Peter +LaysTileAtFor,KU,465,F9,NE,80 +CompanyDoesNotPayDividend,KU +PRICE_MOVES_LOG,KU,75,D4,70,C4 +BuysTrain,KU,3,KO,290 +BuysTrain,KU,6,IPO,630 +FirstTrainBought,6 +StartOfPhase,6 + +CompanyOperates,UR,Chris +LaysTileAt,UR,23,C8,SE +CompanyRevenue,UR,180 +CompanyPaysOutFull,UR,180 +Payout,Breno,18,1,10 +Payout,Chris,108,6,10 +Payout,Mark,18,1,10 +PRICE_MOVES_LOG,UR,70,E6,75,F6 + +CompanyOperates,IR,Mark +CompanyRevenue,IR,410 +CompanyPaysOutFull,IR,410 +Payout,Chris,123,3,10 +Payout,Peter,41,1,10 +Payout,Mark,246,6,10 +PRICE_MOVES_LOG,IR,60,D7,65,E7 + +EndOfOperatingRound,7.1 +ORWorthIncrease,Chris,7.1,462 +ORWorthIncrease,Breno,7.1,724 +ORWorthIncrease,Peter,7.1,574 +ORWorthIncrease,Mark,7.1,572 +Has,AR,212 +Has,IR,20 +Has,SR,117 +Has,KO,1007 +Has,TR,537 +Has,KU,0 +Has,UR,40 +Has,Chris,1591 +Has,Breno,1309 +Has,Peter,841 +Has,Mark,1267 +START_OR,7.2 +ReceivesFor,Breno,50,G + +CompanyOperates,TR,Breno +CompanyRevenue,TR,180 +CompanyWithholds,TR,180 +PRICE_MOVES_LOG,TR,125,I4,110,H4 +BuysTrain,TR,6,IPO,630 + +CompanyOperates,AR,Peter +LaysTileAtFor,AR,9,H11,SW,80 +CompanyRevenue,AR,460 +CompanyPaysOutFull,AR,460 +Payout,Breno,46,1,10 +Payout,Chris,46,1,10 +Payout,Mark,46,1,10 +Payout,Peter,276,6,10 +Payout,AR,46,1,10 +PRICE_MOVES_LOG,AR,100,H5,110,H4 + +CompanyOperates,SR,Breno +LaysTileAt,SR,41,H3,NE +LAYS_TOKEN_ON,SR,G4,40 +CompanyRevenue,SR,270 +CompanyPaysOutFull,SR,270 +Payout,Breno,162,6,10 +Payout,Chris,27,1,10 +Payout,Mark,54,2,10 +Payout,SR,27,1,10 +PRICE_MOVES_LOG,SR,100,H5,110,H4 + +CompanyOperates,KO,Peter +LaysTileAt,KO,23,B5,N +CompanyDoesNotPayDividend,KO +PRICE_MOVES_LOG,KO,90,G5,80,F5 +PresidentAddsCash,KO,Peter,93 +BuysTrain,KO,D,IPO,1100 +FirstTrainBought,D +StartOfPhase,D + +CompanyOperates,UR,Chris diff --git a/test/data/real/18GA_A.rails b/test/data/real/18GA_A.rails new file mode 100644 index 0000000..53bf9c9 Binary files /dev/null and b/test/data/real/18GA_A.rails differ diff --git a/test/data/real/18GA_A.report b/test/data/real/18GA_A.report new file mode 100644 index 0000000..2c5075a --- /dev/null +++ b/test/data/real/18GA_A.report @@ -0,0 +1,1117 @@ +GameIs,18GA +PlayerIs,1,adik +PlayerIs,2,ola +PlayerIs,3,abadura +PlayerIs,4,bazik +PlayerCash,450 +BankHas,6200 +StartOfPhase,2 +BankSizeIs,6200 +StartOfInitialRound +HasPriority,adik +BID_ITEM_LOG,adik,105,OSO,345 +BID_ITEM_LOG,ola,45,MR,405 +BID_ITEM_LOG,abadura,155,M&B,295 +BID_ITEM_LOG,bazik,110,OSO,340 +BID_ITEM_LOG,adik,75,W&S,270 +BID_ITEM_LOG,ola,160,M&B,245 +BID_ITEM_LOG,abadura,115,OSO,180 +BID_ITEM_LOG,bazik,165,M&B,175 +BuysItemFor,adik,LT,20 +BuysItemFor,ola,MR,45 +BuysItemFor,adik,W&S,75 +TO_AUCTION,OSO +BID_ITEM_LOG,bazik,120,OSO,165 +PASSES,adik +BID_ITEM_LOG,abadura,125,OSO,170 +BID_ITEM_LOG,bazik,130,OSO,155 +PASSES,adik +PASSES,abadura +BuysItemFor,bazik,OSO,130 +TO_AUCTION,M&B +PASSES,ola +BID_ITEM_LOG,abadura,170,M&B,280 +BID_ITEM_LOG,bazik,175,M&B,145 +PASSES,ola +PASSES,abadura +BuysItemFor,bazik,M&B,175 +ALSO_GETS,bazik,CERT_NAME,CoG,10 +Has,adik,355 +Has,ola,405 +Has,abadura,450 +Has,bazik,145 +StartStockRound,1 +HasPriority,ola +START_COMPANY_LOG,ola,GA,55,110,2,20,BANK +START_COMPANY_LOG,abadura,ACL,55,110,2,20,BANK +Autopasses,bazik +START_COMPANY_LOG,adik,W&A,55,110,2,20,BANK +BUY_SHARE_LOG,ola,10,GA,IPO,55 +BUY_SHARE_LOG,abadura,10,ACL,IPO,55 +Autopasses,bazik +BUY_SHARE_LOG,adik,10,W&A,IPO,55 +BUY_SHARE_LOG,ola,10,GA,IPO,55 +BUY_SHARE_LOG,abadura,10,ACL,IPO,55 +Autopasses,bazik +BUY_SHARE_LOG,adik,10,W&A,IPO,55 +BUY_SHARE_LOG,ola,10,GA,IPO,55 +BUY_SHARE_LOG,abadura,10,ACL,IPO,55 +Autopasses,bazik +BUY_SHARE_LOG,adik,10,W&A,IPO,55 +BUY_SHARE_LOG,ola,10,GA,IPO,55 +FloatsWithCash,GA,550 +BUY_SHARE_LOG,abadura,10,ACL,IPO,55 +FloatsWithCash,ACL,550 +Autopasses,bazik +BUY_SHARE_LOG,adik,10,W&A,IPO,55 +FloatsWithCash,W&A,550 +PASSES,ola +Autopasses,abadura +Autopasses,bazik +Autopasses,adik + +END_SR,1 +Has,ACL,550 +Has,GA,550 +Has,W&A,550 +Has,adik,25 +Has,ola,75 +Has,abadura,120 +Has,bazik,145 +START_OR,1.1 +ReceivesFor,adik,5,LT +ReceivesFor,ola,10,MR +ReceivesFor,adik,15,W&S +ReceivesFor,bazik,20,OSO +ReceivesFor,bazik,25,M&B + +CompanyOperates,GA,ola +LaysTileAt,GA,6,D10,NE +CompanyDoesNotPayDividend,GA +PRICE_MOVES_LOG,GA,55,C4,50,B4 +BuysTrain,GA,2,IPO,100 +FirstTrainBought,2 + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,6,I11,NW +CompanyDoesNotPayDividend,ACL +PRICE_MOVES_LOG,ACL,55,C4,50,B4 +BuysTrain,ACL,2,IPO,100 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,451,D4,SW +CompanyDoesNotPayDividend,W&A +PRICE_MOVES_LOG,W&A,55,C4,50,B4 +BuysTrain,W&A,2,IPO,100 + +EndOfOperatingRound,1.1 +ORWorthIncrease,adik,1.1,-10 +ORWorthIncrease,ola,1.1,-20 +ORWorthIncrease,abadura,1.1,-30 +ORWorthIncrease,bazik,1.1,45 +Has,ACL,450 +Has,GA,450 +Has,W&A,450 +Has,adik,45 +Has,ola,85 +Has,abadura,120 +Has,bazik,190 +StartStockRound,2 +HasPriority,ola +BUY_SHARE_LOG,ola,10,W&A,IPO,55 +BUY_SHARE_LOG,abadura,10,W&A,IPO,55 +BUY_SHARE_LOG,bazik,10,ACL,IPO,55 +Autopasses,adik +Autopasses,ola +BUY_SHARE_LOG,abadura,10,GA,IPO,55 +BUY_SHARE_LOG,bazik,10,ACL,IPO,55 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,ACL,IPO,55 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +PASSES,bazik + +END_SR,2 +Has,ACL,450 +Has,GA,450 +Has,W&A,450 +Has,adik,45 +Has,ola,30 +Has,abadura,10 +Has,bazik,25 +START_OR,2.1 +ReceivesFor,adik,5,LT +ReceivesFor,ola,10,MR +ReceivesFor,adik,15,W&S +ReceivesFor,bazik,20,OSO +ReceivesFor,bazik,25,M&B + +CompanyOperates,GA,ola +LaysTileAt,GA,8,C9,NE +CompanyRevenue,GA,50 +CompanyPaysOutFull,GA,50 +Payout,ola,30,6,10 +Payout,abadura,5,1,10 +PRICE_MOVES_LOG,GA,50,B4,55,C4 + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,8,J10,NW +CompanyRevenue,ACL,50 +CompanyPaysOutFull,ACL,50 +Payout,bazik,15,3,10 +Payout,abadura,30,6,10 +PRICE_MOVES_LOG,ACL,50,B4,55,C4 +BuysTrain,ACL,2,IPO,100 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,5,C3,W +CompanyRevenue,W&A,50 +CompanyPaysOutFull,W&A,50 +Payout,ola,5,1,10 +Payout,abadura,5,1,10 +Payout,adik,30,6,10 +PRICE_MOVES_LOG,W&A,50,B4,55,C4 +BuysTrain,W&A,2,IPO,100 +All 2-trains are sold out, 3-trains now available + +EndOfOperatingRound,2.1 +ORWorthIncrease,adik,2.1,80 +ORWorthIncrease,ola,2.1,80 +ORWorthIncrease,abadura,2.1,80 +ORWorthIncrease,bazik,2.1,75 +Has,ACL,350 +Has,GA,450 +Has,W&A,350 +Has,adik,95 +Has,ola,75 +Has,abadura,50 +Has,bazik,85 +StartStockRound,3 +HasPriority,adik +BUY_SHARE_LOG,adik,10,ACL,IPO,55 +BUY_SHARE_LOG,ola,10,W&A,IPO,55 +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,W&A,IPO,55 +Autopasses,adik +PASSES,ola +Autopasses,abadura +PASSES,bazik + +END_SR,3 +PRICE_MOVES_LOG,ACL,55,C4,60,C3 +SoldOut,ACL,55,C4,60,C3 +PRICE_MOVES_LOG,W&A,55,C4,60,C3 +SoldOut,W&A,55,C4,60,C3 +Has,ACL,350 +Has,GA,450 +Has,W&A,350 +Has,adik,40 +Has,ola,20 +Has,abadura,50 +Has,bazik,30 +START_OR,3.1 +ReceivesFor,adik,5,LT +ReceivesFor,ola,10,MR +ReceivesFor,adik,15,W&S +ReceivesFor,bazik,20,OSO +ReceivesFor,bazik,25,M&B + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,5,I9,W +CompanyRevenue,ACL,100 +CompanyPaysOutFull,ACL,100 +Payout,adik,10,1,10 +Payout,bazik,30,3,10 +Payout,abadura,60,6,10 +PRICE_MOVES_LOG,ACL,60,C3,70,D3 +BuysTrain,ACL,3,IPO,180 +FirstTrainBought,3 +StartOfPhase,3 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,9,D2,SW +LAYS_TOKEN_ON,W&A,C3,40 +CompanyRevenue,W&A,100 +CompanyPaysOutFull,W&A,100 +Payout,abadura,10,1,10 +Payout,bazik,10,1,10 +Payout,adik,60,6,10 +Payout,ola,20,2,10 +PRICE_MOVES_LOG,W&A,60,C3,70,D3 +BuysTrain,W&A,3,IPO,180 +BuysPrivateFromFor,W&A,W&S,adik,105 + +CompanyOperates,GA,ola +LaysTileAt,GA,453,D10,W +CompanyRevenue,GA,70 +CompanyPaysOutFull,GA,70 +Payout,abadura,7,1,10 +Payout,ola,42,6,10 +PRICE_MOVES_LOG,GA,55,C4,60,D4 +BuysTrain,GA,3,IPO,180 +BuysPrivateFromFor,GA,MR,ola,60 + +EndOfOperatingRound,3.1 +ORWorthIncrease,adik,3.1,195 +ORWorthIncrease,ola,3.1,142 +ORWorthIncrease,abadura,3.1,152 +ORWorthIncrease,bazik,3.1,125 +Has,ACL,170 +Has,GA,210 +Has,W&A,25 +Has,adik,235 +Has,ola,152 +Has,abadura,127 +Has,bazik,115 +StartStockRound,4 +HasPriority,adik +BUY_SHARE_LOG,adik,10,GA,IPO,55 +SELL_SHARES_LOG,ola,2,10,20,W&A,140 +PRICE_MOVES_LOG,W&A,70,D3,55,D5 +SELL_SHARE_LOG,ola,10,GA,60 +PRICE_MOVES_LOG,GA,60,D4,55,D5 +START_COMPANY_LOG,ola,SAL,55,110,2,20,BANK +SELL_SHARE_LOG,abadura,10,GA,55 +PRICE_MOVES_LOG,GA,55,D5,50,D6 +SELL_SHARE_LOG,abadura,10,W&A,55 +PRICE_MOVES_LOG,W&A,55,D5,50,D6 +START_COMPANY_LOG,abadura,G&F,55,110,2,20,BANK +BUY_SHARE_LOG,bazik,10,GA,Pool,50 +SELL_SHARE_LOG,adik,10,ACL,70 +PRICE_MOVES_LOG,ACL,70,D3,60,D4 +SELL_SHARE_LOG,adik,10,GA,50 +PRICE_MOVES_LOG,GA,50,D6,45,D7 +SELL_SHARE_LOG,adik,10,W&A,50 +PRICE_MOVES_LOG,W&A,50,D6,45,D7 +START_COMPANY_LOG,adik,CoG,70,140,2,20,BANK +BUY_SHARE_LOG,ola,10,SAL,IPO,55 +PASSES,abadura +BUY_SHARE_LOG,bazik,10,ACL,Pool,60 +BUY_SHARE_LOG,adik,10,CoG,IPO,70 +BUY_SHARE_LOG,ola,10,SAL,IPO,55 +PASSES,abadura +SELL_SHARES_LOG,bazik,4,10,40,ACL,240 +PRICE_MOVES_LOG,ACL,60,D4,45,D7 +BUY_SHARE_LOG,bazik,10,G&F,IPO,55 +BUY_SHARE_LOG,adik,10,CoG,IPO,70 +BUY_SHARE_LOG,ola,10,SAL,IPO,55 +BUY_SHARE_LOG,abadura,10,G&F,IPO,55 +BUY_SHARE_LOG,bazik,10,G&F,IPO,55 +BUY_SHARE_LOG,adik,10,CoG,IPO,70 +FloatsWithCash,CoG,700 +BUY_SHARE_LOG,ola,10,SAL,IPO,55 +FloatsWithCash,SAL,550 +BUY_SHARE_LOG,abadura,10,G&F,IPO,55 +FloatsWithCash,G&F,550 +BUY_SHARE_LOG,bazik,10,G&F,IPO,55 +Autopasses,adik +Autopasses,ola +PASSES,abadura +BUY_SHARE_LOG,bazik,10,G&F,IPO,55 +Autopasses,adik +Autopasses,ola +SELL_SHARE_LOG,abadura,10,ACL,45 +BUY_SHARE_LOG,abadura,10,G&F,IPO,55 +SELL_SHARES_LOG,bazik,4,10,40,G&F,220 +PRICE_MOVES_LOG,G&F,55,C4,40,C7 +BUY_SHARE_LOG,bazik,10,CoG,IPO,70 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,CoG,IPO,70 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,CoG,IPO,70 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +SELL_SHARES_LOG,bazik,4,10,40,CoG,280 +PRICE_MOVES_LOG,CoG,70,D3,45,D7 +BUY_SHARE_LOG,bazik,10,SAL,IPO,55 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,SAL,IPO,55 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,SAL,IPO,55 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +SELL_SHARES_LOG,bazik,3,10,30,SAL,165 +PRICE_MOVES_LOG,SAL,55,C4,40,C7 +BUY_SHARE_LOG,bazik,10,W&A,Pool,45 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,W&A,Pool,45 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,W&A,Pool,45 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,W&A,Pool,45 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,GA,Pool,45 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +BUY_SHARE_LOG,bazik,10,GA,Pool,45 +Autopasses,adik +Autopasses,ola +Autopasses,abadura +PASSES,bazik + +END_SR,4 +PRICE_MOVES_LOG,W&A,45,D7,50,D6 +SoldOut,W&A,45,D7,50,D6 +Has,ACL,170 +Has,CoG,700 +Has,GA,210 +Has,G&F,550 +Has,SAL,550 +Has,W&A,25 +Has,adik,0 +Has,ola,22 +Has,abadura,7 +Has,bazik,45 +START_OR,4.1 +ReceivesFor,adik,5,LT +ReceivesFor,GA,10,MR +ReceivesFor,W&A,15,W&S +ReceivesFor,bazik,20,OSO +ReceivesFor,bazik,25,M&B + +CompanyOperates,W&A,adik +LaysTileAt,W&A,15,C3,NE +CompanyRevenue,W&A,120 +CompanyWithholds,W&A,120 +PRICE_MOVES_LOG,W&A,50,D6,45,C6 + +CompanyOperates,GA,ola +LaysTileAt,GA,9,F12,NW +LaysTileAt,GA,9,E11,NW +CompanyRevenue,GA,70 +CompanyPaysOutFull,GA,70 +Payout,bazik,21,3,10 +Payout,ola,35,5,10 +PRICE_MOVES_LOG,GA,45,D7,50,E7 +BuysTrain,GA,3,IPO,180 +All 3-trains are sold out, 4-trains now available + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,15,I9,E +CompanyRevenue,ACL,140 +CompanyWithholds,ACL,140 +PRICE_MOVES_LOG,ACL,45,D7,40,C7 +BuysTrain,ACL,4,IPO,300 +FirstTrainBought,4 +StartOfPhase,4 + +CompanyOperates,CoG,adik +LaysTileAt,CoG,5,F6,E +CompanyDoesNotPayDividend,CoG +PRICE_MOVES_LOG,CoG,45,D7,40,C7 +BuysTrain,CoG,3,W&A,300 +BuysTrain,CoG,4,IPO,300 + +CompanyOperates,G&F,abadura +LaysTileAt,G&F,6,H4,SW +CompanyDoesNotPayDividend,G&F +PRICE_MOVES_LOG,G&F,40,C7,35,B7 +BuysTrain,G&F,4,ACL,490 + +CompanyOperates,SAL,ola +LaysTileAt,SAL,5,G13,NE +LAYS_TOKEN_ON,SAL,D10,40 +CompanyDoesNotPayDividend,SAL +PRICE_MOVES_LOG,SAL,40,C7,35,B7 +BuysTrain,SAL,4,IPO,300 +All 4-trains are sold out, 5-trains now available + +EndOfOperatingRound,4.1 +ORWorthIncrease,adik,4.1,-45 +ORWorthIncrease,ola,4.1,30 +ORWorthIncrease,abadura,4.1,-50 +ORWorthIncrease,bazik,4.1,56 +Has,ACL,500 +Has,CoG,100 +Has,GA,40 +Has,G&F,60 +Has,SAL,210 +Has,W&A,460 +Has,adik,5 +Has,ola,57 +Has,abadura,7 +Has,bazik,111 +START_OR,4.2 +ReceivesFor,adik,5,LT +ReceivesFor,GA,10,MR +ReceivesFor,W&A,15,W&S +ReceivesFor,bazik,20,OSO +ReceivesFor,bazik,25,M&B + +CompanyOperates,GA,ola +LaysTileAt,GA,454,G13,W +LAYS_TOKEN_ON,GA,G13,40 +CompanyRevenue,GA,140 +CompanyPaysOutFull,GA,140 +Payout,bazik,42,3,10 +Payout,ola,70,5,10 +PRICE_MOVES_LOG,GA,50,E7,55,E6 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,452,D4,SW +CompanyDoesNotPayDividend,W&A +PRICE_MOVES_LOG,W&A,45,C6,40,B6 +BuysTrain,W&A,5,IPO,450 +FirstTrainBought,5 +StartOfPhase,5 +PrivateCloses,LT +PrivateCloses,MR +PrivateCloses,W&S +PrivateCloses,OSO +PrivateCloses,M&B +BuysTrain,W&A,3,CoG,24 + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,58,I7,E +CompanyRevenue,ACL,120 +CompanyPaysOutFull,ACL,120 +Payout,abadura,60,5,10 +Payout,ACL,60,5,10 +PRICE_MOVES_LOG,ACL,40,C7,45,D7 +BuysTrain,ACL,5,IPO,450 +All 5-trains are sold out, 6-trains now available + +CompanyOperates,CoG,adik +LaysTileAt,CoG,9,E5,NW +CompanyRevenue,CoG,40 +CompanyPaysOutFull,CoG,40 +Payout,adik,20,5,10 +Payout,CoG,16,4,10 +PRICE_MOVES_LOG,CoG,40,C7,45,D7 + +CompanyOperates,G&F,abadura +LaysTileAt,G&F,8,I5,SW +CompanyRevenue,G&F,70 +CompanyPaysOutFull,G&F,70 +Payout,abadura,35,5,10 +Payout,G&F,28,4,10 +PRICE_MOVES_LOG,G&F,35,B7,40,C7 + +CompanyOperates,SAL,ola +LaysTileAt,SAL,9,D8,W +CompanyRevenue,SAL,110 +CompanyPaysOutFull,SAL,110 +Payout,ola,66,6,10 +Payout,SAL,33,3,10 +PRICE_MOVES_LOG,SAL,35,B7,40,C7 + +EndOfOperatingRound,4.2 +ORWorthIncrease,adik,4.2,5 +ORWorthIncrease,ola,4.2,191 +ORWorthIncrease,abadura,4.2,145 +ORWorthIncrease,bazik,4.2,-173 +Has,ACL,110 +Has,CoG,140 +Has,GA,10 +Has,G&F,88 +Has,SAL,243 +Has,W&A,1 +Has,adik,30 +Has,ola,193 +Has,abadura,102 +Has,bazik,198 +StartStockRound,5 +HasPriority,adik +Autopasses,adik +BUY_SHARE_LOG,ola,10,ACL,Pool,45 +BUY_SHARE_LOG,abadura,10,ACL,Pool,45 +BUY_SHARE_LOG,bazik,10,GA,IPO,55 +Autopasses,adik +BUY_SHARE_LOG,ola,10,ACL,Pool,45 +BUY_SHARE_LOG,abadura,10,SAL,Pool,40 +BUY_SHARE_LOG,bazik,10,GA,IPO,55 +Autopasses,adik +BUY_SHARE_LOG,ola,10,G&F,Pool,40 +PASSES,abadura +BUY_SHARE_LOG,bazik,10,SAL,Pool,40 +Autopasses,adik +BUY_SHARE_LOG,ola,10,G&F,Pool,40 +PASSES,abadura +BUY_SHARE_LOG,bazik,10,ACL,Pool,45 +Autopasses,adik +PASSES,ola +PASSES,abadura +PASSES,bazik + +END_SR,5 +PRICE_MOVES_LOG,GA,55,E6,60,E5 +SoldOut,GA,55,E6,60,E5 +PRICE_MOVES_LOG,W&A,40,B6,45,B5 +SoldOut,W&A,40,B6,45,B5 +Has,ACL,110 +Has,CoG,140 +Has,GA,10 +Has,G&F,88 +Has,SAL,243 +Has,W&A,1 +Has,adik,30 +Has,ola,23 +Has,abadura,17 +Has,bazik,3 +START_OR,5.1 + +CompanyOperates,GA,ola +LaysTileAt,GA,9,D6,W +CompanyRevenue,GA,170 +CompanyPaysOutFull,GA,170 +Payout,ola,85,5,10 +Payout,bazik,85,5,10 +PRICE_MOVES_LOG,GA,60,E5,70,F5 + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,8,J6,W +CompanyRevenue,ACL,280 +CompanyPaysOutFull,ACL,280 +Payout,ola,56,2,10 +Payout,bazik,28,1,10 +Payout,abadura,168,6,10 +Payout,ACL,28,1,10 +PRICE_MOVES_LOG,ACL,45,D7,50,E7 + +CompanyOperates,CoG,adik +LaysTileAt,CoG,455,D4,SW +CompanyRevenue,CoG,80 +CompanyPaysOutFull,CoG,80 +Payout,adik,40,5,10 +Payout,CoG,32,4,10 +PRICE_MOVES_LOG,CoG,45,D7,50,E7 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,8,B4,SW +CompanyRevenue,W&A,240 +CompanyPaysOutFull,W&A,240 +Payout,bazik,120,5,10 +Payout,adik,120,5,10 +PRICE_MOVES_LOG,W&A,45,B5,50,C5 + +CompanyOperates,G&F,abadura +LaysTileAt,G&F,9,G5,SW +CompanyRevenue,G&F,190 +CompanyPaysOutFull,G&F,190 +Payout,ola,38,2,10 +Payout,abadura,95,5,10 +Payout,G&F,38,2,10 +PRICE_MOVES_LOG,G&F,40,C7,45,D7 + +CompanyOperates,SAL,ola +LaysTileAt,SAL,459,G13,W +LAYS_TOKEN_ON,SAL,D4,100 +CompanyRevenue,SAL,170 +CompanyPaysOutFull,SAL,170 +Payout,ola,102,6,10 +Payout,bazik,17,1,10 +Payout,abadura,17,1,10 +Payout,SAL,17,1,10 +PRICE_MOVES_LOG,SAL,40,C7,45,D7 + +EndOfOperatingRound,5.1 +ORWorthIncrease,adik,5.1,210 +ORWorthIncrease,ola,5.1,381 +ORWorthIncrease,abadura,5.1,340 +ORWorthIncrease,bazik,5.1,335 +Has,ACL,138 +Has,CoG,172 +Has,GA,10 +Has,G&F,126 +Has,SAL,160 +Has,W&A,1 +Has,adik,190 +Has,ola,304 +Has,abadura,297 +Has,bazik,253 +START_OR,5.2 + +CompanyOperates,GA,ola +LaysTileAt,GA,58,G11,E +CompanyRevenue,GA,260 +CompanyWithholds,GA,260 +PRICE_MOVES_LOG,GA,70,F5,60,E5 + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,14,H4,NW +LAYS_TOKEN_ON,ACL,H4,40 +CompanyRevenue,ACL,290 +CompanyPaysOutFull,ACL,290 +Payout,ola,58,2,10 +Payout,bazik,29,1,10 +Payout,abadura,174,6,10 +Payout,ACL,29,1,10 +PRICE_MOVES_LOG,ACL,50,E7,55,E6 + +CompanyOperates,CoG,adik +LaysTileAt,CoG,14,F6,NW +CompanyRevenue,CoG,120 +CompanyPaysOutFull,CoG,120 +Payout,adik,60,5,10 +Payout,CoG,48,4,10 +PRICE_MOVES_LOG,CoG,50,E7,55,E6 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,63,C3,SW +CompanyRevenue,W&A,270 +CompanyPaysOutFull,W&A,270 +Payout,bazik,135,5,10 +Payout,adik,135,5,10 +PRICE_MOVES_LOG,W&A,50,C5,55,D5 + +CompanyOperates,G&F,abadura +LaysTileAt,G&F,63,H4,SW +CompanyRevenue,G&F,200 +CompanyPaysOutFull,G&F,200 +Payout,ola,40,2,10 +Payout,abadura,100,5,10 +Payout,G&F,40,2,10 +PRICE_MOVES_LOG,G&F,45,D7,50,E7 + +CompanyOperates,SAL,ola +LaysTileAtFor,SAL,9,H10,SW,20 +CompanyRevenue,SAL,180 +CompanyPaysOutFull,SAL,180 +Payout,abadura,18,1,10 +Payout,ola,108,6,10 +Payout,bazik,18,1,10 +Payout,SAL,18,1,10 +PRICE_MOVES_LOG,SAL,45,D7,50,E7 + +EndOfOperatingRound,5.2 +ORWorthIncrease,adik,5.2,245 +ORWorthIncrease,ola,5.2,206 +ORWorthIncrease,abadura,5.2,352 +ORWorthIncrease,bazik,5.2,167 +Has,ACL,127 +Has,CoG,220 +Has,GA,270 +Has,G&F,166 +Has,SAL,158 +Has,W&A,1 +Has,adik,385 +Has,ola,510 +Has,abadura,589 +Has,bazik,435 +START_OR,5.3 + +CompanyOperates,GA,ola +LaysTileAt,GA,63,I9,SW +LAYS_TOKEN_ON,GA,I9,100 +CompanyRevenue,GA,340 +CompanyPaysOutFull,GA,340 +Payout,ola,170,5,10 +Payout,bazik,170,5,10 +PRICE_MOVES_LOG,GA,60,E5,70,F5 + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,458,F6,W +CompanyRevenue,ACL,390 +CompanyPaysOutFull,ACL,390 +Payout,ola,78,2,10 +Payout,bazik,39,1,10 +Payout,abadura,234,6,10 +Payout,ACL,39,1,10 +PRICE_MOVES_LOG,ACL,55,E6,60,E5 + +CompanyOperates,CoG,adik +LaysTileAt,CoG,9,G7,NW +CompanyRevenue,CoG,150 +CompanyPaysOutFull,CoG,150 +Payout,adik,75,5,10 +Payout,CoG,60,4,10 +PRICE_MOVES_LOG,CoG,55,E6,60,E5 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,9,H8,NW +CompanyRevenue,W&A,410 +CompanyPaysOutFull,W&A,410 +Payout,bazik,205,5,10 +Payout,adik,205,5,10 +PRICE_MOVES_LOG,W&A,55,D5,60,E5 + +CompanyOperates,G&F,abadura +LaysTileAt,G&F,15,I11,SE +LAYS_TOKEN_ON,G&F,I9,40 +CompanyRevenue,G&F,230 +CompanyWithholds,G&F,230 +PRICE_MOVES_LOG,G&F,50,E7,45,D7 + +CompanyOperates,SAL,ola +LaysTileAt,SAL,456,D10,W +CompanyRevenue,SAL,230 +CompanyPaysOutFull,SAL,230 +Payout,ola,138,6,10 +Payout,bazik,23,1,10 +Payout,abadura,23,1,10 +Payout,SAL,23,1,10 +PRICE_MOVES_LOG,SAL,50,E7,55,E6 + +EndOfOperatingRound,5.3 +ORWorthIncrease,adik,5.3,330 +ORWorthIncrease,ola,5.3,466 +ORWorthIncrease,abadura,5.3,267 +ORWorthIncrease,bazik,5.3,522 +Has,ACL,166 +Has,CoG,280 +Has,GA,170 +Has,G&F,356 +Has,SAL,181 +Has,W&A,1 +Has,adik,665 +Has,ola,896 +Has,abadura,846 +Has,bazik,872 +StartStockRound,6 +HasPriority,adik +BUY_SHARE_LOG,adik,10,ACL,Pool,60 +BUY_SHARE_LOG,ola,10,G&F,Pool,45 +BUY_SHARE_LOG,abadura,10,G&F,Pool,45 +BUY_SHARE_LOG,bazik,10,SAL,Pool,55 +BUY_SHARE_LOG,adik,10,G&F,IPO,55 +BUY_SHARE_LOG,ola,10,CoG,Pool,60 +BUY_SHARE_LOG,abadura,10,SAL,IPO,55 +BUY_SHARE_LOG,bazik,10,CoG,Pool,60 +BUY_SHARE_LOG,adik,10,CoG,Pool,60 +BUY_SHARE_LOG,ola,10,CoG,Pool,60 +BUY_SHARE_LOG,abadura,10,CoG,IPO,70 +PASSES,bazik +Autopasses,adik +PASSES,ola +PASSES,abadura + +END_SR,6 +PRICE_MOVES_LOG,GA,70,F5,80,F4 +SoldOut,GA,70,F5,80,F4 +PRICE_MOVES_LOG,ACL,60,E5,70,E4 +SoldOut,ACL,60,E5,70,E4 +PRICE_MOVES_LOG,CoG,60,E5,70,E4 +SoldOut,CoG,60,E5,70,E4 +PRICE_MOVES_LOG,W&A,60,E5,70,E4 +SoldOut,W&A,60,E5,70,E4 +PRICE_MOVES_LOG,SAL,55,E6,60,E5 +SoldOut,SAL,55,E6,60,E5 +PRICE_MOVES_LOG,G&F,45,D7,50,D6 +SoldOut,G&F,45,D7,50,D6 +Has,ACL,166 +Has,CoG,280 +Has,GA,170 +Has,G&F,356 +Has,SAL,181 +Has,W&A,1 +Has,adik,490 +Has,ola,731 +Has,abadura,676 +Has,bazik,757 +START_OR,6.1 + +CompanyOperates,GA,ola +LAYS_TOKEN_ON,GA,F6,100 +CompanyRevenue,GA,360 +CompanyPaysOutFull,GA,360 +Payout,ola,180,5,10 +Payout,bazik,180,5,10 +PRICE_MOVES_LOG,GA,80,F4,90,G4 + +CompanyOperates,ACL,abadura +LaysTileAtFor,ACL,57,G3,NW,40 +CompanyRevenue,ACL,320 +CompanyPaysOutFull,ACL,320 +Payout,ola,64,2,10 +Payout,bazik,32,1,10 +Payout,abadura,192,6,10 +Payout,adik,32,1,10 +PRICE_MOVES_LOG,ACL,70,E4,80,F4 + +CompanyOperates,CoG,adik +LaysTileAt,CoG,24,E5,SE +CompanyRevenue,CoG,160 +CompanyPaysOutFull,CoG,160 +Payout,ola,32,2,10 +Payout,bazik,16,1,10 +Payout,abadura,16,1,10 +Payout,adik,96,6,10 +PRICE_MOVES_LOG,CoG,70,E4,80,F4 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,43,E5,SE +CompanyRevenue,W&A,300 +CompanyPaysOutFull,W&A,300 +Payout,bazik,150,5,10 +Payout,adik,150,5,10 +PRICE_MOVES_LOG,W&A,70,E4,80,F4 + +CompanyOperates,SAL,ola +CompanyRevenue,SAL,230 +CompanyWithholds,SAL,230 +PRICE_MOVES_LOG,SAL,60,E5,55,D5 +BuysTrain,SAL,3,GA,410 + +CompanyOperates,G&F,abadura +LaysTileAt,G&F,24,G5,SW +CompanyRevenue,G&F,210 +CompanyWithholds,G&F,210 +PRICE_MOVES_LOG,G&F,50,D6,45,C6 +BuysTrain,G&F,3,ACL,1 + +EndOfOperatingRound,6.1 +ORWorthIncrease,adik,6.1,393 +ORWorthIncrease,ola,6.1,321 +ORWorthIncrease,abadura,6.1,238 +ORWorthIncrease,bazik,6.1,488 +Has,ACL,127 +Has,CoG,280 +Has,GA,480 +Has,G&F,565 +Has,SAL,1 +Has,W&A,1 +Has,adik,768 +Has,ola,1007 +Has,abadura,884 +Has,bazik,1135 +START_OR,6.2 + +CompanyOperates,GA,ola +LaysTileAt,GA,24,H8,NW +CompanyRevenue,GA,190 +CompanyWithholds,GA,190 +PRICE_MOVES_LOG,GA,90,G4,80,F4 +BuysTrain,GA,6,IPO,630 +FirstTrainBought,6 +StartOfPhase,6 + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,8,F4,NE +CompanyRevenue,ACL,210 +CompanyPaysOutFull,ACL,210 +Payout,bazik,21,1,10 +Payout,ola,42,2,10 +Payout,abadura,126,6,10 +Payout,adik,21,1,10 +PRICE_MOVES_LOG,ACL,80,F4,90,G4 +BuysTrain,ACL,4,G&F,110 + +CompanyOperates,CoG,adik +LaysTileAt,CoG,19,H10,NE +CompanyRevenue,CoG,210 +CompanyPaysOutFull,CoG,210 +Payout,ola,42,2,10 +Payout,bazik,21,1,10 +Payout,abadura,21,1,10 +Payout,adik,126,6,10 +PRICE_MOVES_LOG,CoG,80,F4,90,G4 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,46,G5,SW +CompanyRevenue,W&A,220 +CompanyPaysOutFull,W&A,220 +Payout,bazik,110,5,10 +Payout,adik,110,5,10 +PRICE_MOVES_LOG,W&A,80,F4,90,G4 + +CompanyOperates,SAL,ola +LaysTileAt,SAL,45,H10,NE +CompanyRevenue,SAL,240 +CompanyPaysOutFull,SAL,240 +Payout,bazik,48,2,10 +Payout,ola,144,6,10 +Payout,abadura,48,2,10 +PRICE_MOVES_LOG,SAL,55,D5,60,E5 + +CompanyOperates,G&F,abadura +LaysTileAt,G&F,457,I11,W +CompanyDoesNotPayDividend,G&F +PRICE_MOVES_LOG,G&F,45,C6,40,B6 +BuysTrain,G&F,6,IPO,630 +All 6-trains are sold out, 8-trains now available + +EndOfOperatingRound,6.2 +ORWorthIncrease,adik,6.2,372 +ORWorthIncrease,ola,6.2,233 +ORWorthIncrease,abadura,6.2,245 +ORWorthIncrease,bazik,6.2,230 +Has,ACL,17 +Has,CoG,280 +Has,GA,40 +Has,G&F,45 +Has,SAL,1 +Has,W&A,1 +Has,adik,1025 +Has,ola,1235 +Has,abadura,1079 +Has,bazik,1335 +START_OR,6.3 + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,24,G7,SE +CompanyRevenue,ACL,360 +CompanyPaysOutFull,ACL,360 +Payout,bazik,36,1,10 +Payout,ola,72,2,10 +Payout,adik,36,1,10 +Payout,abadura,216,6,10 +PRICE_MOVES_LOG,ACL,90,G4,100,H4 + +CompanyOperates,CoG,adik +LaysTileAt,CoG,43,G7,SE +CompanyRevenue,CoG,220 +CompanyPaysOutFull,CoG,220 +Payout,ola,44,2,10 +Payout,bazik,22,1,10 +Payout,abadura,22,1,10 +Payout,adik,132,6,10 +PRICE_MOVES_LOG,CoG,90,G4,100,H4 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,9,H6,SW +CompanyRevenue,W&A,270 +CompanyPaysOutFull,W&A,270 +Payout,bazik,135,5,10 +Payout,adik,135,5,10 +PRICE_MOVES_LOG,W&A,90,G4,100,H4 + +CompanyOperates,GA,ola +LaysTileAt,GA,28,J6,W +CompanyRevenue,GA,350 +CompanyPaysOutFull,GA,350 +Payout,bazik,175,5,10 +Payout,ola,175,5,10 +PRICE_MOVES_LOG,GA,80,F4,90,G4 + +CompanyOperates,SAL,ola +CompanyRevenue,SAL,260 +CompanyPaysOutFull,SAL,260 +Payout,bazik,52,2,10 +Payout,ola,156,6,10 +Payout,abadura,52,2,10 +PRICE_MOVES_LOG,SAL,60,E5,70,F5 + +CompanyOperates,G&F,abadura +LaysTileAtFor,G&F,9,E3,W,40 +CompanyRevenue,G&F,310 +CompanyPaysOutFull,G&F,310 +Payout,ola,93,3,10 +Payout,adik,31,1,10 +Payout,abadura,186,6,10 +PRICE_MOVES_LOG,G&F,40,B6,45,C6 + +EndOfOperatingRound,6.3 +ORWorthIncrease,adik,6.3,459 +ORWorthIncrease,ola,6.3,705 +ORWorthIncrease,abadura,6.3,596 +ORWorthIncrease,bazik,6.3,560 +Has,ACL,17 +Has,CoG,280 +Has,GA,40 +Has,G&F,5 +Has,SAL,1 +Has,W&A,1 +Has,adik,1359 +Has,ola,1775 +Has,abadura,1555 +Has,bazik,1755 +StartStockRound,7 +HasPriority,bazik +SELL_SHARE_LOG,bazik,10,CoG,100 +PRICE_MOVES_LOG,CoG,100,H4,90,H5 +SELL_SHARE_LOG,bazik,10,SAL,70 +BUY_SHARE_LOG,adik,10,SAL,Pool,70 +SELL_SHARE_LOG,ola,10,CoG,90 +BUY_SHARE_LOG,abadura,10,CoG,Pool,90 +Autopasses,bazik +Autopasses,adik +Autopasses,ola +BUY_SHARE_LOG,abadura,10,CoG,Pool,90 +Autopasses,bazik +Autopasses,adik +Autopasses,ola +PASSES,abadura + +END_SR,7 +PRICE_MOVES_LOG,ACL,100,H4,110,H3 +SoldOut,ACL,100,H4,110,H3 +PRICE_MOVES_LOG,W&A,100,H4,110,H3 +SoldOut,W&A,100,H4,110,H3 +PRICE_MOVES_LOG,CoG,90,H5,100,H4 +SoldOut,CoG,90,H5,100,H4 +PRICE_MOVES_LOG,GA,90,G4,100,G3 +SoldOut,GA,90,G4,100,G3 +PRICE_MOVES_LOG,SAL,70,F5,80,F4 +SoldOut,SAL,70,F5,80,F4 +PRICE_MOVES_LOG,G&F,45,C6,50,C5 +SoldOut,G&F,45,C6,50,C5 +Has,ACL,17 +Has,CoG,280 +Has,GA,40 +Has,G&F,5 +Has,SAL,1 +Has,W&A,1 +Has,adik,1289 +Has,ola,1865 +Has,abadura,1375 +Has,bazik,1925 +START_OR,7.1 + +CompanyOperates,ACL,abadura +LaysTileAt,ACL,26,E3,W +CompanyRevenue,ACL,400 +CompanyPaysOutFull,ACL,400 +Payout,ola,80,2,10 +Payout,bazik,40,1,10 +Payout,abadura,240,6,10 +Payout,adik,40,1,10 +PRICE_MOVES_LOG,ACL,110,H3,120,I3 + +CompanyOperates,W&A,adik +LaysTileAt,W&A,24,I5,SW +CompanyRevenue,W&A,300 +CompanyPaysOutFull,W&A,300 +Payout,bazik,150,5,10 +Payout,adik,150,5,10 +PRICE_MOVES_LOG,W&A,110,H3,120,I3 + +CompanyOperates,CoG,adik +LaysTileAt,CoG,46,H8,NW +CompanyRevenue,CoG,300 +CompanyPaysOutFull,CoG,300 +Payout,ola,30,1,10 +Payout,abadura,90,3,10 +Payout,adik,180,6,10 +PRICE_MOVES_LOG,CoG,100,H4,110,I4 + +CompanyOperates,GA,ola +LaysTileAt,GA,47,I5,NW +CompanyRevenue,GA,360 +CompanyPaysOutFull,GA,360 +Payout,ola,180,5,10 +Payout,bazik,180,5,10 +BankIsBrokenReportText +PRICE_MOVES_LOG,GA,100,G3,110,H3 + +CompanyOperates,SAL,ola +CompanyRevenue,SAL,260 +CompanyPaysOutFull,SAL,260 +Payout,ola,156,6,10 +Payout,bazik,26,1,10 +Payout,abadura,52,2,10 +Payout,adik,26,1,10 +PRICE_MOVES_LOG,SAL,80,F4,90,G4 + +CompanyOperates,G&F,abadura commit 22b79e84bee3711a29aaf25333be26f85a62a5bf Author: Stefan Frey <ste...@we...> Date: Mon Oct 10 20:40:19 2011 +0200 updated shell script to manage releases diff --git a/make_rails_pkg.sh b/make_rails_pkg.sh index 0fc8d98..ee40072 100755 --- a/make_rails_pkg.sh +++ b/make_rails_pkg.sh @@ -7,8 +7,8 @@ if [ -z $1 ]; then exit fi -home_dir="/home/freystef" -pushd $home_dir/rails/git_repo/rails/ +home_dir="/home/freystef/rails/release" +pushd $home_dir/git_repo/rails/ tar cjpf $home_dir/rails-$1.tar.bz2 rails-$1 zip -9 -r $home_dir/rails-$1.zip rails-$1 |
From: Stefan F. <ste...@us...> - 2011-10-10 18:31:17
|
Tag 'v1.5.1' created by Stefan Frey <ste...@we...> at 2011-10-10 18:32 +0000 version 1.5.1 Changes since v1.5.0-7: --- 0 files changed --- |
From: Stefan F. <ste...@us...> - 2011-10-10 18:24:13
|
New branch 'rails1.5.x' available with the following commits: commit 7bb510a5c23359a049608a1728a448f6c0542a77 Author: Stefan Frey <ste...@we...> Date: Mon Oct 10 11:08:26 2011 +0200 prepared for release 1.5.1 commit df916e48fe154609c6d353b6df6958414236e2d9 Author: Stefan Frey <ste...@we...> Date: Sun Oct 9 17:40:34 2011 +0200 Changed Montgomery and Tallahassee to major scoring locations.(cherry picked from commit 48aa0f099ef6335a9ab7d60eca11e86f54b0ea6d) commit 6f901ef732f71fb13cd042275fd94f94a60d5519 Author: Erik Vos <eri...@xs...> Date: Fri Oct 7 14:41:44 2011 +0200 Fixed positioning bug of base tokens on corner-facing cities. This was a bug in ConvertXML.java. Replaced Tiles.xml: generic, 1825, 1830 and 1835 versions. Added "universal" XML formatting Perl script under tools.(cherry picked from commit 9fd64c124f5f348217c0273bf54250707b8b2dd1) commit d2acbe8c8e48ec2c44bbb9938efd649f4c37c307 Author: Erik Vos <eri...@xs...> Date: Tue Oct 4 19:07:55 2011 +0200 Fix bug that disallows selling a share after buying one in some cases. Relates to the "don't sell a just bought certificate" rule. The fix is to reverse the sequence of that and the pool size check.(cherry picked from commit 8fce0f10a5c8ebcb6528a991efcfc74abe45a686) commit 9d0c516010f600ba687f86f98317f31865e2a3b2 Author: Erik Vos <eri...@xs...> Date: Mon Oct 3 11:46:12 2011 +0200 Javadoc comments added to the LayBaseToken constructors.(cherry picked from commit 9502e7165a2752f013bd2793f49c774ac4a83acf) commit db1afc7ca1886761b1a4dfa711bf86e88e015000 Author: Stefan Frey <ste...@we...> Date: Fri Sep 30 22:57:50 2011 +0200 added test case for 1856 token bug (cherry picked from commit ff1134c23f7a2d1438504c9b6e87cd93dbc5e226) commit 2a32b83d8d626990dfbe716310ef7caccb18cac5 Author: Erik Vos <eri...@xs...> Date: Fri Sep 30 13:54:12 2011 +0200 Fix to allow laying THB home token if track exists. By Bill Rosgen(cherry picked from commit 4ebc9085c07dccba67fc7f5b361b61bfbfb486d7) commit c6b312e64ccf17209aa965ce504579c4da953170 Author: Stefan Frey <ste...@we...> Date: Fri Sep 23 08:09:31 2011 +0200 Prepared for release 1.5(cherry picked from commit eb7868e9d88a51b11c39f56283617dcf9acec2aa) |
From: Stefan F. <ste...@us...> - 2011-10-09 15:38:35
|
data/18GA/Map.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit 48aa0f099ef6335a9ab7d60eca11e86f54b0ea6d Author: Stefan Frey <ste...@we...> Date: Sun Oct 9 17:40:34 2011 +0200 Changed Montgomery and Tallahassee to major scoring locations. diff --git a/data/18GA/Map.xml b/data/18GA/Map.xml index fede992..1fc279d 100644 --- a/data/18GA/Map.xml +++ b/data/18GA/Map.xml @@ -25,7 +25,10 @@ <Hex name="D8" tile="0"/> <Hex name="D10" tile="-3008" city="Augusta"/> - <Hex name="E1" tile="-1143" orientation="1" value="30,40" city="Montgomery"/> + <Hex name="E1" tile="-1143" orientation="1" value="30,40" city="Montgomery"> + <Access score="major"/> + </Hex> + <IfOption name="Variant" value="Basegame"> <Hex name="E3" tile="0" cost="40"/> </IfOption> @@ -123,7 +126,9 @@ </Hex> <Hex name="I11" tile="-3008" city="Brunswick"/> - <Hex name="J4" tile="-1143" value="20,50" city="Tallahassee"/> + <Hex name="J4" tile="-1143" value="20,50" city="Tallahassee"> + <Access score="major"/> + </Hex> <Hex name="J6" tile="0"/> <Hex name="J8" tile="0"/> <Hex name="J10" tile="0"> |
From: Erik V. <ev...@us...> - 2011-10-07 12:44:18
|
data/1825/Tiles.xml | 2 data/1830/Tiles.xml | 60 ++++++------ data/1835/Tiles.xml | 34 +++---- tiles/Tiles.xml | 210 ++++++++++++++++++++++----------------------- tools/ConvertTilesXML.java | 98 ++++++++++----------- tools/formatxml.pl | 23 ++++ 6 files changed, 227 insertions(+), 200 deletions(-) New commits: commit 9fd64c124f5f348217c0273bf54250707b8b2dd1 Author: Erik Vos <eri...@xs...> Date: Fri Oct 7 14:41:44 2011 +0200 Fixed positioning bug of base tokens on corner-facing cities. This was a bug in ConvertXML.java. Replaced Tiles.xml: generic, 1825, 1830 and 1835 versions. Added "universal" XML formatting Perl script under tools. diff --git a/data/1825/Tiles.xml b/data/1825/Tiles.xml index 0c98c87..dcb52ce 100644 --- a/data/1825/Tiles.xml +++ b/data/1825/Tiles.xml @@ -396,4 +396,4 @@ <Track from="city2" gauge="normal" to="side5"/> <Track from="city1" gauge="normal" to="side0"/> </Tile> -</Tiles> \ No newline at end of file +</Tiles> diff --git a/data/1830/Tiles.xml b/data/1830/Tiles.xml index be5762d..c082f65 100644 --- a/data/1830/Tiles.xml +++ b/data/1830/Tiles.xml @@ -9,7 +9,7 @@ <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"/> + <Station id="city1" position="252" type="Town" value="10"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city1" gauge="normal" to="side3"/> </Tile> @@ -51,7 +51,7 @@ <Track from="side4" gauge="normal" to="side1"/> </Tile> <Tile colour="fixed" id="-102" name="-102"> - <Station id="city1" position="351" slots="1" type="City" value="20"/> + <Station id="city1" position="251" slots="1" type="City" value="20"/> <Track from="city1" gauge="normal" to="side1"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side4"/> @@ -88,12 +88,11 @@ <Tile colour="red" id="-908" name="OM wide curve"> <Track from="side0" gauge="normal" to="side2"/> </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="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="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"/> @@ -106,7 +105,7 @@ <Track from="side3" gauge="normal" to="side4"/> </Tile> <Tile colour="fixed" id="-30003" name="Altoon intern"> - <Station id="city1" position="052" slots="1" type="City" value="10"/> + <Station id="city1" position="552" slots="1" type="City" value="10"/> <Track from="side4" gauge="normal" to="side1"/> <Track from="side4" gauge="normal" to="side2"/> <Track from="side1" gauge="normal" to="side2"/> @@ -128,7 +127,7 @@ <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="fixed" id="-30007" name="Reading intern"> - <Station id="city1" position="052" slots="1" type="City" value="10"/> + <Station id="city1" position="552" slots="1" type="City" value="10"/> <Track from="side4" gauge="normal" to="side1"/> <Track from="side4" gauge="normal" to="side2"/> <Track from="side1" gauge="normal" to="side3"/> @@ -155,7 +154,7 @@ <Track from="city2" gauge="normal" to="side2"/> </Tile> <Tile colour="yellow" id="3" name="3"> - <Station id="city1" position="452" type="Town" value="10"/> + <Station id="city1" position="352" type="Town" value="10"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side4"/> </Tile> @@ -278,16 +277,16 @@ <Track from="city1" gauge="normal" to="side3"/> </Tile> <Tile colour="green" id="54" name="54"> - <Station id="city1" position="452" slots="1" type="City" value="60"/> - <Station id="city2" position="052" slots="1" type="City" value="60"/> + <Station id="city1" position="352" slots="1" type="City" value="60"/> + <Station id="city2" position="552" slots="1" type="City" value="60"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side4"/> <Track from="city2" gauge="normal" to="side5"/> <Track from="city2" gauge="normal" to="side0"/> </Tile> <Tile colour="green" id="59" name="59"> - <Station id="city1" position="152" slots="1" type="City" value="40"/> - <Station id="city2" position="452" slots="1" type="City" value="40"/> + <Station id="city1" position="052" slots="1" type="City" value="40"/> + <Station id="city2" position="352" slots="1" type="City" value="40"/> <Track from="city1" gauge="normal" to="side1"/> <Track from="city2" gauge="normal" to="side3"/> </Tile> @@ -389,7 +388,7 @@ </Tile> <Tile colour="brown" id="64" name="64"> <Station id="city1" position="401" slots="1" type="City" value="50"/> - <Station id="city2" position="152" slots="1" type="City" value="50"/> + <Station id="city2" position="052" slots="1" type="City" value="50"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side5"/> <Track from="city2" gauge="normal" to="side1"/> @@ -397,7 +396,7 @@ </Tile> <Tile colour="brown" id="65" name="65"> <Station id="city1" position="501" slots="1" type="City" value="50"/> - <Station id="city2" position="352" slots="1" type="City" value="50"/> + <Station id="city2" position="252" slots="1" type="City" value="50"/> <Track from="city1" gauge="normal" to="side4"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city2" gauge="normal" to="side2"/> @@ -405,7 +404,7 @@ </Tile> <Tile colour="brown" id="66" name="66"> <Station id="city1" position="002" slots="1" type="City" value="50"/> - <Station id="city2" position="552" slots="1" type="City" value="50"/> + <Station id="city2" position="452" slots="1" type="City" value="50"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city2" gauge="normal" to="side4"/> @@ -433,26 +432,27 @@ <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"/> + <Tile colour="brown" id="1717" name="G17"> + <Station id="city1" position="0" type="Town" value="20"/> <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"/> </Tile> - <Tile colour="brown" id="1717" name="G17"> - <Station id="city1" position="0" type="Town" value="20"/> + <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="gray" id="368" name="368"> + <Station id="city1" position="0" slots="2" type="City" value="70"/> + <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="side3"/> <Track from="city1" gauge="normal" to="side4"/> </Tile> <Tile colour="brown" id="448" name="1889 dc K brown"> @@ -462,4 +462,4 @@ <Track from="city1" gauge="normal" to="side2"/> <Track from="city1" gauge="normal" to="side3"/> </Tile> -</Tiles> \ No newline at end of file +</Tiles> diff --git a/data/1835/Tiles.xml b/data/1835/Tiles.xml index dd53c67..fb95273 100644 --- a/data/1835/Tiles.xml +++ b/data/1835/Tiles.xml @@ -9,7 +9,7 @@ <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"/> + <Station id="city1" position="252" type="Town" value="10"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city1" gauge="normal" to="side3"/> </Tile> @@ -55,7 +55,7 @@ <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="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"/> @@ -69,7 +69,7 @@ </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="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"/> @@ -84,7 +84,7 @@ <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"/> + <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"/> @@ -114,8 +114,8 @@ <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"/> + <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"/> @@ -145,7 +145,7 @@ <Track from="city2" gauge="normal" to="side2"/> </Tile> <Tile colour="yellow" id="3" name="3"> - <Station id="city1" position="452" type="Town" value="10"/> + <Station id="city1" position="352" type="Town" value="10"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side4"/> </Tile> @@ -350,39 +350,39 @@ </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"/> + <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="352" slots="1" type="City" value="30"/> - <Station id="city2" position="552" slots="1" type="City" value="30"/> + <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="252" slots="1" type="City" value="30"/> - <Station id="city2" position="552" slots="1" type="City" value="30"/> + <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="251" slots="1" type="City" value="30"/> - <Station id="city2" position="552" slots="1" type="City" value="30"/> + <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="351" slots="1" type="City" value="30"/> - <Station id="city2" position="052" slots="1" type="City" value="30"/> + <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"/> @@ -508,4 +508,4 @@ <Track from="city1" gauge="normal" to="side4"/> <Track from="city1" gauge="normal" to="side5"/> </Tile> -</Tiles> \ No newline at end of file +</Tiles> diff --git a/tiles/Tiles.xml b/tiles/Tiles.xml index 0e12a27..fc210d3 100644 --- a/tiles/Tiles.xml +++ b/tiles/Tiles.xml @@ -25,7 +25,7 @@ <Track from="city1" gauge="normal" to="side2"/> </Tile> <Tile colour="fixed" id="-102" name="-102"> - <Station id="city1" position="351" slots="1" type="City" value="20"/> + <Station id="city1" position="251" slots="1" type="City" value="20"/> <Track from="city1" gauge="normal" to="side1"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side4"/> @@ -79,7 +79,7 @@ <Track from="city2" gauge="normal" to="side2"/> </Tile> <Tile colour="yellow" id="3" name="3"> - <Station id="city1" position="452" type="Town" value="10"/> + <Station id="city1" position="352" type="Town" value="10"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side4"/> </Tile> @@ -118,8 +118,8 @@ <Track from="side3" gauge="normal" to="side0"/> </Tile> <Tile colour="green" id="10" name="10"> - <Station id="city1" position="052" slots="1" type="City" value="30"/> - <Station id="city2" position="352" slots="1" type="City" value="30"/> + <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="side5"/> <Track from="city2" gauge="normal" to="side2"/> </Tile> @@ -261,8 +261,8 @@ <Track from="city3" gauge="normal" to="side4"/> </Tile> <Tile colour="brown" id="34" name="34"> - <Station id="city1" position="452" slots="1" type="City" value="50"/> - <Station id="city2" position="152" slots="1" type="City" value="50"/> + <Station id="city1" position="352" slots="1" type="City" value="50"/> + <Station id="city2" position="052" slots="1" type="City" value="50"/> <Station id="city3" position="502" slots="1" type="City" value="50"/> <Track from="city2" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side4"/> @@ -286,8 +286,8 @@ <Track from="city2" gauge="normal" to="side5"/> </Tile> <Tile colour="brown" id="37" name="37"> - <Station id="city1" position="152" slots="1" type="City" value="40"/> - <Station id="city2" position="452" slots="1" type="City" value="40"/> + <Station id="city1" position="052" slots="1" type="City" value="40"/> + <Station id="city2" position="352" slots="1" type="City" value="40"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city2" gauge="normal" to="side5"/> <Track from="side2" gauge="normal" to="side5"/> @@ -378,8 +378,8 @@ </Tile> <Tile colour="gray" id="50" name="50"> <Station id="city1" position="502" slots="1" type="City" value="70"/> - <Station id="city2" position="152" slots="1" type="City" value="70"/> - <Station id="city3" position="452" slots="1" type="City" value="70"/> + <Station id="city2" position="052" slots="1" type="City" value="70"/> + <Station id="city3" position="352" slots="1" type="City" value="70"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city1" gauge="normal" to="side5"/> <Track from="city2" gauge="normal" to="side0"/> @@ -416,8 +416,8 @@ <Track from="city1" gauge="normal" to="side4"/> </Tile> <Tile colour="green" id="1052" name="52"> - <Station id="city1" position="252" slots="1" type="City" value="40"/> - <Station id="city2" position="552" slots="1" type="City" value="40"/> + <Station id="city1" position="152" slots="1" type="City" value="40"/> + <Station id="city2" position="452" slots="1" type="City" value="40"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city2" gauge="normal" to="side4"/> </Tile> @@ -434,8 +434,8 @@ <Track from="city1" gauge="normal" to="side4"/> </Tile> <Tile colour="green" id="54" name="54"> - <Station id="city1" position="452" slots="1" type="City" value="60"/> - <Station id="city2" position="052" slots="1" type="City" value="60"/> + <Station id="city1" position="352" slots="1" type="City" value="60"/> + <Station id="city2" position="552" slots="1" type="City" value="60"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side4"/> <Track from="city2" gauge="normal" to="side5"/> @@ -468,8 +468,8 @@ <Track from="city1" gauge="normal" to="side3"/> </Tile> <Tile colour="green" id="59" name="59"> - <Station id="city1" position="152" slots="1" type="City" value="40"/> - <Station id="city2" position="452" slots="1" type="City" value="40"/> + <Station id="city1" position="052" slots="1" type="City" value="40"/> + <Station id="city2" position="352" slots="1" type="City" value="40"/> <Track from="city1" gauge="normal" to="side1"/> <Track from="city2" gauge="normal" to="side3"/> </Tile> @@ -538,7 +538,7 @@ </Tile> <Tile colour="brown" id="64" name="64"> <Station id="city1" position="401" slots="1" type="City" value="50"/> - <Station id="city2" position="152" slots="1" type="City" value="50"/> + <Station id="city2" position="052" slots="1" type="City" value="50"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side5"/> <Track from="city2" gauge="normal" to="side1"/> @@ -546,7 +546,7 @@ </Tile> <Tile colour="brown" id="65" name="65"> <Station id="city1" position="501" slots="1" type="City" value="50"/> - <Station id="city2" position="352" slots="1" type="City" value="50"/> + <Station id="city2" position="252" slots="1" type="City" value="50"/> <Track from="city1" gauge="normal" to="side4"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city2" gauge="normal" to="side2"/> @@ -554,7 +554,7 @@ </Tile> <Tile colour="brown" id="66" name="66"> <Station id="city1" position="002" slots="1" type="City" value="50"/> - <Station id="city2" position="552" slots="1" type="City" value="50"/> + <Station id="city2" position="452" slots="1" type="City" value="50"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city2" gauge="normal" to="side4"/> @@ -617,7 +617,7 @@ <Track from="side5" gauge="normal" to="side3"/> </Tile> <Tile colour="yellow" id="72" name="72"> - <Station id="city1" position="352" type="Town" value="10"/> + <Station id="city1" position="252" type="Town" value="10"/> <Track from="city1" gauge="narrow" to="side2"/> <Track from="city1" gauge="narrow" to="side3"/> </Tile> @@ -1144,7 +1144,7 @@ <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="green" id="2116" name="116"> - <Station id="city1" position="452" type="Town" value="20"/> + <Station id="city1" position="352" type="Town" value="20"/> <Track from="side5" gauge="normal" to="side2"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side4"/> @@ -1168,8 +1168,8 @@ <Track from="side2" gauge="normal" to="side5"/> </Tile> <Tile colour="green" id="120" name="120"> - <Station id="city1" position="152" slots="1" type="City" value="60"/> - <Station id="city2" position="352" slots="1" type="City" value="60"/> + <Station id="city1" position="052" slots="1" type="City" value="60"/> + <Station id="city2" position="252" slots="1" type="City" value="60"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side1"/> <Track from="city2" gauge="normal" to="side2"/> @@ -1236,14 +1236,14 @@ <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="yellow" id="128" name="128"> - <Station id="city1" position="252" slots="1" type="City" value="30"/> - <Station id="city2" position="552" slots="1" type="City" value="30"/> + <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="side2"/> <Track from="city2" gauge="normal" to="side4"/> </Tile> <Tile colour="green" id="129" name="129"> <Station id="city1" position="002" slots="2" type="City" value="50"/> - <Station id="city2" position="352" slots="1" type="City" value="50"/> + <Station id="city2" position="252" slots="1" type="City" value="50"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side1"/> <Track from="city2" gauge="normal" to="side2"/> @@ -1506,39 +1506,39 @@ </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"/> + <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="352" slots="1" type="City" value="30"/> - <Station id="city2" position="552" slots="1" type="City" value="30"/> + <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="252" slots="1" type="City" value="30"/> - <Station id="city2" position="552" slots="1" type="City" value="30"/> + <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="251" slots="1" type="City" value="30"/> - <Station id="city2" position="552" slots="1" type="City" value="30"/> + <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="351" slots="1" type="City" value="30"/> - <Station id="city2" position="052" slots="1" type="City" value="30"/> + <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"/> @@ -1624,8 +1624,8 @@ </Tile> <Tile colour="green" id="1221" name="221"> <Station id="city1" position="202" slots="1" type="City" value="60"/> - <Station id="city2" position="152" slots="1" type="City" value="60"/> - <Station id="city3" position="552" slots="1" type="City" value="60"/> + <Station id="city2" position="052" slots="1" type="City" value="60"/> + <Station id="city3" position="452" slots="1" type="City" value="60"/> <Track from="city2" gauge="normal" to="side1"/> <Track from="city2" gauge="normal" to="side0"/> <Track from="city3" gauge="normal" to="side5"/> @@ -1633,9 +1633,9 @@ <Track from="city1" gauge="normal" to="side2"/> </Tile> <Tile colour="brown" id="262" name="262"> - <Station id="city1" position="052" slots="2" type="City" value="80"/> - <Station id="city2" position="252" slots="2" type="City" value="80"/> - <Station id="city3" position="452" slots="1" type="City" value="80"/> + <Station id="city1" position="552" slots="2" type="City" value="80"/> + <Station id="city2" position="152" slots="2" type="City" value="80"/> + <Station id="city3" position="352" slots="1" type="City" value="80"/> <Track from="city1" gauge="normal" to="side5"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city2" gauge="normal" to="side1"/> @@ -1643,34 +1643,34 @@ <Track from="city3" gauge="normal" to="side3"/> </Tile> <Tile colour="yellow" id="301" name="301"> - <Station id="city1" position="152" slots="1" type="City" value="50"/> - <Station id="city2" position="352" slots="1" type="City" value="50"/> - <Station id="city3" position="552" slots="1" type="City" value="50"/> + <Station id="city1" position="052" slots="1" type="City" value="50"/> + <Station id="city2" position="252" slots="1" type="City" value="50"/> + <Station id="city3" position="452" slots="1" type="City" value="50"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city2" gauge="normal" to="side2"/> <Track from="city3" gauge="normal" to="side4"/> <Track from="city3" gauge="normal" to="side5"/> </Tile> <Tile colour="yellow" id="302" name="302"> - <Station id="city1" position="052" slots="1" type="City" value="50"/> - <Station id="city2" position="252" slots="1" type="City" value="50"/> - <Station id="city3" position="452" slots="1" type="City" value="50"/> + <Station id="city1" position="552" slots="1" type="City" value="50"/> + <Station id="city2" position="152" slots="1" type="City" value="50"/> + <Station id="city3" position="352" slots="1" type="City" value="50"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side5"/> <Track from="city2" gauge="normal" to="side2"/> <Track from="city3" gauge="normal" to="side4"/> </Tile> <Tile colour="green" id="311" name="311"> - <Station id="city1" position="152" slots="1" type="City" value="60"/> - <Station id="city2" position="451" slots="2" type="City" value="60"/> + <Station id="city1" position="052" slots="1" type="City" value="60"/> + <Station id="city2" position="351" slots="2" type="City" value="60"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city2" gauge="normal" to="side2"/> <Track from="city2" gauge="normal" to="side4"/> <Track from="city2" gauge="normal" to="side5"/> </Tile> <Tile colour="green" id="312" name="312"> - <Station id="city1" position="151" slots="2" type="City" value="60"/> - <Station id="city2" position="452" slots="1" type="City" value="60"/> + <Station id="city1" position="051" slots="2" type="City" value="60"/> + <Station id="city2" position="352" slots="1" type="City" value="60"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city1" gauge="normal" to="side5"/> @@ -1792,8 +1792,8 @@ <Track from="city1" gauge="normal" to="side3"/> </Tile> <Tile colour="brown" id="362" name="362"> - <Station id="city1" position="251" slots="2" type="City" value="70"/> - <Station id="city2" position="552" slots="1" type="City" value="70"/> + <Station id="city1" position="151" slots="2" type="City" value="70"/> + <Station id="city2" position="452" slots="1" type="City" value="70"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side1"/> <Track from="city2" gauge="normal" to="side5"/> @@ -2394,7 +2394,7 @@ </Tile> <Tile colour="yellow" id="630" name="630"> <Station id="city1" position="101" type="Town" value="10"/> - <Station id="city2" position="552" type="Town" value="10"/> + <Station id="city2" position="452" type="Town" value="10"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city2" gauge="normal" to="side4"/> @@ -2402,23 +2402,23 @@ </Tile> <Tile colour="yellow" id="631" name="631"> <Station id="city1" position="301" type="Town" value="10"/> - <Station id="city2" position="052" type="Town" value="10"/> + <Station id="city2" position="552" 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="side5"/> </Tile> <Tile colour="yellow" id="632" name="632"> - <Station id="city1" position="252" type="Town" value="10"/> - <Station id="city2" position="452" type="Town" value="10"/> + <Station id="city1" position="152" type="Town" value="10"/> + <Station id="city2" position="352" type="Town" value="10"/> <Track from="city1" gauge="normal" to="side1"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city2" gauge="normal" to="side3"/> <Track from="city2" gauge="normal" to="side4"/> </Tile> <Tile colour="yellow" id="633" name="633"> - <Station id="city1" position="152" type="Town" value="10"/> - <Station id="city2" position="452" type="Town" value="10"/> + <Station id="city1" position="052" type="Town" value="10"/> + <Station id="city2" position="352" type="Town" value="10"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side1"/> <Track from="city2" gauge="normal" to="side3"/> @@ -2874,8 +2874,8 @@ <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="brown" id="984" name="984"> - <Station id="city1" position="352" slots="1" type="City" value="50"/> - <Station id="city2" position="552" slots="1" type="City" value="50"/> + <Station id="city1" position="252" slots="1" type="City" value="50"/> + <Station id="city2" position="452" slots="1" type="City" value="50"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city2" gauge="normal" to="side4"/> @@ -2953,7 +2953,7 @@ <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="fixed" id="-3" name="MF 3"> - <Station id="city1" position="352" type="Town" value="10"/> + <Station id="city1" position="252" type="Town" value="10"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city1" gauge="normal" to="side3"/> </Tile> @@ -3074,7 +3074,7 @@ <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="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"/> @@ -3088,7 +3088,7 @@ </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="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"/> @@ -3103,7 +3103,7 @@ <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"/> + <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"/> @@ -3156,8 +3156,8 @@ <Track from="side4" 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"/> + <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"/> @@ -3258,17 +3258,17 @@ <Track from="city1" gauge="normal" to="side1"/> </Tile> <Tile colour="green" id="580" name="580"> - <Station id="city1" position="152" slots="1" type="City" value="60"/> - <Station id="city2" position="352" slots="1" type="City" value="60"/> + <Station id="city1" position="052" slots="1" type="City" value="60"/> + <Station id="city2" position="252" slots="1" type="City" value="60"/> <Track from="city1" gauge="normal" to="side1"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city2" gauge="normal" to="side2"/> <Track from="city2" gauge="normal" to="side3"/> </Tile> <Tile colour="green" id="581" name="581"> - <Station id="city1" position="252" slots="1" type="City" value="50"/> - <Station id="city2" position="452" slots="1" type="City" value="50"/> - <Station id="city3" position="052" slots="1" type="City" value="50"/> + <Station id="city1" position="152" slots="1" type="City" value="50"/> + <Station id="city2" position="352" slots="1" type="City" value="50"/> + <Station id="city3" position="552" slots="1" type="City" value="50"/> <Track from="city3" gauge="normal" to="side0"/> <Track from="city3" gauge="normal" to="side5"/> <Track from="city1" gauge="normal" to="side1"/> @@ -3331,7 +3331,7 @@ <Track from="city1" gauge="normal" to="side1"/> </Tile> <Tile colour="fixed" id="-89030" name="1889 B3"> - <Station id="city1" position="352" type="Town" value="20"/> + <Station id="city1" position="252" type="Town" value="20"/> <Track from="city1" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side2"/> </Tile> @@ -3349,7 +3349,7 @@ <Track from="city1" gauge="normal" to="side2"/> </Tile> <Tile colour="fixed" id="-89031" name="1889 G14"> - <Station id="city1" position="152" type="Town" value="20"/> + <Station id="city1" position="052" type="Town" value="20"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side1"/> </Tile> @@ -3478,8 +3478,8 @@ <Track from="side0" gauge="normal" to="city2"/> </Tile> <Tile colour="fixed" id="-25008" name="Barrow"> - <Station id="city1" position="052" slots="1" type="City" value="10"/> - <Station id="city2" position="252" type="Town" value="10"/> + <Station id="city1" position="552" slots="1" type="City" value="10"/> + <Station id="city2" position="152" type="Town" value="10"/> <Track from="side5" gauge="normal" to="city1"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city2" gauge="normal" to="side1"/> @@ -3492,8 +3492,8 @@ <Track from="city2" gauge="normal" to="side2"/> </Tile> <Tile colour="fixed" id="-25010" name="Doncaster"> - <Station id="city1" position="451" slots="1" type="City" value="20"/> - <Station id="city2" position="151" slots="1" type="City" value="20"/> + <Station id="city1" position="351" slots="1" type="City" value="20"/> + <Station id="city2" position="051" 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="side2"/> @@ -3517,18 +3517,18 @@ <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="fixed" id="-25014" name="Maryport"> - <Station id="city1" position="151" slots="1" type="City" value="10"/> + <Station id="city1" position="051" slots="1" type="City" value="10"/> <Track from="city1" gauge="normal" to="side2"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side1"/> </Tile> <Tile colour="fixed" id="-25015" name="Milford H."> - <Station id="city1" position="152" slots="1" type="City" value="10"/> + <Station id="city1" position="052" slots="1" type="City" value="10"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side1"/> </Tile> <Tile colour="fixed" id="-25016" name="Highbridge"> - <Station id="city1" position="251" slots="1" type="City" value="10"/> + <Station id="city1" position="151" slots="1" type="City" value="10"/> <Track from="side0" gauge="normal" to="side3"/> <Track from="city1" gauge="normal" to="side0"/> <Track from="city1" gauge="normal" to="side1"/> @@ -3594,13 +3594,13 @@ <Track from="side3" gauge="normal" to="side4"/> </Tile> <Tile colour="fixed" id="-30002" name="Altoona"> - <Station id="city1" position="052" slots="1" type="City" value="10"/> + <Station id="city1" position="552" slots="1" type="City" value="10"/> <Track from="side4" gauge="normal" to="side1"/> <Track from="side4" gauge="normal" to="side2"/> <Track from="side2" gauge="normal" to="side1"/> </Tile> <Tile colour="fixed" id="-30003" name="Altoon intern"> - <Station id="city1" position="052" slots="1" type="City" value="10"/> + <Station id="city1" position="552" slots="1" type="City" value="10"/> <Track from="side4" gauge="normal" to="side1"/> <Track from="side4" gauge="normal" to="side2"/> <Track from="side1" gauge="normal" to="side2"/> @@ -3745,9 +3745,9 @@ <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="white" id="-30" name="3 cities"> - <Station id="city1" position="052" slots="1" type="City"/> - <Station id="city2" position="252" slots="1" type="City"/> - <Station id="city3" position="452" slots="1" type="City"/> + <Station id="city1" position="552" slots="1" type="City"/> + <Station id="city2" position="152" slots="1" type="City"/> + <Station id="city3" position="352" slots="1" type="City"/> </Tile> <Tile colour="fixed" id="-10001" name="TNLouisville"> <Station id="city1" position="501" slots="1" type="City" value="30"/> @@ -3757,7 +3757,7 @@ </Tile> <Tile colour="yellow" id="235" name="235"> <Station id="city1" position="502" slots="1" type="City" value="20"/> - <Station id="city2" position="352" slots="1" type="City" value="20"/> + <Station id="city2" position="252" slots="1" type="City" value="20"/> <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="yellow" id="8858" name="8858"> @@ -3770,7 +3770,7 @@ </Tile> <Tile colour="yellow" id="8854" name="8854"> <Station id="city1" position="0" type="Town" value="20"/> - <Station id="city2" position="252" type="Town" value="20"/> + <Station id="city2" position="152" type="Town" value="20"/> <Track from="side2" gauge="normal" to="city2"/> <Track from="side2" gauge="normal" to="side1"/> <Track from="side3" gauge="normal" to="city1"/> @@ -3837,16 +3837,16 @@ <Track from="side2" gauge="normal" to="city2"/> </Tile> <Tile colour="green" id="8861" name="8861"> - <Station id="city1" position="452" slots="1" type="City" value="40"/> - <Station id="city2" position="152" slots="1" type="City" value="40"/> + <Station id="city1" position="352" slots="1" type="City" value="40"/> + <Station id="city2" position="052" slots="1" type="City" value="40"/> <Track from="side4" gauge="normal" to="city1"/> <Track from="side3" gauge="normal" to="city1"/> <Track from="side0" gauge="normal" to="city2"/> <Track from="side1" gauge="normal" to="city2"/> </Tile> <Tile colour="green" id="8862" name="8862"> - <Station id="city1" position="452" slots="1" type="City" value="40"/> - <Station id="city2" position="052" slots="1" type="City" value="40"/> + <Station id="city1" position="352" slots="1" type="City" value="40"/> + <Station id="city2" position="552" slots="1" type="City" value="40"/> <Track from="side0" gauge="normal" to="city2"/> <Track from="side5" gauge="normal" to="city2"/> <Track from="side4" gauge="normal" to="city1"/> @@ -3854,7 +3854,7 @@ </Tile> <Tile colour="green" id="8863" name="8863"> <Station id="city1" position="0" slots="1" type="City" value="40"/> - <Station id="city2" position="552" slots="1" type="City" value="40"/> + <Station id="city2" position="452" slots="1" type="City" value="40"/> <Track from="side0" gauge="normal" to="city1"/> <Track from="side3" gauge="normal" to="city1"/> <Track from="side4" gauge="normal" to="city2"/> @@ -3862,15 +3862,15 @@ </Tile> <Tile colour="green" id="8864" name="8864"> <Station id="city1" position="308" slots="1" type="City" value="40"/> - <Station id="city2" position="152" slots="1" type="City" value="40"/> + <Station id="city2" position="052" slots="1" type="City" value="40"/> <Track from="side0" gauge="normal" to="city2"/> <Track from="city2" gauge="normal" to="side1"/> <Track from="side3" gauge="normal" to="city1"/> <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="green" id="8865" name="8865"> - <Station id="city1" position="252" slots="1" type="City" value="40"/> - <Station id="city2" position="551" slots="1" type="City" value="40"/> + <Station id="city1" position="152" slots="1" type="City" value="40"/> + <Station id="city2" position="451" slots="1" type="City" value="40"/> <Track from="side1" gauge="normal" to="city1"/> <Track from="side5" gauge="normal" to="city2"/> <Track from="city2" gauge="normal" to="side3"/> @@ -3987,7 +3987,7 @@ <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="yellow" id="8850" name="8850"> - <Station id="city1" position="352" type="Town" value="20"/> + <Station id="city1" position="252" type="Town" value="20"/> <Track from="side3" gauge="normal" to="city1"/> <Track from="city1" gauge="normal" to="side2"/> </Tile> @@ -4016,14 +4016,14 @@ <Track from="city4" gauge="normal" to="side5"/> </Tile> <Tile colour="white" id="-80003" name="Shanghai"> - <Station id="city1" position="052" slots="1" type="City"/> + <Station id="city1" position="552" slots="1" type="City"/> </Tile> <Tile colour="white" id="-80002" name="2 Medium Cities"> <Station id="city1" position="002" slots="1" type="City"/> <Station id="city2" position="302" slots="1" type="City"/> </Tile> <Tile colour="white" id="-80001" name="Medium City"> - <Station id="city1" position="052" slots="1" type="City"/> + <Station id="city1" position="552" slots="1" type="City"/> </Tile> <Tile colour="gray" id="8888" name="Beijing"> <Station id="city1" position="403" slots="1" type="City" value="80"/> @@ -4071,7 +4071,7 @@ <Track from="city1" gauge="normal" to="side5"/> </Tile> <Tile colour="fixed" id="-503" name="-503"> - <Station id="city1" position="452" type="Town"/> + <Station id="city1" position="352" type="Town"/> <Track from="side3" gauge="normal" to="city1"/> <Track from="city1" gauge="normal" to="side4"/> </Tile> @@ -4129,14 +4129,14 @@ <Track from="city1" gauge="normal" to="side4"/> </Tile> <Tile colour="fixed" id="-30006" name="Reading"> - <Station id="city1" position="052" slots="1" type="City" value="10"/> + <Station id="city1" position="552" slots="1" type="City" value="10"/> <Track from="side4" gauge="normal" to="side1"/> <Track from="side4" gauge="normal" to="side2"/> <Track from="side1" gauge="normal" to="side3"/> <Track from="side3" gauge="normal" to="side2"/> </Tile> <Tile colour="fixed" id="-30007" name="Reading intern"> - <Station id="city1" position="052" slots="1" type="City" value="10"/> + <Station id="city1" position="552" slots="1" type="City" value="10"/> <Track from="side4" gauge="normal" to="side1"/> <Track from="side4" gauge="normal" to="side2"/> <Track from="side1" gauge="normal" to="side3"/> @@ -4147,8 +4147,8 @@ <Track from="side2" gauge="normal" to="city1"/> </Tile> <Tile colour="yellow" id="-10004" name="Stockholm"> - <Station id="city1" position="052" slots="1" type="City" value="30"/> - <Station id="city2" position="452" slots="1" type="City" value="30"/> + <Station id="city1" position="552" slots="1" type="City" value="30"/> + <Station id="city2" position="352" slots="1" type="City" value="30"/> <Track from="city1" gauge="normal" to="side5"/> <Track from="city2" gauge="normal" to="side4"/> </Tile> @@ -4208,4 +4208,6 @@ <Track from="city1" gauge="normal" to="side1"/> <Track from="city1" gauge="normal" to="side3"/> </Tile> -</Tiles> \ No newline at end of file +</Tiles> + + diff --git a/tools/ConvertTilesXML.java b/tools/ConvertTilesXML.java index 7014d68..35f0c8f 100644 --- a/tools/ConvertTilesXML.java +++ b/tools/ConvertTilesXML.java @@ -1,19 +1,21 @@ package tools; -import java.io.*; +import java.io.File; +import java.io.FileOutputStream; import java.util.*; -import java.util.regex.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; -import javax.xml.parsers.*; -import javax.xml.transform.*; -import javax.xml.transform.dom.*; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.w3c.dom.*; import rails.common.parser.ConfigurationException; import rails.util.Util; -import tools.XmlUtils; /** * Convert an XML tile dictionary, as created by Marco Rocci's Tile Designer, to @@ -82,41 +84,41 @@ public class ConvertTilesXML { cityMap = new HashMap<String, String>(); cityMap.put("tpCenter", "0"); cityMap.put("tp1SideA", "001"); - cityMap.put("tp1CornerA", "051"); + cityMap.put("tp1CornerB", "051"); cityMap.put("tp1SideB", "101"); - cityMap.put("tp1CornerB", "151"); + cityMap.put("tp1CornerC", "151"); cityMap.put("tp1SideC", "201"); - cityMap.put("tp1CornerC", "251"); + cityMap.put("tp1CornerD", "251"); cityMap.put("tp1SideD", "301"); - cityMap.put("tp1CornerD", "351"); + cityMap.put("tp1CornerE", "351"); cityMap.put("tp1SideE", "401"); - cityMap.put("tp1CornerE", "451"); + cityMap.put("tp1CornerF", "451"); cityMap.put("tp1SideF", "501"); - cityMap.put("tp1CornerF", "551"); + cityMap.put("tp1CornerA", "551"); cityMap.put("tp2SideA", "002"); - cityMap.put("tp2CornerA", "052"); + cityMap.put("tp2CornerB", "052"); cityMap.put("tp2SideB", "102"); - cityMap.put("tp2CornerB", "152"); + cityMap.put("tp2CornerC", "152"); cityMap.put("tp2SideC", "202"); - cityMap.put("tp2CornerC", "252"); + cityMap.put("tp2CornerD", "252"); cityMap.put("tp2SideD", "302"); - cityMap.put("tp2CornerD", "352"); + cityMap.put("tp2CornerE", "352"); cityMap.put("tp2SideE", "402"); - cityMap.put("tp2CornerE", "452"); + cityMap.put("tp2CornerF", "452"); cityMap.put("tp2SideF", "502"); - cityMap.put("tp2CornerF", "552"); + cityMap.put("tp2CornerA", "552"); cityMap.put("tp3SideA", "003"); - cityMap.put("tp3CornerA", "053"); + cityMap.put("tp3CornerB", "053"); cityMap.put("tp3SideB", "103"); - cityMap.put("tp3CornerB", "153"); + cityMap.put("tp3CornerC", "153"); cityMap.put("tp3SideC", "203"); - cityMap.put("tp3CornerC", "253"); + cityMap.put("tp3CornerD", "253"); cityMap.put("tp3SideD", "303"); - cityMap.put("tp3CornerD", "353"); + cityMap.put("tp3CornerE", "353"); cityMap.put("tp3SideE", "403"); - cityMap.put("tp3CornerE", "453"); + cityMap.put("tp3CornerF", "453"); cityMap.put("tp3SideF", "503"); - cityMap.put("tp3CornerF", "553"); + cityMap.put("tp3CornerA", "553"); cityMap.put("tpCurve1RightA", "006"); cityMap.put("tpCurve2RightA", "007"); cityMap.put("tpCurve2LeftA", "008"); @@ -164,11 +166,11 @@ public class ConvertTilesXML { System.out.println("Input file path: "+(new File(inputFilePath).getAbsolutePath())); System.out.println("Output file path: "+(new File(outputFilePath).getAbsolutePath())); Element inputTopElement = - XmlUtils.findElementInFile(inputFilePath, "tiles"); + XmlUtils.findElementInFile(inputFilePath, "tiles"); try { DocumentBuilderFactory factory = - DocumentBuilderFactory.newInstance(); + DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); DOMImplementation impl = builder.getDOMImplementation(); outputDoc = impl.createDocument(null, "Tiles", null); @@ -187,7 +189,7 @@ public class ConvertTilesXML { } private void convertXML(Element inputElement, Document outputDoc) - throws ConfigurationException { + throws ConfigurationException { NodeList children = inputElement.getElementsByTagName("tile"); for (int i = 0; i < children.getLength(); i++) { @@ -200,10 +202,10 @@ public class ConvertTilesXML { } private void convertTile(Element inputTile, Element outputTile) - throws ConfigurationException { + throws ConfigurationException { String id = - inputTile.getElementsByTagName("ID").item(0).getFirstChild().getNodeValue(); + inputTile.getElementsByTagName("ID").item(0).getFirstChild().getNodeValue(); System.out.println(id); tileNo = id; outputTile.setAttribute("id", id); @@ -215,7 +217,7 @@ public class ConvertTilesXML { } String level = - inputTile.getElementsByTagName("level").item(0).getFirstChild().getNodeValue(); + inputTile.getElementsByTagName("level").item(0).getFirstChild().getNodeValue(); colour = colourMap.get(level); if (colour == null) { throw new ConfigurationException("Unknown level: " + level); @@ -224,7 +226,7 @@ public class ConvertTilesXML { } String name = - inputTile.getElementsByTagName("name").item(0).getFirstChild().getNodeValue(); + inputTile.getElementsByTagName("name").item(0).getFirstChild().getNodeValue(); Matcher m = namePattern.matcher(name); if (m.matches()) { outputTile.setAttribute("name", m.group(1)); @@ -244,7 +246,7 @@ public class ConvertTilesXML { outputJunction = null; Element junctions = - (Element) inputTile.getElementsByTagName("junctions").item(0); + (Element) inputTile.getElementsByTagName("junctions").item(0); NodeList children = junctions.getElementsByTagName("junction"); for (int i = 0; i < children.getLength(); i++) { Element inputJunction = (Element) children.item(i); @@ -258,7 +260,7 @@ public class ConvertTilesXML { resolvedTrack = new HashMap<Element, String>(); Element connections = - (Element) inputTile.getElementsByTagName("connections").item(0); + (Element) inputTile.getElementsByTagName("connections").item(0); children = connections.getElementsByTagName("connection"); for (int i = 0; i < children.getLength(); i++) { Element inputConnection = (Element) children.item(i); @@ -274,19 +276,19 @@ public class ConvertTilesXML { Element[] ends = list.toArray(new Element[0]); if (ends.length <= 1) { throw new ConfigurationException("Loose end " + ends[0] - + " in tile " + tileNo); + + " in tile " + tileNo); } for (int i = 1; i < ends.length; i++) { end1 = resolvedTrack.get(ends[i]); if (end1 == null) { throw new ConfigurationException("Loose end " + ends[i] - + " in tile " + tileNo); + + " in tile " + tileNo); } for (int j = 0; j < i; j++) { end2 = resolvedTrack.get(ends[j]); if (end2 == null) { throw new ConfigurationException("Loose end " + ends[j] - + " in tile " + tileNo); + + " in tile " + tileNo); } Element outputConnection = outputDoc.createElement("Track"); outputConnection.setAttribute("gauge", @@ -307,7 +309,7 @@ public class ConvertTilesXML { outputJunction.setAttribute("id", cityId); String type = - inputJunction.getElementsByTagName("junType").item(0).getFirstChild().getNodeValue(); + inputJunction.getElementsByTagName("junType").item(0).getFirstChild().getNodeValue(); String[] station = stationMap.get(type); if (station == null) { @@ -333,16 +335,16 @@ public class ConvertTilesXML { // Junction revenue Element revenue = - (Element) inputJunction.getElementsByTagName("revenue").item(0); + (Element) inputJunction.getElementsByTagName("revenue").item(0); if (revenue != null) { String value = - revenue.getElementsByTagName("value").item(0).getFirstChild().getNodeValue(); + revenue.getElementsByTagName("value").item(0).getFirstChild().getNodeValue(); outputJunction.setAttribute("value", value); } // Junction position String junctionPos = - inputJunction.getElementsByTagName("position").item(0).getFirstChild().getNodeValue(); + inputJunction.getElementsByTagName("position").item(0).getFirstChild().getNodeValue(); junctionPosition.put(junctionPos, cityId); String jName = cityMap.get(junctionPos); if (Util.hasValue(jName)) { @@ -353,10 +355,10 @@ public class ConvertTilesXML { } private void convertConnection(Element inputConnection, Element outputTile) - throws ConfigurationException { + throws ConfigurationException { String type = - inputConnection.getElementsByTagName("conType").item(0).getFirstChild().getNodeValue(); + inputConnection.getElementsByTagName("conType").item(0).getFirstChild().getNodeValue(); String gauge = gaugeMap.get(type); Element outputConnection; if (gauge == null) { @@ -371,11 +373,11 @@ public class ConvertTilesXML { outputJunction.setAttribute("type", "pass"); boolean fromOK = - convertTrackEnd(inputConnection, outputConnection, "position1", - "from"); + convertTrackEnd(inputConnection, outputConnection, "position1", + "from"); boolean toOK = - convertTrackEnd(inputConnection, outputConnection, "position2", - "to"); + convertTrackEnd(inputConnection, outputConnection, "position2", + "to"); if (fromOK && toOK) outputTile.appendChild(outputConnection); @@ -383,10 +385,10 @@ public class ConvertTilesXML { private boolean convertTrackEnd(Element inputConnection, Element outputConnection, String inputName, String outputName) - throws ConfigurationException { + throws ConfigurationException { String position = - inputConnection.getElementsByTagName(inputName).item(0).getFirstChild().getNodeValue(); + inputConnection.getElementsByTagName(inputName).item(0).getFirstChild().getNodeValue(); String end = sidesMap.get(position); if (end == null) end = junctionPosition.get(position); diff --git a/tools/formatxml.pl b/tools/formatxml.pl new file mode 100644 index 0000000..1dcecc0 --- /dev/null +++ b/tools/formatxml.pl @@ -0,0 +1,23 @@ +# Formats XML files using tabs and newlines only. +# +# In its current form, this script is (or should be) platform- and machine-independent. +# Please leave it so! +# +$ARGV[0] or die "Usage: perl formatxml.pl <filepath>...\n"; +for $filename (@ARGV) { + open (IN,$filename) or die "Cannot open file '$filename' for reading: $!\n"; + $xml = join ('', <IN>); + close IN; + + @elements = split /(?<=>)\s*(?=<)/, $xml; + + open (OUT, ">$filename") or die "Cannot open file '$filename' for writing: $!\n"; + binmode OUT; + $indent = 0; + for (@elements) { + $indent-- if /^<\//; + print OUT "\t" x $indent, $_, "\n"; + $indent++ unless /^<\?/ || /^<\// || /\/\s*>$/; + } + close OUT; +} |
From: Erik V. <ev...@us...> - 2011-10-04 17:34:57
|
rails/common/GuiDef.java | 7 rails/game/GameManager.java | 14 rails/game/StockRound.java | 67 ++-- rails/ui/swing/GameUIManager.java | 160 +++++---- rails/ui/swing/StartRoundWindow.java | 182 +++++------ rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java | 7 6 files changed, 234 insertions(+), 203 deletions(-) New commits: commit 49c5d96547d2904ccfc803dc9018b56233b39537 Author: Erik Vos <eri...@xs...> Date: Tue Oct 4 19:34:19 2011 +0200 Allow game-specific StartRoundWindow classes. Added empty StartRoundWindow_1880 class. diff --git a/rails/common/GuiDef.java b/rails/common/GuiDef.java index 570db32..5d75906 100644 --- a/rails/common/GuiDef.java +++ b/rails/common/GuiDef.java @@ -9,7 +9,8 @@ public class GuiDef { OR_UI_MANAGER ("rails.ui.swing.ORUIManager"), STATUS_WINDOW ("rails.ui.swing.StatusWindow"), GAME_STATUS ("rails.ui.swing.GameStatus"), - OR_WINDOW ("rails.ui.swing.ORWindow"); + OR_WINDOW ("rails.ui.swing.ORWindow"), + START_ROUND_WINDOW ("rails.ui.swing.StartRoundWindow"); private String defaultClassName; @@ -54,5 +55,5 @@ public class GuiDef { MAP, STOCK_MARKET } - - } + +} diff --git a/rails/game/GameManager.java b/rails/game/GameManager.java index eac056d..c691147 100644 --- a/rails/game/GameManager.java +++ b/rails/game/GameManager.java @@ -46,6 +46,7 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { protected String gameStatusClassName = GuiDef.getDefaultClassName(GuiDef.ClassName.GAME_STATUS); protected String statusWindowClassName = GuiDef.getDefaultClassName(GuiDef.ClassName.STATUS_WINDOW); protected String orWindowClassName = GuiDef.getDefaultClassName(GuiDef.ClassName.OR_WINDOW); + protected String startRoundWindowClassName = GuiDef.getDefaultClassName(GuiDef.ClassName.START_ROUND_WINDOW); protected PlayerManager playerManager; protected CompanyManagerI companyManager; @@ -489,6 +490,16 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { // Check instantiatability (not sure if this belongs here) canClassBeInstantiated (orWindowClassName); } + + // StartRoundWindow class + Tag startRoundWindowTag = guiClassesTag.getChild("StartRoundWindow"); + if (startRoundWindowTag != null) { + startRoundWindowClassName = + startRoundWindowTag.getAttributeAsString("class", + startRoundWindowClassName); + // Check instantiatability (not sure if this belongs here) + canClassBeInstantiated (startRoundWindowClassName); + } } } @@ -1640,6 +1651,9 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { case STATUS_WINDOW: return statusWindowClassName; + case START_ROUND_WINDOW: + return startRoundWindowClassName; + case GAME_STATUS: return gameStatusClassName; diff --git a/rails/ui/swing/GameUIManager.java b/rails/ui/swing/GameUIManager.java index bee4214..07b5726 100644 --- a/rails/ui/swing/GameUIManager.java +++ b/rails/ui/swing/GameUIManager.java @@ -13,15 +13,12 @@ import javax.swing.plaf.FontUIResource; import org.apache.log4j.Logger; -import rails.common.DisplayBuffer; -import rails.common.GuiDef; -import rails.common.GuiHints; -import rails.common.LocalText; +import rails.common.*; import rails.common.parser.Config; import rails.game.*; import rails.game.action.*; import rails.ui.swing.elements.*; -import rails.util.*; +import rails.util.Util; /** * This class is called by main() and loads all of the UI components @@ -69,7 +66,7 @@ public class GameUIManager implements DialogOwner { protected String providedName = null; protected SimpleDateFormat saveDateTimeFormat; protected File lastFile, lastDirectory; - + protected boolean autoSaveLoadInitialized = false; protected int autoSaveLoadStatus = 0; protected int autoSaveLoadPollingInterval = 30; @@ -78,7 +75,7 @@ public class GameUIManager implements DialogOwner { protected String lastSavedFilenameFilepath; protected String lastSavedFilename = ""; protected String localPlayerName = ""; - + protected boolean gameWasLoaded = false; protected WindowSettings windowSettings; @@ -92,7 +89,7 @@ public class GameUIManager implements DialogOwner { protected boolean previousResult; protected static Logger log = - Logger.getLogger(GameUIManager.class.getPackage().getName()); + Logger.getLogger(GameUIManager.class.getPackage().getName()); public GameUIManager() { @@ -201,11 +198,11 @@ public class GameUIManager implements DialogOwner { Class.forName(statusWindowClassName).asSubclass(StatusWindow.class); statusWindow = statusWindowClass.newInstance(); -// GraphicsEnvironment ge = GraphicsEnvironment. -// getLocalGraphicsEnvironment(); -// GraphicsDevice[] gs = ge.getScreenDevices(); -// log.debug("ScreenDevices = " + Arrays.toString(gs)); -// statusWindow = statusWindowClass.getConstructor(GraphicsConfiguration.class).newInstance(gs[1].getDefaultConfiguration()); + // GraphicsEnvironment ge = GraphicsEnvironment. + // getLocalGraphicsEnvironment(); + // GraphicsDevice[] gs = ge.getScreenDevices(); + // log.debug("ScreenDevices = " + Arrays.toString(gs)); + // statusWindow = statusWindowClass.getConstructor(GraphicsConfiguration.class).newInstance(gs[1].getDefaultConfiguration()); statusWindow.init(this); } catch (Exception e) { @@ -245,7 +242,7 @@ public class GameUIManager implements DialogOwner { result = previousResult; } else { - + Player oldPlayer = getCurrentPlayer(); boolean wasMyTurn = oldPlayer.getName().equals(localPlayerName); @@ -268,7 +265,7 @@ public class GameUIManager implements DialogOwner { (JFrame) activeWindow, LocalText.getText("Message"), LocalText.getText("YourTurn", localPlayerName)), - null); + null); log.info ("Resuming turn as "+localPlayerName); } else { log.info(newPlayer.getName()+" now has the turn"); @@ -303,13 +300,13 @@ public class GameUIManager implements DialogOwner { if (!result) return false; - return activeWindow.processImmediateAction(); + return activeWindow.processImmediateAction(); } protected boolean processOnServer (PossibleAction action) { - + boolean result; - + action.setActed(); action.setPlayerName(getCurrentPlayer().getName()); @@ -329,7 +326,7 @@ public class GameUIManager implements DialogOwner { return result; } - + public boolean displayServerMessage() { String[] message = DisplayBuffer.get(); if (message != null) { @@ -337,7 +334,7 @@ public class GameUIManager implements DialogOwner { (JFrame) activeWindow, LocalText.getText("Message"), "<html>" + Util.joinWithDelimiter(message, "<br>")), - null); + null); return true; } return false; @@ -354,7 +351,7 @@ public class GameUIManager implements DialogOwner { currentRoundName = currentRound.toString(); log.debug("Current round=" + currentRoundName + ", previous round=" - + previousRoundName); + + previousRoundName); currentRoundType = uiHints.getCurrentRoundType(); @@ -394,7 +391,18 @@ public class GameUIManager implements DialogOwner { log.debug("UI entering Start Round "+currentRoundName); startRound = (StartRound) currentRound; if (startRoundWindow == null) { - startRoundWindow = new StartRoundWindow(startRound, this); + //startRoundWindow = new StartRoundWindow(startRound, this); + String startRoundWindowClassName = getClassName(GuiDef.ClassName.START_ROUND_WINDOW); + try { + Class<? extends StartRoundWindow> startRoundWindowClass = + Class.forName(startRoundWindowClassName).asSubclass(StartRoundWindow.class); + startRoundWindow = startRoundWindowClass.newInstance(); + startRoundWindow.init(startRound, this); + } catch (Exception e) { + log.fatal("Cannot instantiate class " + startRoundWindowClassName, e); + System.exit(1); + + } } } else if (StockRound.class.isAssignableFrom(currentRoundType)) { @@ -427,13 +435,13 @@ public class GameUIManager implements DialogOwner { switch (hint.getType()) { case STOCK_MARKET: boolean stockChartVisibilityHint = hint.getVisibility() - || configuredStockChartVisibility; + || configuredStockChartVisibility; if (stockChartVisibilityHint != previousStockChartVisibilityHint) { stockChart.setVisible(stockChartVisibilityHint); previousStockChartVisibilityHint = stockChartVisibilityHint; } if (hint.getVisibility()) stockChart.toFront(); - break; + break; case STATUS: boolean statusWindowVisibilityHint = hint.getVisibility(); if (statusWindowVisibilityHint != previousStatusWindowVisibilityHint) { @@ -496,7 +504,7 @@ public class GameUIManager implements DialogOwner { startRoundWindow.setSRPlayerTurn(startRound.getCurrentPlayerIndex()); } else if (StatusWindow.class.isAssignableFrom(activeWindow.getClass())) { -// } else { + // } else { log.debug("Updating Stock (status) round window"); statusWindow.updateStatus(myTurn); @@ -523,7 +531,7 @@ public class GameUIManager implements DialogOwner { List<TrainI> trains = dt.getOwnedTrains(); int size = trains.size() + (dt.isForced() ? 0 : 1); List<String> trainOptions = - new ArrayList<String>(size); + new ArrayList<String>(size); String[] options = new String[size]; String prompt = null; @@ -548,16 +556,16 @@ public class GameUIManager implements DialogOwner { c.getName() ); String discardedTrainName = - (String) JOptionPane.showInputDialog(orWindow, - prompt, - LocalText.getText("WhichTrainToDiscard"), - JOptionPane.QUESTION_MESSAGE, null, - options, options[0]); + (String) JOptionPane.showInputDialog(orWindow, + prompt, + LocalText.getText("WhichTrainToDiscard"), + JOptionPane.QUESTION_MESSAGE, null, + options, options[0]); if (discardedTrainName != null) { int index = trainOptions.indexOf(discardedTrainName); if (index >= offset) { TrainI discardedTrain = - trains.get(trainOptions.indexOf(discardedTrainName)-offset); + trains.get(trainOptions.indexOf(discardedTrainName)-offset); dt.setDiscardedTrain(discardedTrain); } @@ -613,7 +621,7 @@ public class GameUIManager implements DialogOwner { orWindow.toFront(); CheckBoxDialog dialog = new CheckBoxDialog(this, - orWindow, + orWindow, LocalText.getText("ExchangeTokens"), prompt, options.toArray(new String[0])); @@ -682,22 +690,22 @@ public class GameUIManager implements DialogOwner { for (int index=0; index < options.length; index++) { if (exchanged[index]) { action.getTokensToExchange().get(index).setSelected(true); - } + } } } else if (currentDialog instanceof RadioButtonDialog - && currentDialogAction instanceof RepayLoans) { + && currentDialogAction instanceof RepayLoans) { + + RadioButtonDialog dialog = (RadioButtonDialog) currentDialog; + RepayLoans action = (RepayLoans) currentDialogAction; + int selected = dialog.getSelectedOption(); + action.setNumberTaken(action.getMinNumber() + selected); - RadioButtonDialog dialog = (RadioButtonDialog) currentDialog; - RepayLoans action = (RepayLoans) currentDialogAction; - int selected = dialog.getSelectedOption(); - action.setNumberTaken(action.getMinNumber() + selected); - } else if (currentDialog instanceof MessageDialog) { // Nothing to do currentDialogAction = null; // Should already be null - + } else if (currentDialog instanceof AutoSaveLoadDialog) { - + autoSaveLoadGame2 ((AutoSaveLoadDialog)currentDialog); } else { @@ -708,22 +716,22 @@ public class GameUIManager implements DialogOwner { /*if (currentDialogAction != null)*/ processAction(currentDialogAction); } - + protected void autoSave (String newPlayer) { lastSavedFilename = savePrefix + "_" - + saveDateTimeFormat.format(new Date()) + "_" - + newPlayer + "." - + saveExtension; + + saveDateTimeFormat.format(new Date()) + "_" + + newPlayer + "." + + saveExtension; GameAction saveAction = new GameAction(GameAction.SAVE); saveAction.setFilepath(saveDirectory + "/" + lastSavedFilename); log.debug("Autosaving to "+lastSavedFilename); processOnServer (saveAction); - + saveAutoSavedFilename (lastSavedFilename); } - + protected void saveAutoSavedFilename (String lastSavedFilename) { - + try { File f = new File (lastSavedFilenameFilepath); PrintWriter out = new PrintWriter (new FileWriter (f)); @@ -732,9 +740,9 @@ public class GameUIManager implements DialogOwner { } catch (IOException e) { log.error ("Exception whilst autosaving file '"+lastSavedFilenameFilepath+"'", e); } - + } - + protected boolean pollingIsOn () { return autoLoadPoller != null && autoLoadPoller.getStatus() == AutoLoadPoller.ON; } @@ -833,10 +841,10 @@ public class GameUIManager implements DialogOwner { currentSuffix = saveSuffix; } filename = - saveDirectory + "/" + savePrefix + "_" - + saveDateTimeFormat.format(new Date()) + "_" - + currentSuffix + "." - + saveExtension; + saveDirectory + "/" + savePrefix + "_" + + saveDateTimeFormat.format(new Date()) + "_" + + currentSuffix + "." + + saveExtension; } File proposedFile = new File(filename); @@ -858,7 +866,7 @@ public class GameUIManager implements DialogOwner { && proposedParts[1].equals(selectedParts[1])) { savePrefix = selectedParts[0]; } else { - // Otherwise, remember and keep using the whole filename. + // Otherwise, remember and keep using the whole filename. providedName = filepath; } } @@ -883,9 +891,9 @@ public class GameUIManager implements DialogOwner { } } - + public void autoSaveLoadGame () { - + localPlayerName = System.getProperty("local.player.name"); if (!Util.hasValue(localPlayerName)) { localPlayerName = Config.get("local.player.name"); @@ -895,21 +903,21 @@ public class GameUIManager implements DialogOwner { return; } log.debug("Polling local player name: "+localPlayerName); - + AutoSaveLoadDialog dialog = new AutoSaveLoadDialog (this, - autoSaveLoadStatus, - autoSaveLoadPollingInterval); + autoSaveLoadStatus, + autoSaveLoadPollingInterval); setCurrentDialog(dialog, null); } - + public void autoSaveLoadGame2 (AutoSaveLoadDialog dialog) { - + autoSaveLoadStatus = dialog.getStatus(); autoSaveLoadPollingInterval = dialog.getInterval(); - + if (autoLoadPoller == null && autoSaveLoadStatus > 0) { - - autoLoadPoller = new AutoLoadPoller (this, saveDirectory, savePrefix, + + autoLoadPoller = new AutoLoadPoller (this, saveDirectory, savePrefix, localPlayerName, autoSaveLoadStatus, autoSaveLoadPollingInterval); autoLoadPoller.start(); } else if (autoLoadPoller != null) { @@ -918,26 +926,26 @@ public class GameUIManager implements DialogOwner { } log.debug("AutoSaveLoad parameters: status="+autoSaveLoadStatus +" interval="+autoSaveLoadPollingInterval); - + if (gameWasLoaded) { autoSaveLoadInitialized = true; lastSavedFilenameFilepath = saveDirectory + "/" + savePrefix + ".last_rails"; saveAutoSavedFilename (lastSavedFilename); } - + if (autoLoadPoller != null && autoSaveLoadStatus != AutoLoadPoller.OFF && !autoSaveLoadInitialized && !gameWasLoaded) { - + /* The first time (only) we use the normal save process, * so the player can select a directory, and change - * the prefix if so desired. + * the prefix if so desired. */ GameAction saveAction = new GameAction(GameAction.SAVE); saveSuffix = localPlayerName; saveGame (saveAction); File lastSavedFile = new File (saveAction.getFilepath()); saveDirectory = lastSavedFile.getParentFile().getPath(); - + /* Now also save the "last saved file" file */ String lastSavedFilename = lastSavedFile.getName(); lastSavedFilenameFilepath = saveDirectory + "/" + savePrefix + ".last_rails"; @@ -948,13 +956,13 @@ public class GameUIManager implements DialogOwner { out.close(); autoSaveLoadInitialized = true; } catch (IOException e) { - log.error ("Exception whilst creating .last_rails file '" + log.error ("Exception whilst creating .last_rails file '" + lastSavedFilenameFilepath + "'", e); } } - + myTurn = getCurrentPlayer().getName().equals(localPlayerName); - + if (!myTurn) { // Start autoload polling autoLoadPoller.setActive(autoSaveLoadStatus == AutoLoadPoller.ON && !myTurn); @@ -967,7 +975,7 @@ public class GameUIManager implements DialogOwner { } } - + /* public boolean isMyTurn() { return myTurn; @@ -976,7 +984,7 @@ public class GameUIManager implements DialogOwner { public void setMyTurn(boolean myTurn) { this.myTurn = myTurn; } - */ + */ public void setSaveDirectory(String saveDirectory) { this.saveDirectory = saveDirectory; diff --git a/rails/ui/swing/StartRoundWindow.java b/rails/ui/swing/StartRoundWindow.java index 28fd2c5..d27294b 100644 --- a/rails/ui/swing/StartRoundWindow.java +++ b/rails/ui/swing/StartRoundWindow.java @@ -20,7 +20,7 @@ import rails.ui.swing.elements.*; * This displays the Auction Window */ public class StartRoundWindow extends JFrame implements ActionListener, - KeyListener, ActionPerformer { +KeyListener, ActionPerformer { private static final long serialVersionUID = 1L; // Gap sizes between screen cells, in pixels @@ -36,10 +36,10 @@ public class StartRoundWindow extends JFrame implements ActionListener, private static final Color soldColour = new Color (128, 128, 128); private static final Color defaultColour = Color.BLACK; - private final JPanel statusPanel; - private final JPanel buttonPanel; + private JPanel statusPanel; + private JPanel buttonPanel; - private final GridBagLayout gb; + private GridBagLayout gb; private GridBagConstraints gbc; // Grid elements per function @@ -64,22 +64,22 @@ public class StartRoundWindow extends JFrame implements ActionListener, private Caption[] lowerPlayerCaption; private ActionButton bidButton; - private final ActionButton buyButton; + private ActionButton buyButton; private JSpinner bidAmount; private SpinnerNumberModel spinnerModel; - private final ActionButton passButton; + private ActionButton passButton; private ImageIcon infoIcon = null; - private final int np; // Number of players - private final int ni; // Number of start items - private final Player[] players; - private final StartItem[] items; - private final StartItemAction[] actionableItems; - private final StartPacket packet; - private final int[] crossIndex; - private final StartRound round; - private final GameUIManager gameUIManager; + private int np; // Number of players + private int ni; // Number of start items + private Player[] players; + private StartItem[] items; + private StartItemAction[] actionableItems; + private StartPacket packet; + private int[] crossIndex; + private StartRound round; + private GameUIManager gameUIManager; private StartItem si; private JComponent f; @@ -87,29 +87,29 @@ public class StartRoundWindow extends JFrame implements ActionListener, /** @see StartItem.statusName */ public static final String[] itemStatusTextKeys = new String[] { "Status_Unavailable", "Status_Biddable", "Status_Buyable", - "Status_Selectable", "Status_Auctioned", - "Status_NeedingSharePrice", "Status_Sold" }; + "Status_Selectable", "Status_Auctioned", + "Status_NeedingSharePrice", "Status_Sold" }; // Current state private int playerIndex = -1; private final PossibleActions possibleActions = - PossibleActions.getInstance(); + PossibleActions.getInstance(); private PossibleAction immediateAction = null; private final ButtonGroup itemGroup = new ButtonGroup(); private ClickField dummyButton; // To be selected if none else is. - private final boolean includeBidding; - private final boolean showBasePrices; + private boolean includeBidding; + private boolean showBasePrices; -// private boolean repacked = false; + // private boolean repacked = false; protected static Logger log = - Logger.getLogger(StartRoundWindow.class.getPackage().getName()); + Logger.getLogger(StartRoundWindow.class.getPackage().getName()); - public StartRoundWindow(StartRound round, GameUIManager parent) { - super(); + public void init(StartRound round, GameUIManager parent) { + //super(); this.round = round; includeBidding = round.hasBidding(); showBasePrices = round.hasBasePrices(); @@ -139,8 +139,8 @@ public class StartRoundWindow extends JFrame implements ActionListener, buttonPanel.add(bidButton); spinnerModel = - new SpinnerNumberModel(new Integer(999), new Integer(0), - null, new Integer(1)); + new SpinnerNumberModel(new Integer(999), new Integer(0), + null, new Integer(1)); bidAmount = new JSpinner(spinnerModel); bidAmount.setPreferredSize(new Dimension(50, 28)); bidAmount.setEnabled(false); @@ -284,9 +284,9 @@ public class StartRoundWindow extends JFrame implements ActionListener, f = itemName[i] = new Caption(si.getName()); addField(f, itemNameXOffset, itemNameYOffset + i, 1, 1, WIDE_RIGHT); f = - itemNameButton[i] = - new ClickField(si.getName(), "", "", this, - itemGroup); + itemNameButton[i] = + new ClickField(si.getName(), "", "", this, + itemGroup); addField(f, itemNameXOffset, itemNameYOffset + i, 1, 1, WIDE_RIGHT); // Prevent row height resizing after every buy action itemName[i].setPreferredSize(itemNameButton[i].getPreferredSize()); @@ -335,9 +335,9 @@ public class StartRoundWindow extends JFrame implements ActionListener, WIDE_RIGHT + (firstBelowTable ? WIDE_TOP : 0)); for (int i = 0; i < np; i++) { f = - playerFree[i] = - new Field(includeBidding - ? round.getFreeCashModel(i) + playerFree[i] = + new Field(includeBidding + ? round.getFreeCashModel(i) : players[i].getCashModel()); addField(f, playerFreeCashXOffset + i, playerFreeCashYOffset, 1, 1, firstBelowTable ? WIDE_TOP : 0); @@ -366,11 +366,11 @@ public class StartRoundWindow extends JFrame implements ActionListener, padTop = (wideGapPositions & WIDE_TOP) > 0 ? WIDE_GAP : NARROW_GAP; padLeft = (wideGapPositions & WIDE_LEFT) > 0 ? WIDE_GAP : NARROW_GAP; padBottom = - (wideGapPositions & WIDE_BOTTOM) > 0 ? WIDE_GAP : NARROW_GAP; - padRight = (wideGapPositions & WIDE_RIGHT) > 0 ? WIDE_GAP : NARROW_GAP; - gbc.insets = new Insets(padTop, padLeft, padBottom, padRight); + (wideGapPositions & WIDE_BOTTOM) > 0 ? WIDE_GAP : NARROW_GAP; + padRight = (wideGapPositions & WIDE_RIGHT) > 0 ? WIDE_GAP : NARROW_GAP; + gbc.insets = new Insets(padTop, padLeft, padBottom, padRight); - statusPanel.add(comp, gbc); + statusPanel.add(comp, gbc); } @@ -384,7 +384,7 @@ public class StartRoundWindow extends JFrame implements ActionListener, } // Unselect the selected private dummyButton.setSelected(true); - + if (!myTurn) return; // For debugging @@ -393,7 +393,7 @@ public class StartRoundWindow extends JFrame implements ActionListener, } List<StartItemAction> actions = - possibleActions.getType(StartItemAction.class); + possibleActions.getType(StartItemAction.class); if (actions == null || actions.isEmpty()) { close(); @@ -401,7 +401,7 @@ public class StartRoundWindow extends JFrame implements ActionListener, } int nextPlayerIndex = - ((PossibleAction) actions.get(0)).getPlayerIndex(); + ((PossibleAction) actions.get(0)).getPlayerIndex(); setSRPlayerTurn(nextPlayerIndex); boolean passAllowed = false; @@ -440,7 +440,7 @@ public class StartRoundWindow extends JFrame implements ActionListener, } else { PossibleAction lastAction = gameUIManager.getLastAction(); if (lastAction instanceof GameAction - && (((GameAction) lastAction).getMode() == GameAction.UNDO || ((GameAction) lastAction).getMode() == GameAction.FORCED_UNDO)) { + && (((GameAction) lastAction).getMode() == GameAction.UNDO || ((GameAction) lastAction).getMode() == GameAction.FORCED_UNDO)) { // If we come here via an Undo, we should not start // with a modal dialog, as that would prevent further // Undos. @@ -482,7 +482,7 @@ public class StartRoundWindow extends JFrame implements ActionListener, passAllowed = false; List<NullAction> inactiveItems = - possibleActions.getType(NullAction.class); + possibleActions.getType(NullAction.class); if (inactiveItems != null && !inactiveItems.isEmpty()) { // only one NullAction is allowed NullAction na = inactiveItems.get(0); @@ -534,8 +534,8 @@ public class StartRoundWindow extends JFrame implements ActionListener, if (source instanceof ClickField) { gbc = gb.getConstraints(source); StartItemAction currentActiveItem = - (StartItemAction) ((ClickField) source).getPossibleActions().get( - 0); + (StartItemAction) ((ClickField) source).getPossibleActions().get( + 0); if (currentActiveItem instanceof BuyStartItem) { buyButton.setEnabled(true); @@ -554,10 +554,10 @@ public class StartRoundWindow extends JFrame implements ActionListener, passButton.setEnabled(true); passButton.setText(LocalText.getText("SelectNoBid")); passButton.setVisible(true); -// if (!repacked) { - pack(); -// repacked = true; -// } + // if (!repacked) { + pack(); + // repacked = true; + // } } if (includeBidding) { @@ -572,11 +572,11 @@ public class StartRoundWindow extends JFrame implements ActionListener, } } else if (source instanceof ActionButton) { PossibleAction activeItem = - ((ActionButton) source).getPossibleActions().get(0); + ((ActionButton) source).getPossibleActions().get(0); if (source == buyButton) { if (activeItem instanceof BuyStartItem - && ((BuyStartItem) activeItem).hasSharePriceToSet()) { + && ((BuyStartItem) activeItem).hasSharePriceToSet()) { if (requestStartPrice((BuyStartItem) activeItem)) process(activeItem); } else { @@ -590,7 +590,7 @@ public class StartRoundWindow extends JFrame implements ActionListener, } else if (source == passButton) { if (activeItem != null && activeItem instanceof BidStartItem - && ((BidStartItem) activeItem).isSelectForAuction()) { + && ((BidStartItem) activeItem).isSelectForAuction()) { ((BidStartItem) activeItem).setActualBid(-1); } process(activeItem); @@ -610,7 +610,7 @@ public class StartRoundWindow extends JFrame implements ActionListener, // TODO: should be included in BuyStartItem List<StockSpaceI> startSpaces = stockMarket.getStartSpaces(); Map<Integer, StockSpaceI> spacePerPrice = - new HashMap<Integer, StockSpaceI>(); + new HashMap<Integer, StockSpaceI>(); int[] prices = new int[startSpaces.size()]; StockSpaceI[] options = new StockSpaceI[startSpaces.size()]; for (int i = 0; i < startSpaces.size(); i++) { @@ -623,13 +623,13 @@ public class StartRoundWindow extends JFrame implements ActionListener, } StockSpace sp = - (StockSpace) JOptionPane.showInputDialog(this, - LocalText.getText("WHICH_START_PRICE", - activeItem.getPlayerName(), - compName), - LocalText.getText("WHICH_PRICE"), - JOptionPane.QUESTION_MESSAGE, null, options, - options[0]); + (StockSpace) JOptionPane.showInputDialog(this, + LocalText.getText("WHICH_START_PRICE", + activeItem.getPlayerName(), + compName), + LocalText.getText("WHICH_PRICE"), + JOptionPane.QUESTION_MESSAGE, null, options, + options[0]); if (sp == null) { return false; } @@ -681,43 +681,43 @@ public class StartRoundWindow extends JFrame implements ActionListener, status == StartItem.BUYABLE ? buyableColour : defaultColour); } - private String getStartItemDescription (StartItem item) { - StringBuffer b = new StringBuffer("<html>"); - b.append (item.getPrimary().toString()); - if (item.getPrimary() instanceof PrivateCompany) { - PrivateCompany priv = (PrivateCompany) item.getPrimary(); - b.append ("<br>Revenue: ").append(Bank.formatIntegerArray(priv.getRevenue())); - List<MapHex> blockedHexes = priv.getBlockedHexes(); - if (blockedHexes == null) { - } else if (blockedHexes.size() == 1) { - b.append("<br>Blocked hex: ").append(blockedHexes.get(0).getName()); - } else if (blockedHexes.size() > 1) { - b.append("<br>Blocked hexes:"); - for (MapHex hex : blockedHexes) { - b.append(" ").append(hex.getName()); - } - } - if (priv.hasSpecialProperties()) { - b.append("<br><b>Special properties:</b>"); - for (SpecialPropertyI sp : priv.getSpecialProperties()) { - b.append("<br>").append(sp.toString()); - } + private String getStartItemDescription (StartItem item) { + StringBuffer b = new StringBuffer("<html>"); + b.append (item.getPrimary().toString()); + if (item.getPrimary() instanceof PrivateCompany) { + PrivateCompany priv = (PrivateCompany) item.getPrimary(); + b.append ("<br>Revenue: ").append(Bank.formatIntegerArray(priv.getRevenue())); + List<MapHex> blockedHexes = priv.getBlockedHexes(); + if (blockedHexes == null) { + } else if (blockedHexes.size() == 1) { + b.append("<br>Blocked hex: ").append(blockedHexes.get(0).getName()); + } else if (blockedHexes.size() > 1) { + b.append("<br>Blocked hexes:"); + for (MapHex hex : blockedHexes) { + b.append(" ").append(hex.getName()); } - // sfy 1889 - List<String> preventClosingConditions = priv.getPreventClosingConditions(); - if (!preventClosingConditions.isEmpty()) { - b.append("<br><b>Prevent closing conditions:</b>"); - for (String condition : preventClosingConditions) { - b.append("<br>").append(condition); - } + } + if (priv.hasSpecialProperties()) { + b.append("<br><b>Special properties:</b>"); + for (SpecialPropertyI sp : priv.getSpecialProperties()) { + b.append("<br>").append(sp.toString()); } - } - if (item.getSecondary() != null) { - b.append("<br><b>Also contains:</b><br>"); - b.append(item.getSecondary().toString()); + // sfy 1889 + List<String> preventClosingConditions = priv.getPreventClosingConditions(); + if (!preventClosingConditions.isEmpty()) { + b.append("<br><b>Prevent closing conditions:</b>"); + for (String condition : preventClosingConditions) { + b.append("<br>").append(condition); + } } - return b.toString(); + + } + if (item.getSecondary() != null) { + b.append("<br><b>Also contains:</b><br>"); + b.append(item.getSecondary().toString()); + } + return b.toString(); } private ImageIcon createInfoIcon() { diff --git a/rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java b/rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java new file mode 100644 index 0000000..0d28970 --- /dev/null +++ b/rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java @@ -0,0 +1,7 @@ +package rails.ui.swing.gamespecific._1880; + +import rails.ui.swing.StartRoundWindow; + +public class StartRoundWindow_1880 extends StartRoundWindow { + +} commit 8fce0f10a5c8ebcb6528a991efcfc74abe45a686 Author: Erik Vos <eri...@xs...> Date: Tue Oct 4 19:07:55 2011 +0200 Fix bug that disallows selling a share after buying one in some cases. Relates to the "don't sell a just bought certificate" rule. The fix is to reverse the sequence of that and the pool size check. diff --git a/rails/game/StockRound.java b/rails/game/StockRound.java index 5284961..cafb86b 100644 --- a/rails/game/StockRound.java +++ b/rails/game/StockRound.java @@ -2,9 +2,7 @@ package rails.game; import java.util.*; -import rails.common.DisplayBuffer; -import rails.common.GuiDef; -import rails.common.LocalText; +import rails.common.*; import rails.common.parser.GameOption; import rails.game.action.*; import rails.game.move.*; @@ -113,7 +111,7 @@ public class StockRound extends Round { DisplayBuffer.add(LocalText.getText("ExceedCertificateLimit" , currentPlayer.getName() , isPlayerOverLimitsDetail(currentPlayer) - ) + ) ); return true; } @@ -262,7 +260,7 @@ public class StockRound extends Round { price = stockSpace.getPrice() / unitsForPrice; shareUnit = comp.getShareUnit(); maxNumberOfSharesToBuy - = maxAllowedNumberOfSharesToBuy(currentPlayer, comp, shareUnit); + = maxAllowedNumberOfSharesToBuy(currentPlayer, comp, shareUnit); /* Checks if the player can buy any shares of this company */ if (maxNumberOfSharesToBuy < 1) continue; @@ -432,9 +430,6 @@ public class StockRound extends Round { for (int i = 1; i <= 4; i++) { number = shareCountPerUnit[i]; if (number == 0) continue; - number = - Math.min(number, maxShareToSell - / (i * company.getShareUnit())); /* In some games (1856), a just bought share may not be sold */ // This code ignores the possibility of different share units @@ -444,6 +439,12 @@ public class StockRound extends Round { } if (number <= 0) continue; + // Check against the share% already in the pool + number = + Math.min(number, maxShareToSell + / (i * company.getShareUnit())); + if (number <= 0) continue; + possibleActions.add(new SellShares(compName, i, number, price)); } @@ -964,8 +965,8 @@ public class StockRound extends Round { // May player sell this company if (!mayPlayerSellShareOfCompany(company)) { - errMsg = LocalText.getText("SaleNotAllowed", companyName); - break; + errMsg = LocalText.getText("SaleNotAllowed", companyName); + break; } // The player must have the share(s) @@ -1083,8 +1084,8 @@ public class StockRound extends Round { if (!company.isClosed()) { - executeShareTransfer (company, certsToSell, - dumpedPlayer, presSharesToSell); + executeShareTransfer (company, certsToSell, + dumpedPlayer, presSharesToSell); } // Remember that the player has sold this company this round. @@ -1099,8 +1100,8 @@ public class StockRound extends Round { } protected void executeShareTransfer (PublicCompanyI company, - List<PublicCertificateI> certsToSell, - Player dumpedPlayer, int presSharesToSell) { + List<PublicCertificateI> certsToSell, + Player dumpedPlayer, int presSharesToSell) { Portfolio portfolio = currentPlayer.getPortfolio(); @@ -1368,13 +1369,13 @@ public class StockRound extends Round { setNextPlayer(); sellPrices.clear(); if (hasAutopassed(currentPlayer)) { - if (isPlayerOverLimits(currentPlayer)) { - // Being over a share/certificate limit undoes an Autopass setting - setAutopass (currentPlayer, false); - } else { - // Process a pass for a player that has set Autopass - done (currentPlayer.getName(), true); - } + if (isPlayerOverLimits(currentPlayer)) { + // Being over a share/certificate limit undoes an Autopass setting + setAutopass (currentPlayer, false); + } else { + // Process a pass for a player that has set Autopass + done (currentPlayer.getName(), true); + } } } @@ -1446,7 +1447,7 @@ public class StockRound extends Round { if (noSaleIfNotOperated() && !company.hasOperated()) return false; - return true; + return true; } @@ -1582,16 +1583,16 @@ public class StockRound extends Round { return toString(); } - public boolean isSellObligationLifted(PublicCompanyI company) { - return sellObligationLifted != null - && sellObligationLifted.contains(company); - } - - public void setSellObligationLifted (PublicCompanyI company) { - if (sellObligationLifted == null) { - sellObligationLifted = new HashSetState<PublicCompanyI>("SellObligationLifted"); - } - sellObligationLifted.add(company); - } + public boolean isSellObligationLifted(PublicCompanyI company) { + return sellObligationLifted != null + && sellObligationLifted.contains(company); + } + + public void setSellObligationLifted (PublicCompanyI company) { + if (sellObligationLifted == null) { + sellObligationLifted = new HashSetState<PublicCompanyI>("SellObligationLifted"); + } + sellObligationLifted.add(company); + } } |
From: Erik V. <ev...@us...> - 2011-10-03 09:46:40
|
rails/game/action/LayBaseToken.java | 47 ++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 13 deletions(-) New commits: commit 9502e7165a2752f013bd2793f49c774ac4a83acf Author: Erik Vos <eri...@xs...> Date: Mon Oct 3 11:46:12 2011 +0200 Javadoc comments added to the LayBaseToken constructors. diff --git a/rails/game/action/LayBaseToken.java b/rails/game/action/LayBaseToken.java index 945a4d1..9abe174 100644 --- a/rails/game/action/LayBaseToken.java +++ b/rails/game/action/LayBaseToken.java @@ -40,22 +40,43 @@ public class LayBaseToken extends LayToken { public static final long serialVersionUID = 1L; /** - * Allow laying a base token on a given location. + * Lay a base token on one of a given list of locations. + * <p>This constructor is only intended to be used for normal lays of non-home tokens + * in the operating company LAY_TOKEN OR step. + * + * @param locations A list of valid locations (hexes) where the acting company can lay a base token.<br> + * <i>Note:</i> Currently, the game engine cannot yet provide such a list, as all knowledge about routes + * is contained in the user interface code. As a consequence, this constructor is only called + * with the value <b>null</b>, which allows laying a base token on <i>any</i> empty city slot. + * In fact, the UI will now apply the restriction to valid locations only. + * Over time, applying this restriction should be moved to the game engine. */ public LayBaseToken(List<MapHex> locations) { super(locations); type = LOCATION_SPECIFIC; } + /** Lay a base token as allowed via a Special Property. + * <p>The valid locations (hexes) of such a token should be defined inside the special property. + * Typically, such locations do not need to be connected to the existing network of a company. + * + * @param specialProperty The special property that allows laying an extra or unconnected base token. + */ public LayBaseToken(SpecialTokenLay specialProperty) { super(specialProperty); type = SPECIAL_PROPERTY; } + /** Lay a base token on a given location. + * <p> This constructor is specifically intended to allow the player to select a city for its <b>home</b> token + * on a multi-city hex or tile (e.g. an OO tile, such as the Erie in 1830 or the THB in 1856). + * + * @param hex The hex on which a city must be selected to lay a home token on. + */ public LayBaseToken (MapHex hex) { - super (hex); - setChosenHex (hex); - type = HOME_CITY; + super (hex); + setChosenHex (hex); + type = HOME_CITY; } public int getChosenStation() { @@ -75,9 +96,9 @@ public class LayBaseToken extends LayToken { if (!(action instanceof LayBaseToken)) return false; LayBaseToken a = (LayBaseToken) action; return (a.locationNames == null && locationNames == null || a.locationNames.equals(locationNames)) - && a.type == type - && a.company == company - && a.specialProperty == specialProperty; + && a.type == type + && a.company == company + && a.specialProperty == specialProperty; } @Override @@ -85,10 +106,10 @@ public class LayBaseToken extends LayToken { if (!(action instanceof LayBaseToken)) return false; LayBaseToken a = (LayBaseToken) action; return a.chosenHex == chosenHex - && a.chosenStation == chosenStation - && a.type == type - && a.company == company - && a.specialProperty == specialProperty; + && a.chosenStation == chosenStation + && a.type == type + && a.company == company + && a.specialProperty == specialProperty; } @Override @@ -106,7 +127,7 @@ public class LayBaseToken extends LayToken { /** Deserialize */ private void readObject(ObjectInputStream in) throws IOException, - ClassNotFoundException { + ClassNotFoundException { in.defaultReadObject(); @@ -120,7 +141,7 @@ public class LayBaseToken extends LayToken { if (specialPropertyId > 0) { specialProperty = - (SpecialTokenLay) SpecialProperty.getByUniqueId(specialPropertyId); + (SpecialTokenLay) SpecialProperty.getByUniqueId(specialPropertyId); } if (chosenHexName != null && chosenHexName.length() > 0) { chosenHex = mmgr.getHex(chosenHexName); |
From: Stefan F. <ste...@us...> - 2011-09-30 20:55:24
|
test/data/bugs/1856_tokens.rails |binary test/data/bugs/1856_tokens.report | 1033 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 1033 insertions(+) New commits: commit ff1134c23f7a2d1438504c9b6e87cd93dbc5e226 Author: Stefan Frey <ste...@we...> Date: Fri Sep 30 22:57:50 2011 +0200 added test case for 1856 token bug diff --git a/test/data/bugs/1856_tokens.rails b/test/data/bugs/1856_tokens.rails new file mode 100644 index 0000000..02ccc1e Binary files /dev/null and b/test/data/bugs/1856_tokens.rails differ diff --git a/test/data/bugs/1856_tokens.report b/test/data/bugs/1856_tokens.report new file mode 100644 index 0000000..57d007f --- /dev/null +++ b/test/data/bugs/1856_tokens.report @@ -0,0 +1,1033 @@ +GameIs,1856 +PlayerIs,1,Juho +PlayerIs,2,Peter +PlayerIs,3,Jerry +PlayerIs,4,Bill +PlayerIs,5,Aliza +PlayerIs,6,Carlos +PlayerCash,250 +BankHas,10500 +StartOfPhase,2 +BankSizeIs,10500 +StartOfInitialRound +HasPriority,Juho +BID_ITEM_LOG,Juho,75,Ship,175 +BID_ITEM_LOG,Peter,105,Brdg,145 +BID_ITEM_LOG,Jerry,45,W&SR,205 +BID_ITEM_LOG,Bill,80,Ship,170 +BID_ITEM_LOG,Aliza,55,TCC,195 +BID_ITEM_LOG,Carlos,110,Brdg,140 +BID_ITEM_LOG,Juho,50,W&SR,125 +PASSES,Peter +PASSES,Jerry +PASSES,Bill +PASSES,Aliza +PASSES,Carlos +PASSES,Juho +ALL_PASSED +ITEM_PRICE_REDUCED,Flos,15 +BID_ITEM_LOG,Peter,105,Tunn,40 +BuysItemFor,Jerry,Flos,15 +TO_AUCTION,W&SR +PASSES,Jerry +BuysItemFor,Juho,W&SR,50 +BuysItemFor,Aliza,TCC,55 +TO_AUCTION,Ship +BID_ITEM_LOG,Juho,85,Ship,115 +PASSES,Bill +BuysItemFor,Juho,Ship,85 +TO_AUCTION,Brdg +PASSES,Peter +BuysItemFor,Carlos,Brdg,110 +BuysItemFor,Peter,Tunn,105 +Has,Juho,115 +Has,Peter,145 +Has,Jerry,235 +Has,Bill,250 +Has,Aliza,195 +Has,Carlos,140 +StartStockRound,1 +HasPriority,Bill +START_COMPANY_LOG,Bill,LPS,65,130,2,20,LPS +Floats,LPS +START_COMPANY_LOG,Aliza,GW,65,130,2,20,GW +Floats,GW +START_COMPANY_LOG,Carlos,WR,70,140,2,20,WR +Floats,WR +BUY_SHARE_LOG,Juho,10,LPS,IPO,65 +PriceIsPaidTo,65,LPS +PASSES,Peter +START_COMPANY_LOG,Jerry,CA,70,140,2,20,CA +Floats,CA +BUY_SHARE_LOG,Bill,10,LPS,IPO,65 +PriceIsPaidTo,65,LPS +BUY_SHARE_LOG,Aliza,10,GW,IPO,65 +PriceIsPaidTo,65,GW +Autopasses,Carlos +Autopasses,Juho +BUY_SHARE_LOG,Peter,10,LPS,IPO,65 +PriceIsPaidTo,65,LPS +BUY_SHARE_LOG,Jerry,10,CA,IPO,70 +PriceIsPaidTo,70,CA +Autopasses,Bill +Autopasses,Aliza +Autopasses,Carlos +Autopasses,Juho +BUY_SHARE_LOG,Peter,10,CA,IPO,70 +PriceIsPaidTo,70,CA +PASSES,Jerry +Autopasses,Bill +Autopasses,Aliza +Autopasses,Carlos +Autopasses,Juho +PASSES,Peter + +END_SR,1 +Has,LPS,325 +Has,WR,140 +Has,CA,280 +Has,GW,195 +Has,Juho,50 +Has,Peter,10 +Has,Jerry,25 +Has,Bill,55 +Has,Aliza,0 +Has,Carlos,0 +START_OR,1.1 +ReceivesFor,Jerry,5,Flos +ReceivesFor,Juho,10,W&SR +ReceivesFor,Aliza,10,TCC +ReceivesFor,Juho,15,Ship +ReceivesFor,Carlos,20,Brdg +ReceivesFor,Peter,20,Tunn + +CompanyOperates,WR,Carlos +LaysTileAt,WR,5,O16,SW +CompanyDoesNotPayDividend,WR +PRICE_MOVES_LOG,WR,70,E5,65,D5 +BuysTrain,WR,2,IPO,100 +FirstTrainBought,2 + +CompanyOperates,CA,Jerry +LaysTileAt,CA,57,D17,SW +CompanyDoesNotPayDividend,CA +PRICE_MOVES_LOG,CA,70,E5,65,D5 +BuysTrain,CA,2,IPO,100 +BuysTrain,CA,2,IPO,100 +CompanyTakesLoan,CA,100,90 + +CompanyOperates,LPS,Bill +LaysTileAt,LPS,5,C14,N +CompanyDoesNotPayDividend,LPS +PRICE_MOVES_LOG,LPS,65,E6,60,D6 +BuysTrain,LPS,2,IPO,100 +BuysTrain,LPS,2,IPO,100 +CompanyTakesLoan,LPS,100,90 + +CompanyOperates,GW,Aliza +CompanyTakesLoan,GW,100,100 +LaysTileAt,GW,6,F17,NE +InterestPaidFromTreasury,GW,10 +CompanyDoesNotPayDividend,GW +PRICE_MOVES_LOG,GW,65,E6,60,D6 +BuysTrain,GW,2,IPO,100 +All 2-trains are sold out, 3-trains now available + +EndOfOperatingRound,1.1 +ORWorthIncrease,Juho,1.1,10 +ORWorthIncrease,Peter,1.1,-10 +ORWorthIncrease,Jerry,1.1,-40 +ORWorthIncrease,Bill,1.1,-45 +ORWorthIncrease,Aliza,1.1,-35 +ORWorthIncrease,Carlos,1.1,10 +Has,LPS,215 +Has,WR,40 +Has,CA,170 +Has,GW,185 +Has,Juho,75 +Has,Peter,30 +Has,Jerry,30 +Has,Bill,55 +Has,Aliza,10 +Has,Carlos,20 +StartStockRound,2 +HasPriority,Jerry +PASSES,Jerry +PASSES,Bill +PASSES,Aliza +PASSES,Carlos +BUY_SHARE_LOG,Juho,10,LPS,IPO,65 +HoldMoneyInEscrow,65,65,LPS +PASSES,Peter +Autopasses,Jerry +PASSES,Bill +PASSES,Aliza +PASSES,Carlos +PASSES,Juho + +END_SR,2 +Has,LPS,215 +Has,WR,40 +Has,CA,170 +Has,GW,185 +Has,Juho,10 +Has,Peter,30 +Has,Jerry,30 +Has,Bill,55 +Has,Aliza,10 +Has,Carlos,20 +START_OR,2.1 +ReceivesFor,Jerry,5,Flos +ReceivesFor,Juho,10,W&SR +ReceivesFor,Aliza,10,TCC +ReceivesFor,Juho,15,Ship +ReceivesFor,Carlos,20,Brdg +ReceivesFor,Peter,20,Tunn + +CompanyOperates,WR,Carlos +LaysTileAt,WR,6,O18,S +CompanyTakesLoan,WR,100,100 +CompanyRevenue,WR,50 +CompanyMustPayLoanInterest,WR,10 +InterestPaidFromTreasury,WR,10 +CompanyWithholds,WR,50 +PRICE_MOVES_LOG,WR,65,D5,60,C5 + +CompanyOperates,CA,Jerry +LaysTileAt,CA,7,C18,N +CompanyRevenue,CA,0 +CompanyMustPayLoanInterest,CA,10 +InterestPaidFromTreasury,CA,10 +CompanyDoesNotPayDividend,CA +PRICE_MOVES_LOG,CA,65,D5,60,C5 +CompanyTakesLoan,CA,100,90 + +CompanyOperates,LPS,Bill +LaysTileAt,LPS,7,B15,N +CompanyRevenue,LPS,100 +CompanyMustPayLoanInterest,LPS,10 +InterestPaidFromTreasury,LPS,10 +CompanyPaysOutFull,LPS,100 +Payout,Juho,20,2,10 +Payout,Peter,10,1,10 +Payout,Bill,30,3,10 +PRICE_MOVES_LOG,LPS,60,D6,65,E6 +CompanyTakesLoan,LPS,100,90 + +CompanyOperates,GW,Aliza +LaysTileAt,GW,56,E18,N +LAYS_TOKEN_ON,GW,F17,40 +CompanyRevenue,GW,50 +CompanyMustPayLoanInterest,GW,10 +InterestPaidFromTreasury,GW,10 +CompanyPaysOutFull,GW,50 +Payout,Aliza,15,3,10 +PRICE_MOVES_LOG,GW,60,D6,65,E6 +CompanyTakesLoan,GW,100,90 +BuysTrain,GW,3,IPO,225 +FirstTrainBought,3 +StartOfPhase,3 + +EndOfOperatingRound,2.1 +ORWorthIncrease,Juho,2.1,35 +ORWorthIncrease,Peter,2.1,10 +ORWorthIncrease,Jerry,2.1,-40 +ORWorthIncrease,Bill,2.1,15 +ORWorthIncrease,Aliza,2.1,10 +ORWorthIncrease,Carlos,2.1,-10 +Has,LPS,295 +Has,WR,180 +Has,CA,250 +Has,GW,0 +Has,Juho,55 +Has,Peter,60 +Has,Jerry,35 +Has,Bill,85 +Has,Aliza,35 +Has,Carlos,40 +StartStockRound,3 +HasPriority,Peter +PASSES,Peter +Autopasses,Jerry +BUY_SHARE_LOG,Bill,10,LPS,IPO,65 +HoldMoneyInEscrow,65,130,LPS +Autopasses,Aliza +Autopasses,Carlos +Autopasses,Juho +Autopasses,Peter +Autopasses,Jerry +Autopasses,Bill + +END_SR,3 +Has,LPS,295 +Has,WR,180 +Has,CA,250 +Has,GW,0 +Has,Juho,55 +Has,Peter,60 +Has,Jerry,35 +Has,Bill,20 +Has,Aliza,35 +Has,Carlos,40 +START_OR,3.1 +ReceivesFor,Jerry,5,Flos +ReceivesFor,Juho,10,W&SR +ReceivesFor,Aliza,10,TCC +ReceivesFor,Juho,15,Ship +ReceivesFor,Carlos,20,Brdg +ReceivesFor,Peter,20,Tunn + +CompanyOperates,LPS,Bill +LaysTileAt,LPS,15,C14,SE +CompanyRevenue,LPS,120 +CompanyMustPayLoanInterest,LPS,20 +InterestPaidFromTreasury,LPS,20 +CompanyPaysOutFull,LPS,120 +Payout,Juho,24,2,10 +Payout,Peter,12,1,10 +Payout,Bill,48,4,10 +PRICE_MOVES_LOG,LPS,65,E6,70,F6 +CompanyTakesLoan,LPS,100,90 +BuysTrain,LPS,3,IPO,225 + +CompanyOperates,GW,Aliza +LaysTileAt,GW,15,D17,NE +CompanyTakesLoan,GW,100,100 +CompanyRevenue,GW,110 +CompanyMustPayLoanInterest,GW,30 +InterestPaidFromTreasury,GW,30 +CompanyPaysOutFull,GW,110 +Payout,Aliza,33,3,10 +PRICE_MOVES_LOG,GW,65,E6,70,F6 + +CompanyOperates,WR,Carlos +LaysTileAt,WR,15,O16,SE +CompanyRevenue,WR,60 +CompanyMustPayLoanInterest,WR,10 +InterestPaidFromTreasury,WR,10 +CompanyPaysOutFull,WR,60 +Payout,Carlos,12,2,10 +PRICE_MOVES_LOG,WR,60,C5,65,D5 +CompanyTakesLoan,WR,100,90 +BuysTrain,WR,3,IPO,225 + +CompanyOperates,CA,Jerry +LaysTileAt,CA,9,C16,S +LAYS_TOKEN_ON,CA,C14,40 +CompanyRevenue,CA,120 +CompanyMustPayLoanInterest,CA,20 +InterestPaidFromTreasury,CA,20 +CompanyPaysOutFull,CA,120 +Payout,Peter,12,1,10 +Payout,Jerry,36,3,10 +PRICE_MOVES_LOG,CA,60,C5,65,D5 +CompanyTakesLoan,CA,100,90 +BuysTrain,CA,3,IPO,225 + +EndOfOperatingRound,3.1 +ORWorthIncrease,Juho,3.1,39 +ORWorthIncrease,Peter,3.1,34 +ORWorthIncrease,Jerry,3.1,26 +ORWorthIncrease,Bill,3.1,28 +ORWorthIncrease,Aliza,3.1,28 +ORWorthIncrease,Carlos,3.1,22 +Has,LPS,140 +Has,WR,35 +Has,CA,55 +Has,GW,70 +Has,Juho,104 +Has,Peter,104 +Has,Jerry,76 +Has,Bill,68 +Has,Aliza,78 +Has,Carlos,72 +START_OR,3.2 +ReceivesFor,Jerry,5,Flos +ReceivesFor,Juho,10,W&SR +ReceivesFor,Aliza,10,TCC +ReceivesFor,Juho,15,Ship +ReceivesFor,Carlos,20,Brdg +ReceivesFor,Peter,20,Tunn + +CompanyOperates,LPS,Bill +DestinationReached,LPS,F17 +ReleasedFromEscrow,LPS,130 +LaysTileAt,LPS,8,D15,NW +CompanyRevenue,LPS,190 +CompanyMustPayLoanInterest,LPS,30 +InterestPaidFromTreasury,LPS,30 +CompanyPaysOutFull,LPS,190 +Payout,Juho,38,2,10 +Payout,Peter,19,1,10 +Payout,Bill,76,4,10 +PRICE_MOVES_LOG,LPS,70,F6,75,G6 +BuysTrain,LPS,3,IPO,225 +All 3-trains are sold out, 4-trains now available +CompanyTakesLoan,LPS,100,90 + +CompanyOperates,GW,Aliza +LaysTileAt,GW,26,C18,SW +CompanyRevenue,GW,110 +CompanyMustPayLoanInterest,GW,30 +InterestPaidFromTreasury,GW,30 +CompanyPaysOutFull,GW,110 +Payout,Aliza,33,3,10 +PRICE_MOVES_LOG,GW,70,F6,75,G6 + +CompanyOperates,WR,Carlos +LaysTileAt,WR,59,N17,S +CompanyRevenue,WR,150 +CompanyMustPayLoanInterest,WR,20 +InterestPaidFromTreasury,WR,20 +CompanyPaysOutFull,WR,150 +Payout,Carlos,30,2,10 +PRICE_MOVES_LOG,WR,65,D5,70,E5 + +CompanyOperates,CA,Jerry +LaysTileAt,CA,15,F17,SW +CompanyRevenue,CA,190 +CompanyMustPayLoanInterest,CA,30 +InterestPaidFromTreasury,CA,30 +CompanyPaysOutFull,CA,190 +Payout,Peter,19,1,10 +Payout,Jerry,57,3,10 +PRICE_MOVES_LOG,CA,65,D5,70,E5 +CompanyTakesLoan,CA,100,90 + +EndOfOperatingRound,3.2 +ORWorthIncrease,Juho,3.2,53 +ORWorthIncrease,Peter,3.2,48 +ORWorthIncrease,Jerry,3.2,47 +ORWorthIncrease,Bill,3.2,56 +ORWorthIncrease,Aliza,3.2,58 +ORWorthIncrease,Carlos,3.2,60 +Has,LPS,105 +Has,WR,15 +Has,CA,115 +Has,GW,40 +Has,Juho,167 +Has,Peter,162 +Has,Jerry,138 +Has,Bill,144 +Has,Aliza,121 +Has,Carlos,122 +StartStockRound,4 +HasPriority,Aliza +BUY_SHARE_LOG,Aliza,10,GW,IPO,65 +PriceIsPaidTo,65,GW +BUY_SHARE_LOG,Carlos,10,WR,IPO,70 +PriceIsPaidTo,70,WR +SELL_SHARES_LOG,Juho,2,10,20,LPS,150 +PRICE_MOVES_LOG,LPS,75,G6,70,G7 +START_COMPANY_LOG,Juho,GT,70,140,2,20,GT +SELL_SHARE_LOG,Peter,10,CA,70 +PRICE_MOVES_LOG,CA,70,E5,65,E6 +SELL_SHARE_LOG,Peter,10,LPS,70 +START_COMPANY_LOG,Peter,CPR,75,150,2,20,CPR +BUY_SHARE_LOG,Jerry,10,CA,Pool,65 +BUY_SHARE_LOG,Bill,10,LPS,IPO,65 +PriceIsPaidTo,65,LPS +Autopasses,Aliza +Autopasses,Carlos +BUY_SHARE_LOG,Juho,10,GT,IPO,70 +PriceIsPaidTo,70,GT +BUY_SHARE_LOG,Peter,10,CPR,IPO,75 +PriceIsPaidTo,75,CPR +BUY_SHARE_LOG,Jerry,10,CA,IPO,70 +PriceIsPaidTo,70,CA +BUY_SHARE_LOG,Bill,10,LPS,IPO,65 +PriceIsPaidTo,65,LPS +Autopasses,Aliza +Autopasses,Carlos +BUY_SHARE_LOG,Juho,10,GT,IPO,70 +PriceIsPaidTo,70,GT +Floats,GT +BUY_SHARE_LOG,Peter,10,CPR,IPO,75 +PriceIsPaidTo,75,CPR +Floats,CPR +Autopasses,Jerry +Autopasses,Bill +Autopasses,Aliza +Autopasses,Carlos +Autopasses,Juho +Autopasses,Peter + +END_SR,4 +Has,GT,280 +Has,LPS,235 +Has,WR,85 +Has,CPR,300 +Has,CA,185 +Has,GW,105 +Has,Juho,37 +Has,Peter,2 +Has,Jerry,3 +Has,Bill,14 +Has,Aliza,56 +Has,Carlos,52 +START_OR,4.1 +ReceivesFor,Jerry,5,Flos +ReceivesFor,Juho,10,W&SR +ReceivesFor,Aliza,10,TCC +ReceivesFor,Juho,15,Ship +ReceivesFor,Carlos,20,Brdg +ReceivesFor,Peter,20,Tunn + +CompanyOperates,GW,Aliza +LaysTileAt,GW,57,B19,SW +DestinationReached,GW,A20 +CompanyRevenue,GW,130 +CompanyMustPayLoanInterest,GW,30 +InterestPaidFromTreasury,GW,30 +CompanyPaysOutFull,GW,130 +Payout,Aliza,52,4,10 +PRICE_MOVES_LOG,GW,75,G6,80,H6 +CompanyTakesLoan,GW,100,90 + +CompanyOperates,CPR,Peter +LaysTileAt,CPR,4,M6,S +CompanyDoesNotPayDividend,CPR +PRICE_MOVES_LOG,CPR,75,E4,70,D4 +CompanyTakesLoan,CPR,100,90 +BuysTrain,CPR,4,IPO,350 +FirstTrainBought,4 +StartOfPhase,4 + +CompanyOperates,LPS,Bill +LaysTileAt,LPS,8,E14,SE +LAYS_TOKEN_ON,LPS,F17,40 +CompanyRevenue,LPS,160 +CompanyMustPayLoanInterest,LPS,40 +InterestPaidFromTreasury,LPS,40 +CompanyPaysOutFull,LPS,160 +Payout,Bill,96,6,10 +Payout,LPS,48,3,10 +PRICE_MOVES_LOG,LPS,70,G7,75,G6 +CompanyTakesLoan,LPS,100,90 + +CompanyOperates,WR,Carlos +LaysTileAtFor,WR,8,N15,SE,40 +CompanyRevenue,WR,100 +CompanyMustPayLoanInterest,WR,20 +InterestPaidFromTreasury,WR,20 +CompanyPaysOutFull,WR,100 +Payout,Carlos,30,3,10 +PRICE_MOVES_LOG,WR,70,E5,75,F5 +CompanyTakesLoan,WR,100,90 + +CompanyOperates,GT,Juho +LaysTileAt,GT,6,P9,NW +CompanyDoesNotPayDividend,GT +PRICE_MOVES_LOG,GT,70,E5,65,D5 +CompanyTakesLoan,GT,100,90 +BuysTrain,GT,4,IPO,350 + +CompanyOperates,CA,Jerry +LaysTileAt,CA,121,F15,SW +LAYS_TOKEN_ON,CA,F15,100 +CompanyRevenue,CA,110 +CompanyMustPayLoanInterest,CA,40 +InterestPaidFromTreasury,CA,40 +CompanyPaysOutFull,CA,110 +Payout,Jerry,55,5,10 +PRICE_MOVES_LOG,CA,65,E6,70,F6 +CompanyTakesLoan,CA,100,90 + +EndOfOperatingRound,4.1 +ORWorthIncrease,Juho,4.1,-35 +ORWorthIncrease,Peter,4.1,-40 +ORWorthIncrease,Jerry,4.1,35 +ORWorthIncrease,Bill,4.1,66 +ORWorthIncrease,Aliza,4.1,42 +ORWorthIncrease,Carlos,4.1,35 +Has,GT,20 +Has,LPS,293 +Has,WR,115 +Has,CPR,40 +Has,CA,135 +Has,GW,165 +Has,Juho,62 +Has,Peter,22 +Has,Jerry,63 +Has,Bill,110 +Has,Aliza,118 +Has,Carlos,102 +START_OR,4.2 +ReceivesFor,Jerry,5,Flos +ReceivesFor,Juho,10,W&SR +ReceivesFor,Aliza,10,TCC +ReceivesFor,Juho,15,Ship +ReceivesFor,Carlos,20,Brdg +ReceivesFor,Peter,20,Tunn + +CompanyOperates,GW,Aliza +CompanyRevenue,GW,110 +CompanyMustPayLoanInterest,GW,40 +InterestPaidFromTreasury,GW,40 +CompanyPaysOutFull,GW,110 +Payout,Aliza,44,4,10 +PRICE_MOVES_LOG,GW,80,H6,90,I6 +BuysPrivateFromFor,GW,TCC,Aliza,100 + +CompanyOperates,LPS,Bill +CompanyRevenue,LPS,200 +CompanyMustPayLoanInterest,LPS,50 +InterestPaidFromTreasury,LPS,50 +CompanyPaysOutFull,LPS,200 +Payout,Bill,120,6,10 +Payout,LPS,60,3,10 +PRICE_MOVES_LOG,LPS,75,G6,80,H6 +CompanyTakesLoan,LPS,100,90 +BuysTrain,LPS,4,IPO,350 + +CompanyOperates,WR,Carlos +LaysTileAtFor,WR,8,M16,NW,40 +CompanyRevenue,WR,100 +CompanyMustPayLoanInterest,WR,30 +InterestPaidFromTreasury,WR,30 +CompanyWithholds,WR,100 +PRICE_MOVES_LOG,WR,75,F5,70,E5 +BuysPrivateFromFor,WR,Brdg,Carlos,145 +AcquiresBonus,WR,Bridge,10,P17,P19 + +CompanyOperates,CA,Jerry +LaysTileAt,CA,8,G14,SE +CompanyRevenue,CA,110 +CompanyMustPayLoanInterest,CA,50 +InterestPaidFromTreasury,CA,50 +CompanyPaysOutFull,CA,110 +Payout,Jerry,55,5,10 +PRICE_MOVES_LOG,CA,70,F6,75,G6 +BuysPrivateFromFor,CA,Flos,Jerry,40 + +CompanyOperates,CPR,Peter +LaysTileAt,CPR,9,M8,S +CompanyRevenue,CPR,40 +CompanyMustPayLoanInterest,CPR,10 +InterestPaidFromTreasury,CPR,10 +CompanyPaysOutFull,CPR,40 +Payout,Peter,16,4,10 +PRICE_MOVES_LOG,CPR,70,D4,75,E4 +CompanyTakesLoan,CPR,100,90 +BuysPrivateFromFor,CPR,Tunn,Peter,120 +AcquiresBonus,CPR,Tunnel,10,B13 + +CompanyOperates,GT,Juho +LaysTileAt,GT,9,O10,SW +CompanyRevenue,GT,70 +CompanyMustPayLoanInterest,GT,10 +InterestPaidFromTreasury,GT,10 +CompanyPaysOutFull,GT,70 +Payout,Juho,28,4,10 +PRICE_MOVES_LOG,GT,65,D5,70,E5 +CompanyTakesLoan,GT,100,90 +BuysPrivateFromFor,GT,W&SR,Juho,80 + +EndOfOperatingRound,4.2 +ORWorthIncrease,Juho,4.2,73 +ORWorthIncrease,Peter,4.2,36 +ORWorthIncrease,Jerry,4.2,105 +ORWorthIncrease,Bill,4.2,90 +ORWorthIncrease,Aliza,4.2,144 +ORWorthIncrease,Carlos,4.2,50 +Has,GT,20 +Has,LPS,43 +Has,WR,0 +Has,CPR,0 +Has,CA,45 +Has,GW,25 +Has,Juho,195 +Has,Peter,178 +Has,Jerry,163 +Has,Bill,230 +Has,Aliza,272 +Has,Carlos,267 +StartStockRound,5 +HasPriority,Jerry +BUY_SHARE_LOG,Jerry,10,CA,IPO,70 +HoldMoneyInEscrow,70,70,CA +BUY_SHARE_LOG,Bill,10,CA,IPO,70 +HoldMoneyInEscrow,70,140,CA +BUY_SHARE_LOG,Aliza,10,GW,IPO,65 +PriceIsPaidTo,65,GW +BUY_SHARE_LOG,Carlos,10,WR,IPO,70 +PriceIsPaidTo,70,WR +BUY_SHARE_LOG,Juho,10,GT,IPO,70 +PriceIsPaidTo,70,GT +BUY_SHARE_LOG,Peter,10,CPR,IPO,75 +PriceIsPaidTo,75,CPR +BUY_SHARE_LOG,Jerry,10,LPS,IPO,65 +PriceIsPaidTo,65,LPS +BUY_SHARE_LOG,Bill,10,GW,IPO,65 +PriceIsPaidTo,65,GW +BUY_SHARE_LOG,Aliza,10,LPS,Pool,80 +BUY_SHARE_LOG,Carlos,10,WR,IPO,70 +PriceIsPaidTo,70,WR +BUY_SHARE_LOG,Juho,10,LPS,Pool,80 +BUY_SHARE_LOG,Peter,10,LPS,Pool,80 +Autopasses,Jerry +BUY_SHARE_LOG,Bill,10,WR,IPO,70 +HoldMoneyInEscrow,70,70,WR +BUY_SHARE_LOG,Aliza,10,GW,IPO,65 +PriceIsPaidTo,65,GW +BUY_SHARE_LOG,Carlos,10,WR,IPO,70 +HoldMoneyInEscrow,70,140,WR +Autopasses,Juho +Autopasses,Peter +Autopasses,Jerry +Autopasses,Bill +Autopasses,Aliza +Autopasses,Carlos + +END_SR,5 +PRICE_MOVES_LOG,LPS,80,H6,90,H5 +SoldOut,LPS,80,H6,90,H5 +Has,GT,90 +Has,LPS,108 +Has,WR,140 +Has,CPR,75 +Has,CA,45 +Has,GW,220 +Has,Juho,45 +Has,Peter,23 +Has,Jerry,28 +Has,Bill,25 +Has,Aliza,62 +Has,Carlos,57 +START_OR,5.1 +ReceivesFor,CA,5,Flos +ReceivesFor,GT,10,W&SR +ReceivesFor,GW,10,TCC +ReceivesFor,Juho,15,Ship +ReceivesFor,WR,20,Brdg +ReceivesFor,CPR,20,Tunn + +CompanyOperates,GW,Aliza +LaysTileAt,GW,3,H11,S +CompanyRevenue,GW,110 +CompanyMustPayLoanInterest,GW,40 +InterestPaidFromTreasury,GW,40 +CompanyPaysOutFull,GW,110 +Payout,Aliza,66,6,10 +Payout,Bill,11,1,10 +PRICE_MOVES_LOG,GW,90,I6,100,I5 +CompanyTakesLoan,GW,100,90 + +CompanyOperates,LPS,Bill +LaysTileAt,LPS,8,E16,SE +CompanyRevenue,LPS,320 +CompanyMustPayLoanInterest,LPS,60 +InterestPaidFromTreasury,LPS,60 +CompanyPaysOutFull,LPS,320 +Payout,Aliza,32,1,10 +Payout,Juho,32,1,10 +Payout,Bill,192,6,10 +Payout,Peter,32,1,10 +Payout,Jerry,32,1,10 +PRICE_MOVES_LOG,LPS,90,H5,100,I5 +CompanyTakesLoan,LPS,100,90 + +CompanyOperates,CA,Jerry +LaysTileAt,CA,5,H15,N +DestinationReached,CA,H15 +ReleasedFromEscrow,CA,140 +CompanyRevenue,CA,110 +CompanyMustPayLoanInterest,CA,50 +InterestPaidFromTreasury,CA,50 +CompanyPaysOutFull,CA,110 +Payout,Bill,11,1,10 +Payout,Jerry,66,6,10 +PRICE_MOVES_LOG,CA,75,G6,80,H6 +CompanyTakesLoan,CA,100,90 + +CompanyOperates,CPR,Peter +LaysTileAt,CPR,2,M10,S +CompanyRevenue,CPR,50 +CompanyMustPayLoanInterest,CPR,20 +InterestPaidFromTreasury,CPR,20 +CompanyPaysOutFull,CPR,50 +Payout,Peter,25,5,10 +PRICE_MOVES_LOG,CPR,75,E4,80,F4 +CompanyTakesLoan,CPR,100,90 + +CompanyOperates,WR,Carlos +LaysTileAtFor,WR,59,L15,SW,40 +CompanyRevenue,WR,110 +CompanyMustPayLoanInterest,WR,30 +InterestPaidFromTreasury,WR,30 +CompanyPaysOutFull,WR,110 +Payout,Bill,11,1,10 +Payout,Carlos,66,6,10 +PRICE_MOVES_LOG,WR,70,E5,75,F5 +CompanyTakesLoan,WR,100,90 + +CompanyOperates,GT,Juho +LaysTileAt,GT,120,N11,NE +LAYS_FREE_TOKEN_ON,GT,I12 +CompanyRevenue,GT,100 +CompanyMustPayLoanInterest,GT,20 +InterestPaidFromTreasury,GT,20 +CompanyPaysOutFull,GT,100 +Payout,Juho,50,5,10 +PRICE_MOVES_LOG,GT,70,E5,75,F5 +CompanyTakesLoan,GT,100,90 +BuysPrivateFromFor,GT,Ship,Juho,140 +PrivateCloses,W&SR + +EndOfOperatingRound,5.1 +ORWorthIncrease,Juho,5.1,142 +ORWorthIncrease,Peter,5.1,32 +ORWorthIncrease,Jerry,5.1,68 +ORWorthIncrease,Bill,5.1,215 +ORWorthIncrease,Aliza,5.1,98 +ORWorthIncrease,Carlos,5.1,36 +Has,GT,30 +Has,LPS,138 +Has,WR,180 +Has,CPR,165 +Has,CA,230 +Has,GW,280 +Has,Juho,282 +Has,Peter,80 +Has,Jerry,126 +Has,Bill,250 +Has,Aliza,160 +Has,Carlos,123 +START_OR,5.2 +ReceivesFor,CA,5,Flos +ReceivesFor,GW,10,TCC +ReceivesFor,GT,15,Ship +ReceivesFor,WR,20,Brdg +ReceivesFor,CPR,20,Tunn + +CompanyOperates,GW,Aliza +LaysTileAt,GW,9,G16,SW +CompanyRevenue,GW,110 +CompanyMustPayLoanInterest,GW,50 +InterestPaidFromTreasury,GW,50 +CompanyPaysOutFull,GW,110 +Payout,Bill,11,1,10 +Payout,Aliza,66,6,10 +PRICE_MOVES_LOG,GW,100,I5,110,J5 + +CompanyOperates,LPS,Bill +BuysBonusTokenFrom,LPS,Tunnel,10,CPR,50 +LaysTileAt,LPS,14,H15,SW +CompanyRevenue,LPS,370 +CompanyMustPayLoanInterest,LPS,70 +InterestPaidFromTreasury,LPS,70 +CompanyPaysOutFull,LPS,370 +Payout,Aliza,37,1,10 +Payout,Bill,222,6,10 +Payout,Juho,37,1,10 +Payout,Peter,37,1,10 +Payout,Jerry,37,1,10 +PRICE_MOVES_LOG,LPS,100,I5,110,J5 + +CompanyOperates,CA,Jerry +CompanyRevenue,CA,110 +CompanyMustPayLoanInterest,CA,60 +InterestPaidFromTreasury,CA,60 +CompanyWithholds,CA,110 +PRICE_MOVES_LOG,CA,80,H6,75,G6 +CompanyTakesLoan,CA,100,90 +BuysTrain,CA,4,IPO,350 +All 4-trains are sold out, 5-trains now available + +CompanyOperates,CPR,Peter +LaysTileAt,CPR,7,M12,N +DestinationReached,CPR,N11 +DestinationReached,WR,L15 +ReleasedFromEscrow,WR,140 +CompanyRevenue,CPR,110 +CompanyMustPayLoanInterest,CPR,30 +InterestPaidFromTreasury,CPR,30 +CompanyPaysOutFull,CPR,110 +Payout,Peter,55,5,10 +PRICE_MOVES_LOG,CPR,80,F4,90,G4 +CompanyTakesLoan,CPR,100,90 + +CompanyOperates,WR,Carlos +CompanyRevenue,WR,110 +CompanyMustPayLoanInterest,WR,40 +InterestPaidFromTreasury,WR,40 +CompanyPaysOutFull,WR,110 +Payout,Bill,11,1,10 +Payout,Carlos,66,6,10 +PRICE_MOVES_LOG,WR,75,F5,80,G5 +CompanyTakesLoan,WR,100,90 + +CompanyOperates,GT,Juho +LaysTileAt,GT,3,N9,S +CompanyTakesLoan,GT,100,100 +LAYS_TOKEN_ON,GT,N11,100 +CompanyRevenue,GT,140 +CompanyMustPayLoanInterest,GT,40 +InterestPaidFromTreasury,GT,40 +CompanyPaysOutFull,GT,140 +Payout,Juho,70,5,10 +PRICE_MOVES_LOG,GT,75,F5,80,G5 + +EndOfOperatingRound,5.2 +ORWorthIncrease,Juho,5.2,92 +ORWorthIncrease,Peter,5.2,102 +ORWorthIncrease,Jerry,5.2,-43 +ORWorthIncrease,Bill,5.2,294 +ORWorthIncrease,Aliza,5.2,173 +ORWorthIncrease,Carlos,5.2,36 +Has,GT,5 +Has,LPS,18 +Has,WR,390 +Has,CPR,295 +Has,CA,25 +Has,GW,240 +Has,Juho,389 +Has,Peter,172 +Has,Jerry,163 +Has,Bill,494 +Has,Aliza,263 +Has,Carlos,189 +StartStockRound,6 +HasPriority,Juho +SELL_SHARE_LOG,Juho,10,LPS,110 +SELL_SHARE_LOG,Juho,10,GT,80 +PRICE_MOVES_LOG,GT,80,G5,75,G6 +START_COMPANY_LOG,Juho,CV,100,200,2,20,CV +BUY_SHARE_LOG,Peter,10,CPR,IPO,75 +PriceIsPaidTo,75,CPR +BUY_SHARE_LOG,Jerry,10,GW,IPO,65 +PriceIsPaidTo,65,GW +SELL_SHARE_LOG,Bill,10,GW,110 +START_COMPANY_LOG,Bill,THB,100,200,2,20,THB +BUY_SHARE_LOG,Aliza,10,GT,IPO,70 +HoldMoneyInEscrow,70,70,GT +BUY_SHARE_LOG,Carlos,10,CPR,IPO,75 +PriceIsPaidTo,75,CPR +BUY_SHARE_LOG,Juho,10,CV,IPO,100 +PriceIsPaidTo,100,CV +BUY_SHARE_LOG,Peter,10,GW,IPO,65 +PriceIsPaidTo,65,GW +BUY_SHARE_LOG,Jerry,10,GW,IPO,65 +PriceIsPaidTo,65,GW +SELL_SHARE_LOG,Jerry,10,GW,110 +BUY_SHARE_LOG,Bill,10,THB,IPO,100 +PriceIsPaidTo,100,THB +BUY_SHARE_LOG,Aliza,10,CPR,IPO,75 +PriceIsPaidTo,75,CPR +BUY_SHARE_LOG,Carlos,10,CA,IPO,70 +PriceIsPaidTo,70,CA +BUY_SHARE_LOG,Juho,10,CV,IPO,100 +PriceIsPaidTo,100,CV +Autopasses,Peter +BUY_SHARE_LOG,Jerry,10,WR,IPO,70 +PriceIsPaidTo,70,WR +BUY_SHARE_LOG,Bill,10,THB,IPO,100 +PriceIsPaidTo,100,THB +BUY_SHARE_LOG,Aliza,10,CA,IPO,70 +PriceIsPaidTo,70,CA +SELL_SHARE_LOG,Aliza,10,CPR,90 +PRICE_MOVES_LOG,CPR,90,G4,80,G5 +Autopasses,Carlos +BUY_SHARE_LOG,Juho,10,CV,IPO,100 +PriceIsPaidTo,100,CV +Floats,CV +Autopasses,Peter +BUY_SHARE_LOG,Jerry,10,GT,IPO,70 +HoldMoneyInEscrow,70,140,GT +BUY_SHARE_LOG,Bill,10,THB,IPO,100 +PriceIsPaidTo,100,THB +Floats,THB +BUY_SHARE_LOG,Aliza,10,WR,IPO,70 +PriceIsPaidTo,70,WR +Autopasses,Carlos +BUY_SHARE_LOG,Juho,10,CPR,IPO,75 +PriceIsPaidTo,75,CPR +Autopasses,Peter +Autopasses,Jerry +SELL_SHARE_LOG,Bill,10,WR,80 +PRICE_MOVES_LOG,WR,80,G5,75,G6 +SELL_SHARE_LOG,Bill,10,CA,75 +PRICE_MOVES_LOG,CA,75,G6,70,G7 +BUY_SHARE_LOG,Bill,10,THB,IPO,100 +PriceIsPaidTo,100,THB +Autopasses,Aliza +Autopasses,Carlos +SELL_SHARE_LOG,Juho,10,CPR,80 +PRICE_MOVES_LOG,CPR,80,G5,75,G6 +Autopasses,Peter +Autopasses,Jerry +BUY_SHARE_LOG,Bill,10,CPR,IPO,75 +PriceIsPaidTo,75,CPR +Autopasses,Aliza +Autopasses,Carlos +Autopasses,Juho +Autopasses,Peter +Autopasses,Jerry +PASSES,Bill + +END_SR,6 +Has,GT,5 +Has,THB,600 +Has,LPS,18 +Has,WR,530 +Has,CV,500 +Has,CPR,670 +Has,CA,165 +Has,GW,435 +Has,Juho,84 +Has,Peter,32 +Has,Jerry,3 +Has,Bill,84 +Has,Aliza,68 +Has,Carlos,44 +START_OR,6.1 +ReceivesFor,CA,5,Flos +ReceivesFor,GW,10,TCC +ReceivesFor,GT,15,Ship +ReceivesFor,WR,20,Brdg +ReceivesFor,CPR,20,Tunn + +CompanyOperates,GW,Aliza +LaysTileAt,GW,55,I14,SW +LAYS_TOKEN_ON,GW,H15,100 +CompanyRevenue,GW,110 +CompanyMustPayLoanInterest,GW,50 +InterestPaidFromTreasury,GW,50 +CompanyPaysOutFull,GW,110 +Payout,Aliza,66,6,10 +Payout,Peter,11,1,10 +Payout,Jerry,11,1,10 +Payout,GW,22,2,10 +PRICE_MOVES_LOG,GW,110,J5,125,K5 +CompanyTakesLoan,GW,100,90 + +CompanyOperates,LPS,Bill +LaysTileAt,LPS,4,D19,SW +CompanyTakesLoan,LPS,100,100 +CompanyRevenue,LPS,370 +CompanyMustPayLoanInterest,LPS,80 +InterestPaidFromTreasury,LPS,80 +CompanyPaysOutFull,LPS,370 +Payout,Bill,222,6,10 +Payout,Aliza,37,1,10 +Payout,Peter,37,1,10 +Payout,Jerry,37,1,10 +Payout,LPS,37,1,10 +PRICE_MOVES_LOG,LPS,110,J5,125,K5 + +CompanyOperates,CV,Juho +LaysTileAt,CV,121,M4,SW +CompanyDoesNotPayDividend,CV +PRICE_MOVES_LOG,CV,100,E1,90,D1 +PresidentAddsCash,CV,Juho,50 +BuysTrain,CV,5,IPO,550 +FirstTrainBought,5 +StartOfPhase,5 +PrivateCloses,Flos +PrivateCloses,TCC +PrivateCloses,Ship +PrivateCloses,Brdg +PrivateCloses,Tunn +CompanyDiscardsTrain,LPS,3 + +CompanyOperates,THB,Bill |
From: Stefan F. <ste...@us...> - 2011-09-30 19:56:38
|
build.xml | 6 ++++++ make_rails_pkg.sh | 16 ++++++++++++++++ rails.bat | 2 +- rails.sh | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) New commits: commit eb7868e9d88a51b11c39f56283617dcf9acec2aa Author: Stefan Frey <ste...@we...> Date: Fri Sep 23 08:09:31 2011 +0200 Prepared for release 1.5 diff --git a/build.xml b/build.xml index 275ec63..2f9fade 100644 --- a/build.xml +++ b/build.xml @@ -76,9 +76,12 @@ <exclude name="**/*.launch"/> <exclude name="**/*.java"/> <exclude name="rails/test/*"/> + <exclude name="test/**"/> + <exclude name="tiles/*.*"/> <exclude name="18xx.log"/> <exclude name="build.xml"/> <exclude name="buildinfo.xml"/> + <exclude name="user.profiles"/> <exclude name="manifest"/> <exclude name="doc/*"/> <exclude name="html/*"/> @@ -89,6 +92,9 @@ <exclude name="rails.sh"/> <exclude name=".project"/> <exclude name=".classpath"/> + <exclude name=".git/**"/> + <exclude name=".gitignore"/> + <exclude name="Rails-format.xml"/> <exclude name="**/CVS/*"/> <exclude name="**/.settings/*"/> <exclude name="**/rails-${version}.jar"/> diff --git a/make_rails_pkg.sh b/make_rails_pkg.sh new file mode 100755 index 0000000..0fc8d98 --- /dev/null +++ b/make_rails_pkg.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +if [ -z $1 ]; then + echo "Usage: $0 [version]" + exit +fi + +home_dir="/home/freystef" +pushd $home_dir/rails/git_repo/rails/ + +tar cjpf $home_dir/rails-$1.tar.bz2 rails-$1 +zip -9 -r $home_dir/rails-$1.zip rails-$1 + +popd diff --git a/rails.bat b/rails.bat index 402d488..5fb363c 100644 --- a/rails.bat +++ b/rails.bat @@ -1,2 +1,2 @@ -java -jar rails-1.4.1.jar %1 \ No newline at end of file +java -jar rails-1.5.jar %1 \ No newline at end of file diff --git a/rails.sh b/rails.sh index 58b1f8b..201aab0 100644 --- a/rails.sh +++ b/rails.sh @@ -1,3 +1,3 @@ #!/bin/bash -java -jar ./rails-1.4.1.jar $1 \ No newline at end of file +java -jar ./rails-1.5.jar $1 \ No newline at end of file |
From: Stefan F. <ste...@us...> - 2011-09-30 19:54:02
|
New branch 'rails2.0' available with the following commits: commit 8aa0d49c44848538fad5a52d3cfa37ca9fb9e3db Author: Stefan Frey <ste...@we...> Date: Sun Jul 24 15:29:04 2011 +0200 Initial Checkin of Rails 2.0: All classes of the move package are moved to the state package. Changed BooleanState Created NewState V2.0 version of String state Renamed SetChange => SetMove Changed visibility of SetMove Added @Deprecated messages to type A states (with side effects) Added simplified NewMove Updated HashSetState and SetMove Changed visibility of Move / NewMove methods Removed move imports Fixed merge error in TrainManager Started implementation of new rounds classes adapted booleanstate changestack provides public static methods adapted arrayliststate adapted arrayliststate adapted state changed signature of executed and undo in change interface adapted stringstate adapted integerstate added further deprecated annotations adapted hashmapstate adapted HashMapState removed unncessary libraries added guava library and started implementation of statemanager and rootitem added getState() method to Change interface changed ChangeSet to incorporate closed state updated HashMapState to use Sets function first implementation of ChangeStack changed all abstractstate errors to genericstate fixed a variety of state errors adapted HashSetState add missing files, remove unnecessary files add observer and observable interfaces replaced rootitem by context and created GameContext interface removed further move classes started defintion and implementation of presenter and formatters improved model and made state inherit from model adapted basetokenmodel adapted bonusmodel adapted PrivatesModel changed relation between state, model and formatter fixes to the MoneyModel further fixes to PublicCompany further fixes and simplifcations fixed all remaining errors fixed CashMover added HashMultimapState adapted Portfolio added ArrayListMultimapState added CerticateCountModel added TrainsModel renamed PortfolioModel to Portfolio again further fixes to portfolio commit 27b7022b1324616949e16478ac4e891ac0fc2728 Author: Stefan Frey <ste...@we...> Date: Fri Sep 23 08:09:31 2011 +0200 Prepared for release 1.5 |
From: Stefan F. <ste...@us...> - 2011-09-30 19:38:39
|
Rebased ref, commits from common ancestor: |
From: Stefan F. <ste...@us...> - 2011-09-30 18:53:34
|
rails/algorithms/NetworkGraphBuilder.java | 21 - rails/algorithms/NetworkTrain.java | 2 rails/algorithms/NetworkVertex.java | 10 rails/algorithms/RevenueManager.java | 6 rails/algorithms/RevenueTrainRun.java | 2 rails/common/GuiHints.java | 2 rails/game/Bank.java | 9 rails/game/BaseToken.java | 6 rails/game/Bonus.java | 2 rails/game/BonusToken.java | 6 rails/game/CashHolder.java | 9 rails/game/Certificate.java | 2 rails/game/Company.java | 14 rails/game/CompanyI.java | 7 rails/game/GameManager.java | 80 +-- rails/game/GameManagerI.java | 12 rails/game/MapHex.java | 98 ++-- rails/game/MapManager.java | 5 rails/game/OperatingRound.java | 287 ++++++-------- rails/game/Player.java | 32 - rails/game/PlayerManager.java | 2 rails/game/Portfolio.java | 278 ++++--------- rails/game/PrivateCompany.java | 4 rails/game/PrivateCompanyI.java | 4 rails/game/PublicCertificate.java | 18 rails/game/PublicCompany.java | 185 ++++----- rails/game/PublicCompanyI.java | 22 - rails/game/ReportBuffer.java | 12 rails/game/Round.java | 38 - rails/game/ShareSellingRound.java | 13 rails/game/StartItem.java | 29 - rails/game/StartRound.java | 32 - rails/game/StartRoundI.java | 10 rails/game/StartRound_1830.java | 16 rails/game/StartRound_1835.java | 20 rails/game/Station.java | 4 rails/game/StationHolder.java | 2 rails/game/StockMarket.java | 6 rails/game/StockRound.java | 119 ++--- rails/game/StockSpace.java | 29 - rails/game/StockSpaceI.java | 4 rails/game/Stop.java | 44 -- rails/game/Tile.java | 43 +- rails/game/TileI.java | 7 rails/game/TileManager.java | 2 rails/game/Token.java | 6 rails/game/TokenHolder.java | 13 rails/game/TokenI.java | 5 rails/game/Train.java | 12 rails/game/TrainI.java | 5 rails/game/TrainManager.java | 2 rails/game/TreasuryShareRound.java | 36 - rails/game/action/BuyBonusToken.java | 6 rails/game/action/BuyCertificate.java | 6 rails/game/action/BuyPrivate.java | 6 rails/game/action/BuyStartItem.java | 2 rails/game/action/BuyTrain.java | 10 rails/game/action/DiscardTrain.java | 8 rails/game/action/LayBaseToken.java | 2 rails/game/action/LayBonusToken.java | 2 rails/game/action/LayTile.java | 12 rails/game/action/LayToken.java | 4 rails/game/action/MergeCompanies.java | 6 rails/game/action/PossibleAction.java | 2 rails/game/action/PossibleORAction.java | 6 rails/game/action/ReachDestinations.java | 4 rails/game/action/RepayLoans.java | 4 rails/game/action/RequestTurn.java | 2 rails/game/action/SetDividend.java | 2 rails/game/action/StartCompany.java | 2 rails/game/action/TakeLoans.java | 4 rails/game/correct/CashCorrectionAction.java | 4 rails/game/correct/CashCorrectionManager.java | 16 rails/game/correct/ClosePrivate.java | 2 rails/game/correct/CorrectionManager.java | 6 rails/game/correct/MapCorrectionAction.java | 6 rails/game/correct/MapCorrectionManager.java | 6 rails/game/model/AbstractModel.java | 42 ++ rails/game/model/BaseTokensModel.java | 14 rails/game/model/BonusModel.java | 32 - rails/game/model/CalculatedMoneyModel.java | 42 +- rails/game/model/CashModel.java | 51 +- rails/game/model/CertCountModel.java | 18 rails/game/model/CertificateCountModel.java | 22 + rails/game/model/CertificatesModel.java | 48 ++ rails/game/model/HolderModel.java | 48 ++ rails/game/model/Model.java | 20 rails/game/model/ModelObject.java | 96 ---- rails/game/model/MoneyModel.java | 82 ++-- rails/game/model/PresidentModel.java | 19 rails/game/model/PriceModel.java | 18 rails/game/model/PrivatesModel.java | 27 - rails/game/model/ShareModel.java | 48 -- rails/game/model/TrainsModel.java | 95 ++++ rails/game/model/View.java | 12 rails/game/model/ViewUpdate.java | 2 rails/game/round/RoundContext.java | 6 rails/game/special/ExchangeForShare.java | 6 rails/game/special/LocatedBonus.java | 4 rails/game/special/SellBonusToken.java | 4 rails/game/special/SpecialProperty.java | 14 rails/game/special/SpecialPropertyI.java | 10 rails/game/special/SpecialRight.java | 2 rails/game/special/SpecialTileLay.java | 4 rails/game/special/SpecialTokenLay.java | 6 rails/game/special/SpecialTrainBuy.java | 8 rails/game/specific/_1825/PublicCompany_1825.java | 2 rails/game/specific/_1825/StartRound_1825.java | 2 rails/game/specific/_1825/StockRound_1825.java | 2 rails/game/specific/_1835/OperatingRound_1835.java | 31 - rails/game/specific/_1835/PrussianFormationRound.java | 64 +-- rails/game/specific/_1835/StockRound_1835.java | 4 rails/game/specific/_1851/StartRound_1851.java | 2 rails/game/specific/_1856/CGRFormationRound.java | 97 ++-- rails/game/specific/_1856/OperatingRound_1856.java | 48 +- rails/game/specific/_1856/PublicCompany_1856.java | 2 rails/game/specific/_1856/PublicCompany_CGR.java | 8 rails/game/specific/_1856/StockRound_1856.java | 14 rails/game/specific/_1880/StartRound_1880.java | 19 rails/game/specific/_1880/StockRound_1880.java | 2 rails/game/specific/_1889/OperatingRound_1889.java | 6 rails/game/specific/_18AL/NameTrains.java | 2 rails/game/specific/_18AL/NameableTrain.java | 14 rails/game/specific/_18AL/NamedTrainRevenueModifier.java | 2 rails/game/specific/_18AL/NamedTrainToken.java | 2 rails/game/specific/_18AL/OperatingRound_18AL.java | 16 rails/game/specific/_18EU/FinalMinorExchangeRound.java | 4 rails/game/specific/_18EU/GameManager_18EU.java | 9 rails/game/specific/_18EU/OperatingRound_18EU.java | 16 rails/game/specific/_18EU/StartCompany_18EU.java | 8 rails/game/specific/_18EU/StartRound_18EU.java | 10 rails/game/specific/_18EU/StockRound_18EU.java | 112 ++--- rails/game/specific/_18GA/OperatingRound_18GA.java | 6 rails/game/specific/_18TN/PublicCompany_18TN.java | 5 rails/game/state/AbstractState.java | 50 ++ rails/game/state/ArrayListMultimapState.java | 50 ++ rails/game/state/ArrayListState.java | 19 rails/game/state/CashMove.java | 63 --- rails/game/state/ChangeSet.java | 32 - rails/game/state/ChangeStack.java | 39 + rails/game/state/DoubleMapChange.java | 4 rails/game/state/Formatter.java | 10 rails/game/state/HashMapChange.java | 2 rails/game/state/HashMapState.java | 7 rails/game/state/HashMultimapState.java | 61 ++ rails/game/state/Holder.java | 16 rails/game/state/MapChange.java | 73 --- rails/game/state/Move.java | 47 -- rails/game/state/MoveUtils.java | 50 ++ rails/game/state/Moveable.java | 10 rails/game/state/MoveableHolder.java | 19 rails/game/state/MultimapChange.java | 39 + rails/game/state/MultimapState.java | 11 rails/game/state/NewMove.java | 32 - rails/game/state/Notifiable.java | 5 rails/game/state/ObjectMove.java | 97 ---- rails/game/state/Observable.java | 7 rails/game/state/Observer.java | 7 rails/game/state/PriceMove.java | 4 rails/game/state/PriceTokenMove.java | 8 rails/game/state/RemoveFromMap.java | 74 --- rails/game/state/State.java | 9 rails/game/state/StateManager.java | 11 rails/game/state/TileMove.java | 15 rails/game/state/Triggerable.java | 7 rails/ui/swing/GameStatus.java | 16 rails/ui/swing/GameUIManager.java | 26 - rails/ui/swing/GridPanel.java | 32 - rails/ui/swing/ORPanel.java | 10 rails/ui/swing/ORUIManager.java | 52 +- rails/ui/swing/RemainingTilesWindow.java | 4 rails/ui/swing/ReportWindowDynamic.java | 7 rails/ui/swing/StartRoundWindow.java | 10 rails/ui/swing/StatusWindow.java | 4 rails/ui/swing/UpgradesPanel.java | 20 rails/ui/swing/elements/Field.java | 37 - rails/ui/swing/elements/GUIStockSpace.java | 17 rails/ui/swing/elements/ViewObject.java | 9 rails/ui/swing/gamespecific/_1835/StatusWindow_1835.java | 10 rails/ui/swing/gamespecific/_18AL/NameTrainsDialog.java | 4 rails/ui/swing/gamespecific/_18EU/GameStatus_18EU.java | 6 rails/ui/swing/gamespecific/_18EU/GameUIManager_18EU.java | 6 rails/ui/swing/gamespecific/_18EU/StatusWindow_18EU.java | 4 rails/ui/swing/hexmap/GUIHex.java | 41 -- rails/ui/swing/hexmap/HexMap.java | 2 rails/util/Util.java | 7 tools/MakeGameTileSets.java | 2 187 files changed, 2144 insertions(+), 2133 deletions(-) New commits: commit cb6b30794ca00d6fa13c7b43a69afbd676ca6a26 Author: Stefan Frey <ste...@we...> Date: Fri Sep 30 16:58:56 2011 +0200 renamed PortfolioModel to Portfolio again diff --git a/rails/game/Bank.java b/rails/game/Bank.java index 04d4226..22b0a4c 100644 --- a/rails/game/Bank.java +++ b/rails/game/Bank.java @@ -26,13 +26,13 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon private CashModel money; /** The IPO */ - private PortfolioModel ipo = null; + private Portfolio ipo = null; /** The Bank Pool */ - private PortfolioModel pool = null; + private Portfolio pool = null; /** Collection of items that will (may) become available in the future */ - private PortfolioModel unavailable = null; + private Portfolio unavailable = null; /** Collection of items that have been discarded (but are kept to allow Undo) */ - private PortfolioModel scrapHeap = null; + private Portfolio scrapHeap = null; private static Bank instance = null; @@ -54,10 +54,10 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon money = new CashModel(this); // Create the IPO and the Bank Pool. - ipo = new PortfolioModel(PortfolioModel.IPO_NAME, this); - pool = new PortfolioModel(PortfolioModel.POOL_NAME, this); - unavailable = new PortfolioModel(PortfolioModel.UNAVAILABLE_NAME, this); - scrapHeap = new PortfolioModel(PortfolioModel.SCRAPHEAP_NAME, this); + ipo = new Portfolio(Portfolio.IPO_NAME, this); + pool = new Portfolio(Portfolio.POOL_NAME, this); + unavailable = new Portfolio(Portfolio.UNAVAILABLE_NAME, this); + scrapHeap = new Portfolio(Portfolio.SCRAPHEAP_NAME, this); String configFormat = Config.get("money_format"); if (Util.hasValue(configFormat) && configFormat.matches(".*@.*")) { @@ -123,11 +123,11 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon /** * @return IPO Portfolio */ - public PortfolioModel getIpo() { + public Portfolio getIpo() { return ipo; } - public PortfolioModel getScrapHeap() { + public Portfolio getScrapHeap() { return scrapHeap; } @@ -159,14 +159,14 @@ public class Bank extends AbstractItem implements CashHolder, ConfigurableCompon /** * @return Portfolio of stock in Bank Pool */ - public PortfolioModel getPool() { + public Portfolio getPool() { return pool; } /** * @return Portfolio of unavailable shares */ - public PortfolioModel getUnavailable() { + public Portfolio getUnavailable() { return unavailable; } diff --git a/rails/game/Certificate.java b/rails/game/Certificate.java index 662926c..c802fbe 100644 --- a/rails/game/Certificate.java +++ b/rails/game/Certificate.java @@ -12,7 +12,7 @@ public interface Certificate extends Moveable { /** * @return Portfolio */ - public PortfolioModel getPortfolio(); + public Portfolio getPortfolio(); public String getId(); diff --git a/rails/game/Company.java b/rails/game/Company.java index dd99c33..474c717 100644 --- a/rails/game/Company.java +++ b/rails/game/Company.java @@ -28,7 +28,7 @@ Cloneable, Comparable<Company> { * In private companies, it is primarily the portfolio that holds this private. * In public companies, it is the portfolio of this company. * This contradictory use needs to be disentangled. */ - protected PortfolioModel portfolio = null; + protected Portfolio portfolio = null; protected String infoText = ""; protected String parentInfoText = ""; @@ -114,7 +114,7 @@ Cloneable, Comparable<Company> { * * @return The Portfolio of this company. */ - public PortfolioModel getPortfolio() { + public Portfolio getPortfolio() { return portfolio; } diff --git a/rails/game/CompanyI.java b/rails/game/CompanyI.java index 271c1d7..0e3eb6e 100644 --- a/rails/game/CompanyI.java +++ b/rails/game/CompanyI.java @@ -42,7 +42,7 @@ public interface CompanyI extends Item, ConfigurableComponentI, Holder { * * @return The Portfolio of this company. */ - public PortfolioModel getPortfolio(); + public Portfolio getPortfolio(); /** * Returns the name of the Company diff --git a/rails/game/GameManager.java b/rails/game/GameManager.java index 6a22c51..b822121 100644 --- a/rails/game/GameManager.java +++ b/rails/game/GameManager.java @@ -73,11 +73,11 @@ public class GameManager extends AbstractItem implements ConfigurableComponentI, /** Map relating portfolio names and objects, to enable deserialization. * OBSOLETE since Rails 1.3.1, but still required to enable reading old saved files */ - protected Map<String, PortfolioModel> portfolioMap = - new HashMap<String, PortfolioModel> (); + protected Map<String, Portfolio> portfolioMap = + new HashMap<String, Portfolio> (); /** Map relating portfolio unique names and objects, to enable deserialization */ - protected Map<String, PortfolioModel> portfolioUniqueNameMap = - new HashMap<String, PortfolioModel> (); + protected Map<String, Portfolio> portfolioUniqueNameMap = + new HashMap<String, Portfolio> (); protected IntegerState playerCertificateLimit = new IntegerState (this, "PlayerCertificateLimit", 0); @@ -1528,17 +1528,17 @@ public class GameManager extends AbstractItem implements ConfigurableComponentI, setCurrentPlayerIndex(currentPlayerIndex); } - public void addPortfolio (PortfolioModel portfolio) { + public void addPortfolio (Portfolio portfolio) { portfolioMap.put(portfolio.getId(), portfolio); portfolioUniqueNameMap.put(portfolio.getUniqueName(), portfolio); } /* since Rails 1.3.1, but still required to enable loading old saved files */ - public PortfolioModel getPortfolioByName (String name) { + public Portfolio getPortfolioByName (String name) { return portfolioMap.get(name); } - public PortfolioModel getPortfolioByUniqueName (String name) { + public Portfolio getPortfolioByUniqueName (String name) { return portfolioUniqueNameMap.get(name); } diff --git a/rails/game/GameManagerI.java b/rails/game/GameManagerI.java index b179b82..a307edb 100644 --- a/rails/game/GameManagerI.java +++ b/rails/game/GameManagerI.java @@ -155,9 +155,9 @@ public interface GameManagerI extends Item, Holder, ConfigurableComponentI { public abstract void setNextPlayer(); - public void addPortfolio (PortfolioModel portfolio); - public PortfolioModel getPortfolioByName (String name); - public PortfolioModel getPortfolioByUniqueName (String name); + public void addPortfolio (Portfolio portfolio); + public Portfolio getPortfolioByName (String name); + public Portfolio getPortfolioByUniqueName (String name); /** * @return the StartPacket diff --git a/rails/game/OperatingRound.java b/rails/game/OperatingRound.java index 174ee77..8dec061 100644 --- a/rails/game/OperatingRound.java +++ b/rails/game/OperatingRound.java @@ -143,8 +143,8 @@ public class OperatingRound extends Round implements View<String> { int count = 0; for (PrivateCompanyI priv : companyManager.getAllPrivateCompanies()) { if (!priv.isClosed()) { - if (((PortfolioModel)priv.getHolder()).getOwner().getClass() != Bank.class) { - CashHolder recipient = ((PortfolioModel)priv.getHolder()).getOwner(); + if (((Portfolio)priv.getHolder()).getOwner().getClass() != Bank.class) { + CashHolder recipient = ((Portfolio)priv.getHolder()).getOwner(); int revenue = priv.getRevenueByPhase(getCurrentPhase()); // sfy 1889: revenue by phase if (count++ == 0) ReportBuffer.add(""); ReportBuffer.add(LocalText.getText("ReceivesFor", @@ -2328,7 +2328,7 @@ public class OperatingRound extends Round implements View<String> { /** Who gets the per-share revenue? */ protected CashHolder getBeneficiary(PublicCertificateI cert) { - PortfolioModel holder = cert.getPortfolio(); + Portfolio holder = cert.getPortfolio(); CashHolder beneficiary = holder.getOwner(); // Special cases apply if the holder is the IPO or the Pool if (operatingCompany.get().paysOutToTreasury(cert)) { @@ -2687,7 +2687,7 @@ public class OperatingRound extends Round implements View<String> { Bank.format(actualPresidentCash))); } - PortfolioModel oldHolder = train.getHolder(); + Portfolio oldHolder = train.getHolder(); if (exchangedTrain != null) { TrainI oldTrain = @@ -2939,7 +2939,7 @@ public class OperatingRound extends Round implements View<String> { if (getCurrentPhase().isTrainTradingAllowed()) { BuyTrain bt; Player p; - PortfolioModel pf; + Portfolio pf; int index; int numberOfPlayers = getNumberOfPlayers(); int presidentCash = operatingCompany.get().getPresident().getCash(); diff --git a/rails/game/Phase.java b/rails/game/Phase.java index a23d664..e509507 100644 --- a/rails/game/Phase.java +++ b/rails/game/Phase.java @@ -69,7 +69,7 @@ public class Phase implements PhaseI { protected Map<String, String> actions; private GameManagerI gameManager; - private PortfolioModel lastTrainBuyer; + private Portfolio lastTrainBuyer; protected String extraInfo = ""; @@ -264,7 +264,7 @@ public class Phase implements PhaseI { } } - public void setLastTrainBuyer(PortfolioModel lastTrainBuyer) { + public void setLastTrainBuyer(Portfolio lastTrainBuyer) { this.lastTrainBuyer = lastTrainBuyer; } diff --git a/rails/game/PhaseI.java b/rails/game/PhaseI.java index 62f611c..a598e12 100644 --- a/rails/game/PhaseI.java +++ b/rails/game/PhaseI.java @@ -41,5 +41,5 @@ public interface PhaseI extends ConfigurableComponentI { public String getParameterAsString (String key); public int getParameterAsInteger (String key); - public void setLastTrainBuyer(PortfolioModel lastTrainBuyer); + public void setLastTrainBuyer(Portfolio lastTrainBuyer); } diff --git a/rails/game/PhaseManager.java b/rails/game/PhaseManager.java index 188650c..061c71e 100644 --- a/rails/game/PhaseManager.java +++ b/rails/game/PhaseManager.java @@ -76,11 +76,11 @@ public class PhaseManager extends AbstractItem implements ConfigurableComponentI return getCurrentPhase().getIndex(); } - public void setPhase(String name, PortfolioModel lastTrainBuyer) { + public void setPhase(String name, Portfolio lastTrainBuyer) { setPhase(phaseMap.get(name), lastTrainBuyer); } - protected void setPhase(PhaseI phase, PortfolioModel lastTrainBuyer) { + protected void setPhase(PhaseI phase, Portfolio lastTrainBuyer) { if (phase != null) { phase.setLastTrainBuyer (lastTrainBuyer); currentPhase.set(phase); diff --git a/rails/game/Player.java b/rails/game/Player.java index 3336196..dafdd24 100644 --- a/rails/game/Player.java +++ b/rails/game/Player.java @@ -33,12 +33,12 @@ public class Player extends AbstractItem implements CashHolder, Comparable<Playe private boolean hasBoughtStockThisTurn = false; - private PortfolioModel portfolio = null; + private Portfolio portfolio = null; public Player(String name, int index) { this.name = name; this.index = index; - portfolio = new PortfolioModel(name, this); + portfolio = new Portfolio(name, this); freeCash = new CalculatedMoneyModel(this, "getFreeCash"); wallet.addView(freeCash); blockedCash = new MoneyModel(this, "blockedCash"); @@ -54,7 +54,7 @@ public class Player extends AbstractItem implements CashHolder, Comparable<Playe /** * @return Returns the player's portfolio. */ - public PortfolioModel getPortfolio() { + public Portfolio getPortfolio() { return portfolio; } diff --git a/rails/game/Portfolio.java b/rails/game/Portfolio.java new file mode 100644 index 0000000..89136a1 --- /dev/null +++ b/rails/game/Portfolio.java @@ -0,0 +1,733 @@ +package rails.game; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.log4j.Logger; + +import com.google.common.collect.Maps; + +import rails.common.LocalText; +import rails.game.model.AbstractModel; +import rails.game.model.CertificateCountModel; +import rails.game.model.HolderModel; +import rails.game.model.PrivatesModel; +import rails.game.model.CertificatesModel; +import rails.game.model.TrainsModel; +import rails.game.special.LocatedBonus; +import rails.game.special.SpecialPropertyI; +import rails.game.state.AbstractItem; +import rails.game.state.ArrayListState; +import rails.game.state.MoveUtils; +import rails.game.state.Moveable; +import rails.game.state.Holder; +import rails.util.Util; + +/** + * A Portfolio(Model) stores several HolderModels + * + * For the important MoveAble objects own methods are implemented + * + * All other HolderModels can be added by the general methods + * + * @author evos, freystef (2.0) + */ +public final class Portfolio extends AbstractItem { + + protected static Logger log = + Logger.getLogger(Portfolio.class.getPackage().getName()); + + /** Specific portfolio names */ + public static final String IPO_NAME = "IPO"; + public static final String POOL_NAME = "Pool"; + public static final String SCRAPHEAP_NAME = "ScrapHeap"; + public static final String UNAVAILABLE_NAME = "Unavailable"; + + /** Owner */ + private final CashHolder owner; + + /** Owned private companies */ + private final PrivatesModel privates = new PrivatesModel(this); + + /** Owned public company certificates */ + private final Map<PublicCompanyI, CertificatesModel> certificates = Maps.newHashMap(); + + /** Owned trains */ + private final TrainsModel trains = new TrainsModel(this); + + /** Owned tokens */ + // TODO Currently only used to discard expired Bonus tokens. + private final HolderModel<TokenI> tokens = new HolderModel<TokenI> (this, "tokens"); + + /** + * Private-independent special properties. When moved here, a special + * property no longer depends on the private company being alive. Example: + * 18AL named train tokens. + */ + private final HolderModel<SpecialPropertyI> specialProperties = + new HolderModel<SpecialPropertyI>(this, "specialProperties"); + + private final GameManagerI gameManager; + + public Portfolio(CashHolder holder, String id) { + super(holder, id); + this.owner = holder; + + gameManager = GameManager.getInstance(); + gameManager.addPortfolio(this); + + // change display style dependent on owner + if (owner instanceof PublicCompanyI) { + trains.setAbbrList(false); + privates.setLineBreak(false); + } else if (owner instanceof Bank) { + trains.setAbbrList(true); + } else if (owner instanceof Player) { + privates.setLineBreak(true); + } + } + + public void transferAssetsFrom(Portfolio otherPortfolio) { + + // Move trains + MoveUtils.objectMoveAll(otherPortfolio.getTrainList(), this.getTrainList()); + + // Move treasury certificates + MoveUtils.objectMoveAll(otherPortfolio.getCertificates(), this.getCertificates()); + } + + /** Low-level method, only to be called by the local addObject() method and by initialisation code. */ + public void addPrivate(PrivateCompanyI privateCompany, int position) { + + // add to private Model + privates.addObject(privateCompany, position); + + // change the holder inside the private Company + privateCompany.setHolder(this); + + + log.debug("Adding " + privateCompany.getId() + " to portfolio of " + + name); + if (privateCompany.getSpecialProperties() != null) { + log.debug(privateCompany.getId() + " has special properties!"); + } else { + log.debug(privateCompany.getId() + " has no special properties"); + } + privates.notifyModel(); + updatePlayerWorth (); + } + + /** Low-level method, only to be called by the local addObject() method and by initialisation code. */ + public void addCertificate(PublicCertificateI certificate){ + addCertificate (certificate, new int[] {-1,-1,-1}); + } + + /** Low-level method, only to be called by the local addObject() method. */ + private void addCertificate(PublicCertificateI certificate, int[] position) { + // When undoing a company start, put the President back at the top. + if (certificate.isPresidentShare()) position = new int[] {0,0,0}; + + certificates.add(position[0], certificate); + + String companyName = certificate.getCompany().getId(); + if (!certPerCompany.containsKey(companyName)) { + certPerCompany.put(companyName, new ArrayList<PublicCertificateI>()); + } + + Util.addToList(certPerCompany.get(companyName), certificate, position[1]); + + String certTypeId = certificate.getTypeId(); + if (!certsPerType.containsKey(certTypeId)) { + certsPerType.put(certTypeId, new ArrayList<PublicCertificateI>()); + } + Util.addToList(certsPerType.get(certTypeId), certificate, position[2]); + + certificate.setPortfolio(this); + + getShareModel(certificate.getCompany()).addShare(certificate.getShare()); + updatePlayerWorth (); + } + + /** Low-level method, only to be called by the local addObject() method. */ + private boolean removePrivate(PrivateCompanyI privateCompany) { + boolean removed = privateCompanies.remove(privateCompany); + if (removed) { + privates.notifyModel(); + updatePlayerWorth (); + } + return removed; + } + + /** Low-level method, only to be called by the local addObject() method. */ + private void removeCertificate(PublicCertificateI certificate) { + certificates.remove(certificate); + + String companyName = certificate.getCompany().getId(); + + List<PublicCertificateI> certs = getCertificatesPerCompany(companyName); + certs.remove(certificate); + + String certTypeId = certificate.getTypeId(); + if (certsPerType.containsKey(certTypeId)) { + certsPerType.get(certTypeId).remove(0); + if (certsPerType.get(certTypeId).isEmpty()) { + certsPerType.remove(certTypeId); + } + } + + getShareModel(certificate.getCompany()).addShare( + -certificate.getShare()); + updatePlayerWorth (); + } + + protected void updatePlayerWorth () { + if (owner instanceof Player) { + ((Player)owner).updateWorth(); + } + } + + public CertificatesModel getShareModel(PublicCompanyI company) { + + if (!shareModelPerCompany.containsKey(company)) { + shareModelPerCompany.put(company, new CertificatesModel(this, company)); + } + return shareModelPerCompany.get(company); + } + + public ArrayListState<PrivateCompanyI> getPrivateCompanies() { + return privateCompanies; + } + + public ArrayListState<PublicCertificateI> getCertificates() { + return certificates; + } + + /** Get the number of certificates that count against the certificate limit */ + public float getCertificateCount() { + + float number = privateCompanies.size(); // May not hold for all games + PublicCompanyI comp; + + for (PublicCertificateI cert : certificates) { + comp = cert.getCompany(); + if (!comp.hasFloated() || !comp.hasStockPrice() + || !cert.getCompany().getCurrentSpace().isNoCertLimit()) + number += cert.getCertificateCount(); + } + return number; + } + + public Map<String, List<PublicCertificateI>> getCertsPerCompanyMap() { + return certPerCompany; + } + + public List<PublicCertificateI> getCertificatesPerCompany(String compName) { + if (certPerCompany.containsKey(compName)) { + return certPerCompany.get(compName); + } else { + // TODO: This is bad. If we don't find the company name + // we should check to see if certPerCompany has been loaded + // or possibly throw a config error. + return new ArrayList<PublicCertificateI>(); + } + } + + /** + * Find a certificate for a given company. + * + * @param company The public company for which a certificate is found. + * @param president Whether we look for a president or non-president + * certificate. If there is only one certificate, this parameter has no + * meaning. + * @return The certificate, or null if not found./ + */ + public PublicCertificateI findCertificate(PublicCompanyI company, + boolean president) { + return findCertificate(company, 1, president); + } + + /** Find a certificate for a given company. */ + public PublicCertificateI findCertificate(PublicCompanyI company, + int shares, boolean president) { + String companyName = company.getId(); + if (!certPerCompany.containsKey(companyName)) { + return null; + } + for (PublicCertificateI cert : certPerCompany.get(companyName)) { + if (cert.getCompany() == company) { + if (company.getShareUnit() == 100 || president + && cert.isPresidentShare() || !president + && !cert.isPresidentShare() && cert.getShares() == shares) { + return cert; + } + } + } + return null; + } + + public Map<String, List<PublicCertificateI>> getCertsPerType() { + return certsPerType; + } + + public List<PublicCertificateI> getCertsOfType(String certTypeId) { + if (certsPerType.containsKey(certTypeId)) { + return certsPerType.get(certTypeId); + } else { + return null; + } + } + + public PublicCertificateI getCertOfType(String certTypeId) { + if (certsPerType.containsKey(certTypeId)) { + return certsPerType.get(certTypeId).get(0); + } else { + return null; + } + } + + /** + * @return + */ + public CashHolder getOwner() { + return owner; + } + + /** + * @param object + */ + public void setOwner(CashHolder owner) { + this.owner = owner; + } + + /** + * @return + */ + public String getId() { + return name; + } + + /** Get unique name (prefixed by the owners class type, to avoid Bank, Player and Company + * namespace clashes). + * @return + */ + public String getUniqueName () { + return uniqueName; + } + + /** + * Returns percentage that a portfolio contains of one company. + * + * @param company + * @return + */ + public int getShare(PublicCompanyI company) { + return certificates.get(company).getShare(); + } + + public int ownsCertificates(PublicCompanyI company, int unit, + boolean president) { + int certs = 0; + String name = company.getId(); + if (certPerCompany.containsKey(name)) { + for (PublicCertificateI cert : certPerCompany.get(name)) { + if (president) { + if (cert.isPresidentShare()) return 1; + } else if (cert.getShares() == unit) { + certs++; + } + } + } + return certs; + } + + /** + * Swap this Portfolio's President certificate for common shares in another + * Portfolio. + * + * @param company The company whose Presidency is handed over. + * @param other The new President's portfolio. + * @return The common certificates returned. + */ + public List<PublicCertificateI> swapPresidentCertificate( + PublicCompanyI company, Portfolio other) { + + List<PublicCertificateI> swapped = new ArrayList<PublicCertificateI>(); + PublicCertificateI swapCert; + + // Find the President's certificate + PublicCertificateI cert = this.findCertificate(company, true); + if (cert == null) return null; + int shares = cert.getShares(); + + // Check if counterparty has enough single certificates + if (other.ownsCertificates(company, 1, false) >= shares) { + for (int i = 0; i < shares; i++) { + swapCert = other.findCertificate(company, 1, false); + swapCert.moveTo(this); + swapped.add(swapCert); + + } + } else if (other.ownsCertificates(company, shares, false) >= 1) { + swapCert = other.findCertificate(company, 2, false); + swapCert.moveTo(this); + swapped.add(swapCert); + } else { + return null; + } + cert.moveTo(other); + + // Make sure the old President is no longer marked as such + getShareModel(company).setShare(); + + return swapped; + } + + /** Low-level method, only to be called by initialisation code and by the local addObject() method. */ + public void addTrain (TrainI train) { + addTrain (train, new int[] {-1,-1,-1}); + } + + /** Low-level method, only to be called by the local addObject() method. */ + private void addTrain(TrainI train, int[] position) { + + trains.add(position[0], train); + + TrainType type = train.getType(); + if (!trainsPerType.containsKey(type)) { + trainsPerType.put(type, new ArrayList<TrainI>()); + } + 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.notifyModel(); + } + + /** Low-level method, only to be called by Move objects */ + private void removeTrain(TrainI train) { + trains.remove(train); + trainsPerType.get(train.getPreviousType()).remove(train); + trainsPerCertType.get(train.getCertType()).remove(train); + train.setHolder(null); + trainsModel.notifyModel(); + } + + public void buyTrain(TrainI train, int price) { + CashHolder oldOwner = train.getOwner(); + train.moveTo(this); + if (price > 0) MoveUtils.cashMove(owner, oldOwner, price); + } + + public void discardTrain(TrainI train) { + train.moveTo(GameManager.getInstance().getBank().getPool()); + ReportBuffer.add(LocalText.getText("CompanyDiscardsTrain", + name, train.getId() )); + } + + public void updateTrainsModel() { + trainsModel.notifyModel(); + } + + public int getNumberOfTrains() { + return trains.size(); + } + + public ArrayListState<TrainI> getTrainList() { + return trains; + } + + public TrainI[] getTrainsPerType(TrainType type) { + + List<TrainI> trainsFound = new ArrayList<TrainI>(); + for (TrainI train : trains) { + if (train.getType() == type) trainsFound.add(train); + } + + return trainsFound.toArray(new TrainI[0]); + } + + public AbstractModel<String> getTrainsModel() { + return trainsModel; + } + + /** Returns one train of any type held */ + public List<TrainI> getUniqueTrains() { + + List<TrainI> trainsFound = new ArrayList<TrainI>(); + Map<TrainType, Object> trainTypesFound = + new HashMap<TrainType, Object>(); + for (TrainI train : trains) { + if (!trainTypesFound.containsKey(train.getType())) { + trainsFound.add(train); + trainTypesFound.put(train.getType(), null); + } + } + return trainsFound; + + } + + public TrainI getTrainOfType(TrainCertificateType type) { + return trains.getTrainOfType(type); + } + + + /** + * Add a special property. Used to make special properties independent of + * the private company that originally held it. + * Low-level method, only to be called by Move objects. + * + * @param property The special property object to add. + * @return True if successful. + */ + private boolean addSpecialProperty(SpecialPropertyI property, int position) { + + + if (specialProperties == null) { + specialProperties = new ArrayList<SpecialPropertyI>(2); + } + + boolean result = Util.addToList(specialProperties, property, position); + if (!result) return false; + + property.setHolder(this); + + // Special case for bonuses with predefined locations + // TODO Does this belong here? + if (owner instanceof PublicCompanyI && property instanceof LocatedBonus) { + PublicCompanyI company = (PublicCompanyI)owner; + LocatedBonus locBonus = (LocatedBonus)property; + Bonus bonus = new Bonus(company, locBonus.getId(), locBonus.getValue(), + locBonus.getLocations()); + company.addBonus(bonus); + ReportBuffer.add(LocalText.getText("AcquiresBonus", + owner.getId(), + locBonus.getId(), + Bank.format(locBonus.getValue()), + locBonus.getLocationNameString())); + } + + return result; + } + + /** + * Remove a special property. + * Low-level method, only to be called by Move objects. + * @param property The special property object to remove. + * @return True if successful. + */ + private boolean removeSpecialProperty(SpecialPropertyI property) { + + boolean result = false; + + if (specialProperties != null) { + result = specialProperties.remove(property); + + // Special case for bonuses with predefined locations + // TODO Does this belong here? + if (owner instanceof PublicCompanyI && property instanceof LocatedBonus) { + PublicCompanyI company = (PublicCompanyI)owner; + LocatedBonus locBonus = (LocatedBonus)property; + company.removeBonus(locBonus.getId()); + } + } + + return result; + } + + /** + * Add an object. + * Low-level method, only to be called by Move objects. + * @param object The object to add. + * @return True if successful. + */ + public boolean addObject(Moveable object, int position) { + if (object instanceof PublicCertificateI) { + if (position == null) position = new int[] {-1, -1, -1}; + addCertificate((PublicCertificateI) object, position); + return true; + } else if (object instanceof PrivateCompanyI) { + addPrivate((PrivateCompanyI) object, position == null ? -1 : position[0]); + return true; + } else if (object instanceof TrainI) { + if (position == null) position = new int[] {-1, -1, -1}; + addTrain((TrainI) object, position); + return true; + } else if (object instanceof SpecialPropertyI) { + return addSpecialProperty((SpecialPropertyI) object, position == null ? -1 : position[0]); + } else if (object instanceof TokenI) { + return addToken((TokenI) object, position == null ? -1 : position[0]); + } else { + return false; + } + } + + /** + * Remove an object. + * Low-level method, only to be called by Move objects. + * + * @param object The object to remove. + * @return True if successful. + */ + public boolean removeObject(Moveable object) { + if (object instanceof PublicCertificateI) { + removeCertificate((PublicCertificateI) object); + return true; + } else if (object instanceof PrivateCompanyI) { + removePrivate((PrivateCompanyI) object); + return true; + } else if (object instanceof TrainI) { + removeTrain((TrainI) object); + return true; + } else if (object instanceof SpecialPropertyI) { + return removeSpecialProperty((SpecialPropertyI) object); + } else if (object instanceof TokenI) { + return removeToken((TokenI) object); + } else { + return false; + } + } + + public int[] getListIndex (Moveable object) { + if (object instanceof PublicCertificateI) { + PublicCertificateI cert = (PublicCertificateI) object; + return new int[] { + certificates.indexOf(object), + certPerCompany.get(cert.getCompany().getId()).indexOf(cert), + certsPerType.get(cert.getTypeId()).indexOf(cert) + }; + } else if (object instanceof PrivateCompanyI) { + return new int[] {privateCompanies.indexOf(object)}; + } else if (object instanceof TrainI) { + TrainI train = (TrainI) object; + return new int[] { + trains.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)}; + } else if (object instanceof TokenI) { + return new int[] {tokens.indexOf(object)}; + } else { + return Moveable.AT_END; + } + } + + /** + * @return ArrayList of all special properties we have. + */ + public List<SpecialPropertyI> getPersistentSpecialProperties() { + return specialProperties; + } + + public List<SpecialPropertyI> getAllSpecialProperties() { + List<SpecialPropertyI> sps = new ArrayList<SpecialPropertyI>(); + if (specialProperties != null) sps.addAll(specialProperties); + for (PrivateCompanyI priv : privateCompanies.view()) { + if (priv.getSpecialProperties() != null) { + sps.addAll(priv.getSpecialProperties()); + } + } + return sps; + } + + /** + * Do we have any special properties? + * + * @return Boolean + */ + public boolean hasSpecialProperties() { + return specialProperties != null && !specialProperties.isEmpty(); + } + + @SuppressWarnings("unchecked") + public <T extends SpecialPropertyI> List<T> getSpecialProperties( + Class<T> clazz, boolean includeExercised) { + List<T> result = new ArrayList<T>(); + List<SpecialPropertyI> sps; + + if (owner instanceof Player || owner instanceof PublicCompanyI) { + + for (PrivateCompanyI priv : privateCompanies.view()) { + + sps = priv.getSpecialProperties(); + if (sps == null) continue; + + for (SpecialPropertyI sp : sps) { + if ((clazz == null || clazz.isAssignableFrom(sp.getClass())) + && sp.isExecutionable() + && (!sp.isExercised() || includeExercised) + && (owner instanceof Company && sp.isUsableIfOwnedByCompany() + || owner instanceof Player && sp.isUsableIfOwnedByPlayer())) { + log.debug("Portfolio "+name+" has SP " + sp); + result.add((T) sp); + } + } + } + + // Private-independent special properties + if (specialProperties != null) { + for (SpecialPropertyI sp : specialProperties) { + if ((clazz == null || clazz.isAssignableFrom(sp.getClass())) + && sp.isExecutionable() + && (!sp.isExercised() || includeExercised) + && (owner instanceof Company && sp.isUsableIfOwnedByCompany() + || owner instanceof Player && sp.isUsableIfOwnedByPlayer())) { + log.debug("Portfolio "+name+" has persistent SP " + sp); + result.add((T) sp); + } + } + } + + } + + return result; + } + + public PrivatesModel getPrivatesOwnedModel() { + return privates; + } + + /** Low-level method, only to be called by the local addObject() method. */ + public boolean addToken(TokenI token, int position) { + tokens.add(position, token); + return true; + } + + /** Low-level method, only to be called by the local addObject() method. */ + public boolean removeToken(TokenI token) { + return tokens.remove(token); + } + + public boolean hasTokens() { + return tokens != null && !tokens.isEmpty(); + } + + public void rustObsoleteTrains() { + + List<TrainI> trainsToRust = new ArrayList<TrainI>(); + for (TrainI train : trains) { + if (train.isObsolete()) { + trainsToRust.add(train); + } + } + // Need to separate selection and execution, + // otherwise we get a ConcurrentModificationException on trains. + for (TrainI train : trainsToRust) { + ReportBuffer.add(LocalText.getText("TrainsObsoleteRusted", + train.getId(), name)); + log.debug("Obsolete train " + train.getUniqueId() + " (owned by " + + name + ") rusted"); + train.setRusted(); + } + trainsModel.notifyModel(); + } + +} diff --git a/rails/game/PortfolioModel.java b/rails/game/PortfolioModel.java deleted file mode 100644 index 1048c36..0000000 --- a/rails/game/PortfolioModel.java +++ /dev/null @@ -1,787 +0,0 @@ -package rails.game; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.log4j.Logger; - -import com.google.common.collect.Maps; - -import rails.common.LocalText; -import rails.game.model.AbstractModel; -import rails.game.model.CertificateCountModel; -import rails.game.model.HolderModel; -import rails.game.model.PrivatesModel; -import rails.game.model.CertificatesModel; -import rails.game.model.TrainsModel; -import rails.game.special.LocatedBonus; -import rails.game.special.SpecialPropertyI; -import rails.game.state.AbstractItem; -import rails.game.state.ArrayListState; -import rails.game.state.MoveUtils; -import rails.game.state.Moveable; -import rails.game.state.Holder; -import rails.util.Util; - -/** - * A Portfolio(Model) stores several HolderModels - * - * For the important MoveAble objects own methods are implemented - * - * All other HolderModels can be added by the general methods - * - * @author evos, freystef (2.0) - */ -public final class PortfolioModel extends AbstractItem { - - protected static Logger log = - Logger.getLogger(PortfolioModel.class.getPackage().getName()); - - /** Specific portfolio names */ - public static final String IPO_NAME = "IPO"; - public static final String POOL_NAME = "Pool"; - public static final String SCRAPHEAP_NAME = "ScrapHeap"; - public static final String UNAVAILABLE_NAME = "Unavailable"; - - /** Owner */ - private final CashHolder owner; - - /** Owned private companies */ - private final PrivatesModel privates = new PrivatesModel(this); - - /** Owned public company certificates */ - private final Map<PublicCompanyI, CertificatesModel> certificates = Maps.newHashMap(); - - /** Owned trains */ - private final TrainsModel trains = new TrainsModel(this); - - /** Owned tokens */ - // TODO Currently only used to discard expired Bonus tokens. - private final HolderModel<TokenI> tokens = new HolderModel<TokenI> (this, "tokens"); - - /** - * Private-independent special properties. When moved here, a special - * property no longer depends on the private company being alive. Example: - * 18AL named train tokens. - */ - private final HolderModel<SpecialPropertyI> specialProperties = - new HolderModel<SpecialPropertyI>(this, "specialProperties"); - - private final GameManagerI gameManager; - - public PortfolioModel(CashHolder holder, String id) { - super(holder, id); - this.owner = holder; - - gameManager = GameManager.getInstance(); - gameManager.addPortfolio(this); - - // change display style dependent on owner - if (owner instanceof PublicCompanyI) { - trainsModel.setAbbrList(false); - privates.setLineBreak(false); - } else if (owner instanceof Bank) { - trainsModel.setAbbrList(true); - } else if (owner instanceof Player) { - privates.setLineBreak(true); - } - } - - public void transferAssetsFrom(PortfolioModel otherPortfolio) { - - // Move trains - MoveUtils.objectMoveAll(otherPortfolio.getTrainList(), this.getTrainList()); - - // Move treasury certificates - MoveUtils.objectMoveAll(otherPortfolio.getCertificates(), this.getCertificates()); - } - - /** Low-level method, only to be called by the local addObject() method and by initialisation code. */ - public void addPrivate(PrivateCompanyI privateCompany, int position) { - - // FIXME: has to be rewritten - if (!Util.addToList(privateCompanies.view(), privateCompany, position)) return; - - privateCompany.setHolder(this); - log.debug("Adding " + privateCompany.getId() + " to portfolio of " - + name); - if (privateCompany.getSpecialProperties() != null) { - log.debug(privateCompany.getId() + " has special properties!"); - } else { - log.debug(privateCompany.getId() + " has no special properties"); - } - privates.notifyModel(); - updatePlayerWorth (); - } - - /** Low-level method, only to be called by the local addObject() method and by initialisation code. */ - public void addCertificate(PublicCertificateI certificate){ - addCertificate (certificate, new int[] {-1,-1,-1}); - } - - /** Low-level method, only to be called by the local addObject() method. */ - private void addCertificate(PublicCertificateI certificate, int[] position) { - // When undoing a company start, put the President back at the top. - if (certificate.isPresidentShare()) position = new int[] {0,0,0}; - - certificates.add(position[0], certificate); - - String companyName = certificate.getCompany().getId(); - if (!certPerCompany.containsKey(companyName)) { - certPerCompany.put(companyName, new ArrayList<PublicCertificateI>()); - } - - Util.addToList(certPerCompany.get(companyName), certificate, position[1]); - - String certTypeId = certificate.getTypeId(); - if (!certsPerType.containsKey(certTypeId)) { - certsPerType.put(certTypeId, new ArrayList<PublicCertificateI>()); - } - Util.addToList(certsPerType.get(certTypeId), certificate, position[2]); - - certificate.setPortfolio(this); - - getShareModel(certificate.getCompany()).addShare(certificate.getShare()); - updatePlayerWorth (); - } - - /** Low-level method, only to be called by the local addObject() method. */ - private boolean removePrivate(PrivateCompanyI privateCompany) { - boolean removed = privateCompanies.remove(privateCompany); - if (removed) { - privates.notifyModel(); - updatePlayerWorth (); - } - return removed; - } - - /** Low-level method, only to be called by the local addObject() method. */ - private void removeCertificate(PublicCertificateI certificate) { - certificates.remove(certificate); - - String companyName = certificate.getCompany().getId(); - - List<PublicCertificateI> certs = getCertificatesPerCompany(companyName); - certs.remove(certificate); - - String certTypeId = certificate.getTypeId(); - if (certsPerType.containsKey(certTypeId)) { - certsPerType.get(certTypeId).remove(0); - if (certsPerType.get(certTypeId).isEmpty()) { - certsPerType.remove(certTypeId); - } - } - - getShareModel(certificate.getCompany()).addShare( - -certificate.getShare()); - updatePlayerWorth (); - } - - protected void updatePlayerWorth () { - if (owner instanceof Player) { - ((Player)owner).updateWorth(); - } - } - - public CertificatesModel getShareModel(PublicCompanyI company) { - - if (!shareModelPerCompany.containsKey(company)) { - shareModelPerCompany.put(company, new CertificatesModel(this, company)); - } - return shareModelPerCompany.get(company); - } - - public ArrayListState<PrivateCompanyI> getPrivateCompanies() { - return privateCompanies; - } - - public ArrayListState<PublicCertificateI> getCertificates() { - return certificates; - } - - /** Get the number of certificates that count against the certificate limit */ - public float getCertificateCount() { - - float number = privateCompanies.size(); // May not hold for all games - PublicCompanyI comp; - - for (PublicCertificateI cert : certificates) { - comp = cert.getCompany(); - if (!comp.hasFloated() || !comp.hasStockPrice() - || !cert.getCompany().getCurrentSpace().isNoCertLimit()) - number += cert.getCertificateCount(); - } - return number; - } - - public Map<String, List<PublicCertificateI>> getCertsPerCompanyMap() { - return certPerCompany; - } - - public List<PublicCertificateI> getCertificatesPerCompany(String compName) { - if (certPerCompany.containsKey(compName)) { - return certPerCompany.get(compName); - } else { - // TODO: This is bad. If we don't find the company name - // we should check to see if certPerCompany has been loaded - // or possibly throw a config error. - return new ArrayList<PublicCertificateI>(); - } - } - - /** - * Find a certificate for a given company. - * - * @param company The public company for which a certificate is found. - * @param president Whether we look for a president or non-president - * certificate. If there is only one certificate, this parameter has no - * meaning. - * @return The certificate, or null if not found./ - */ - public PublicCertificateI findCertificate(PublicCompanyI company, - boolean president) { - return findCertificate(company, 1, president); - } - - /** Find a certificate for a given company. */ - public PublicCertificateI findCer... [truncated message content] |
From: Erik V. <ev...@us...> - 2011-09-30 11:54:31
|
rails/game/OperatingRound.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 4ebc9085c07dccba67fc7f5b361b61bfbfb486d7 Author: Erik Vos <eri...@xs...> Date: Fri Sep 30 13:54:12 2011 +0200 Fix to allow laying THB home token if track exists. By Bill Rosgen diff --git a/rails/game/OperatingRound.java b/rails/game/OperatingRound.java index ec8de9c..f2ccfef 100644 --- a/rails/game/OperatingRound.java +++ b/rails/game/OperatingRound.java @@ -361,7 +361,13 @@ public class OperatingRound extends Round implements Observer { if (!operatingCompany.get().hasLaidHomeBaseTokens()) { // This can occur if the home hex has two cities and track, // such as the green OO tile #59 - possibleActions.add(new LayBaseToken (operatingCompany.get().getHomeHexes())); + + // BR: as this is a home token, need to call LayBaseToken with a MapHex, not a list + // to avoid the LayBaseToken action from being a regular token lay + // I am not sure that this will work with multiple home hexes. + for (MapHex home : operatingCompany.get().getHomeHexes()) { + possibleActions.add(new LayBaseToken (home) ); + } forced = true; } else { possibleActions.addAll(getNormalTileLays(true)); |
From: Stefan F. <ste...@us...> - 2011-09-28 12:34:28
|
New branch 'rails2.0' available with the following commits: commit 190b7e1decbdf20d61840bb7e8fb10348e604863 Author: Stefan Frey <ste...@we...> Date: Wed Sep 28 12:26:48 2011 +0200 replaced rootitem by context and created GameContext interface commit eb906e1c8b131cc5db88ee3d5e904d0a5d4bf2db Author: Stefan Frey <ste...@we...> Date: Tue Sep 27 18:20:38 2011 +0200 add missing files, remove unnecessary files add observer and observable interfaces commit ae02831b63c954831bef7a09da27a73454048b28 Author: Stefan Frey <ste...@we...> Date: Tue Sep 27 18:05:11 2011 +0200 adapted HashSetState commit ccbfc1ad16b1471ce81b92aac7ad7385f57abb7d Author: Stefan Frey <ste...@we...> Date: Tue Sep 27 15:27:46 2011 +0200 fixed a variety of state errors commit ce9f18543168de19e0ccd3ca2f6be4c860b3d65d Author: Stefan Frey <ste...@we...> Date: Tue Sep 27 14:45:05 2011 +0200 changed all abstractstate errors to genericstate commit 24903fb0f02c26d763386297a141c10db5d0133c Author: Stefan Frey <ste...@we...> Date: Tue Sep 27 01:23:07 2011 +0200 first implementation of ChangeStack commit 59cac4460821372b44a53022b4fec002b1d09065 Author: Stefan Frey <ste...@we...> Date: Tue Sep 27 00:15:14 2011 +0200 updated HashMapState to use Sets function commit 533863576a14a0a897f103bcf3e3dbdfde25ae23 Author: Stefan Frey <ste...@we...> Date: Mon Sep 26 19:17:10 2011 +0200 changed ChangeSet to incorporate closed state commit f667b30b0eaa7ae3ad2fb5a271abf95519e143b1 Author: Stefan Frey <ste...@we...> Date: Mon Sep 26 18:36:49 2011 +0200 added getState() method to Change interface commit 507fb9416e49239f5c3dfb1acd22e15973e8a508 Author: Stefan Frey <ste...@we...> Date: Mon Sep 26 18:29:36 2011 +0200 added guava library and started implementation of statemanager and rootitem commit b9997110565760898f2af756859df80f25cfb30c Author: Stefan Frey <ste...@we...> Date: Mon Sep 26 12:54:39 2011 +0200 removed unncessary libraries commit dcca06c3d9331f667f1da8d0656e26abcd138d06 Author: Stefan Frey <ste...@we...> Date: Mon Sep 26 12:53:18 2011 +0200 adapted HashMapState commit 78a5d460eb29e21e661ec2b31ea860d2bbf8b22a Author: Stefan Frey <ste...@we...> Date: Sat Sep 24 16:45:39 2011 +0200 adapted hashmapstate commit 2fe208a6e61160637ea6175885d4110793d915c3 Author: Stefan Frey <ste...@we...> Date: Sat Sep 24 14:21:57 2011 +0200 added further deprecated annotations commit 71501db50ca2a02e81f73fb397170b0729d206e0 Author: Stefan Frey <ste...@we...> Date: Sat Sep 24 14:19:28 2011 +0200 adapted integerstate commit 4dc47ccf3152c5ec0d2c3276be7636686fe28362 Author: Stefan Frey <ste...@we...> Date: Sat Sep 24 14:08:07 2011 +0200 adapted stringstate commit 2d7a2f8246bebd0b6fa30237925e88d1510835cf Author: Stefan Frey <ste...@we...> Date: Sat Sep 24 13:50:43 2011 +0200 changed signature of executed and undo in change interface commit ee2c309984c809af31f7a25027e8d83746b7bd48 Author: Stefan Frey <ste...@we...> Date: Sat Sep 24 04:01:41 2011 +0200 adapted state commit a5766c4f4143c1df2e49ed5293435cc8f183bc24 Author: Stefan Frey <ste...@we...> Date: Fri Sep 23 17:26:28 2011 +0200 adapted arrayliststate commit 77fc0b232fee3cc8bfb1e3e9138b031b8cdd4e35 Author: Stefan Frey <ste...@we...> Date: Fri Sep 23 09:52:47 2011 +0200 adapted arrayliststate commit 40adb1a5e6b50b7a21b78fa34d1ef639b7dfe1d4 Author: Stefan Frey <ste...@we...> Date: Fri Sep 23 08:56:58 2011 +0200 changestack provides public static methods commit 2433e74c2f3f31c035f6f92fccee2e431449c7be Author: Stefan Frey <ste...@we...> Date: Fri Sep 23 08:46:16 2011 +0200 adapted booleanstate commit de5a6a298e99cf1d0727b0aafff9687a3861672c Author: Stefan Frey <ste...@we...> Date: Thu Sep 22 18:20:46 2011 +0200 Started implementation of new rounds classes commit 4305f600c07f31744d4e281dfe2a7be2c2211821 Author: Stefan Frey <ste...@we...> Date: Mon Aug 8 17:27:43 2011 +0200 Removed move imports Fixed merge error in TrainManager commit de31282077c52c3f2ab72bbd7686d264b118f8e6 Author: Stefan Frey <ste...@we...> Date: Sun Jul 24 17:10:54 2011 +0200 Changed visibility of Move / NewMove methods commit 8b26ec0337ee53a08a6b5e5ad231dbf51899dcd4 Author: Stefan Frey <ste...@we...> Date: Sun Jul 24 17:06:15 2011 +0200 Updated HashSetState and SetMove commit cd42fed4d99e7a4a9544e80e0efcd45e957b1725 Author: Stefan Frey <ste...@we...> Date: Sun Jul 24 16:36:52 2011 +0200 Added simplified NewMove commit 519e4f928f80d21314142b37438d65b4b9f526bf Author: Stefan Frey <ste...@we...> Date: Sun Jul 24 16:21:55 2011 +0200 Added @Deprecated messages to type A states (with side effects) commit bbc04ef3c8844afd5e263b4297ffc12908484427 Author: Stefan Frey <ste...@we...> Date: Sun Jul 24 16:12:10 2011 +0200 Renamed SetChange => SetMove Changed visibility of SetMove commit e1e85a38df7d1c8df5486d7f48be058ed65a1c6d Author: Stefan Frey <ste...@we...> Date: Sun Jul 24 16:07:46 2011 +0200 V2.0 version of String state commit 3ef7ef7a960e0e5dd1cadb9d60ccbf41a3481e5c Author: Stefan Frey <ste...@we...> Date: Sun Jul 24 15:29:04 2011 +0200 All classes of the move package are moved to the state package. Changed BooleanState Created NewState commit 27b7022b1324616949e16478ac4e891ac0fc2728 Author: Stefan Frey <ste...@we...> Date: Fri Sep 23 08:09:31 2011 +0200 Prepared for release 1.5 |
From: Stefan F. <ste...@us...> - 2011-09-22 23:03:24
|
Tag 'v1.5.0' created by Stefan Frey <ste...@we...> at 2011-09-22 23:04 +0000 version 1.5 Changes since v1.4.3-11: --- 0 files changed --- |
From: Stefan F. <ste...@us...> - 2011-09-22 23:00:07
|
build.xml | 2 +- rails/game/Game.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 78edd293666825a9ebacd7656ed975dfa9fbacdb Author: Stefan Frey <ste...@we...> Date: Fri Sep 23 01:02:15 2011 +0200 Prepared for release 1.5 diff --git a/build.xml b/build.xml index 00fcd78..275ec63 100644 --- a/build.xml +++ b/build.xml @@ -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.2"/> + <property name="version" value="1.5"/> <taskdef name="jarbundler" classpath="tools/lib/jarbundler-2.1.0.jar" classname="net.sourceforge.jarbundler.JarBundler" /> diff --git a/rails/game/Game.java b/rails/game/Game.java index 5dd0005..9a6b6bb 100644 --- a/rails/game/Game.java +++ b/rails/game/Game.java @@ -14,7 +14,7 @@ import rails.game.action.PossibleAction; import rails.util.GameFileIO; public class Game { - public static final String version = "1.4.1+"; + public static final String version = "1.5"; /** The component Manager */ protected GameManager gameManager; |
From: Stefan F. <ste...@us...> - 2011-09-22 16:57:15
|
data/1830/Game.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 11664e64d1f27c4cdea5222eab2fb72d52b3fcc5 Author: Michal Bazynski <ba...@ba...> Date: Thu Sep 22 18:24:34 2011 +0200 in 1830 wabash 7Ts rust 4Ts Signed-off-by: Stefan Frey <ste...@we...> diff --git a/data/1830/Game.xml b/data/1830/Game.xml index f885604..8cc12f3 100644 --- a/data/1830/Game.xml +++ b/data/1830/Game.xml @@ -190,7 +190,9 @@ <TrainType name="7" majorStops="7" cost="710" quantity="2"/> </IfOption> <IfOption name="Variant" value="Wabash"> - <TrainType name="7" majorStops="7" cost="830" quantity="-1"/> + <TrainType name="7" majorStops="7" cost="830" quantity="-1"> + <NewPhase phaseName="D"/> + </TrainType> </IfOption> <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading,Simple"> <TrainType name="D" majorStops="99" quantity="6"> @@ -253,4 +255,4 @@ <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> <!-- Required for coalfield rights '--> </Component> -</ComponentManager> \ No newline at end of file +</ComponentManager> |