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...> - 2012-05-08 10:04:56
|
rails/ui/swing/MapPanel.java | 79 +++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 39 deletions(-) New commits: commit bd86c17a13a6cb75d35af0d102a740ba7a234bb9 Author: Erik Vos <eri...@xs...> Date: Tue May 8 12:03:06 2012 +0200 Fix exception in Map panel scrolling diff --git a/rails/ui/swing/MapPanel.java b/rails/ui/swing/MapPanel.java index 265defe..ba92268 100644 --- a/rails/ui/swing/MapPanel.java +++ b/rails/ui/swing/MapPanel.java @@ -2,9 +2,7 @@ package rails.ui.swing; import java.awt.*; -import java.awt.event.ComponentAdapter; -import java.awt.event.ComponentEvent; -import java.awt.event.KeyEvent; +import java.awt.event.*; import java.util.List; import javax.swing.*; @@ -14,7 +12,8 @@ import org.apache.log4j.Logger; import rails.game.MapManager; import rails.game.action.LayTile; import rails.game.action.LayToken; -import rails.ui.swing.hexmap.*; +import rails.ui.swing.hexmap.HexMap; +import rails.ui.swing.hexmap.HexMapImage; /** * MapWindow class displays the Map Window. It's shocking, I know. @@ -23,31 +22,31 @@ public class MapPanel extends JPanel { private static final long serialVersionUID = 1L; //defines how many pixels should be left as safety margin when calculating fit zooms - private static final int zoomFitSafetyMargin = 4; - + private static final int zoomFitSafetyMargin = 4; + private MapManager mmgr; private HexMap map; private HexMapImage mapImage; private JScrollPane scrollPane; - + private GameUIManager gameUIManager; - + private JLayeredPane layeredPane; private Dimension originalMapSize; private Dimension currentMapSize; - + //active fit-to zoom options private boolean fitToWidth = false; private boolean fitToHeight = false; protected static Logger log = - Logger.getLogger(MapPanel.class.getPackage().getName()); + Logger.getLogger(MapPanel.class.getPackage().getName()); public MapPanel(GameUIManager gameUIManager) { this.gameUIManager = gameUIManager; //Scale.set(15); Scale.set(16); - + setLayout(new BorderLayout()); mmgr = gameUIManager.getGameManager().getMapManager(); @@ -72,7 +71,7 @@ public class MapPanel extends JPanel { layeredPane.setPreferredSize(originalMapSize); map.setBounds(0, 0, originalMapSize.width, originalMapSize.height); map.addLayers(layeredPane, 1); - + if (mmgr.isMapImageUsed()) { mapImage = new HexMapImage (); mapImage.init(mmgr,map); @@ -80,14 +79,14 @@ public class MapPanel extends JPanel { mapImage.setBounds(0, 0, originalMapSize.width, originalMapSize.height); layeredPane.add(mapImage, -1); } - + scrollPane = new JScrollPane(layeredPane); scrollPane.setSize(originalMapSize); add(scrollPane, BorderLayout.CENTER); - + setSize(originalMapSize); setLocation(25, 25); - + //add listener for auto fit upon resize events addComponentListener(new ComponentAdapter() { @Override @@ -98,9 +97,11 @@ public class MapPanel extends JPanel { }); } - + public void scrollPaneShowRectangle(Rectangle rectangle) { - + + if (rectangle == null) return; + JViewport viewport = scrollPane.getViewport(); log.debug("ScrollPane viewPort =" + viewport); @@ -108,23 +109,23 @@ public class MapPanel extends JPanel { log.debug("Map size =" + map.getSize()); log.debug("ScrollPane visibleRect =" + scrollPane.getVisibleRect()); log.debug("viewport size =" + viewport.getSize()); - + double setX, setY; setX = Math.max(0, (rectangle.getCenterX() - viewport.getWidth() / 2)); setY = Math.max(0, (rectangle.getCenterY() - viewport.getHeight() / 2)); - + setX = Math.min(setX, Math.max(0, map.getSize().getWidth() - viewport.getWidth())); setY = Math.min(setY, Math.max(0, map.getSize().getHeight() - viewport.getHeight())); - + final Point viewPosition = new Point((int)setX, (int)setY); log.debug("ViewPosition for ScrollPane = " + viewPosition); SwingUtilities.invokeLater(new Runnable() { public void run() { - scrollPane.getViewport().setViewPosition(viewPosition); + scrollPane.getViewport().setViewPosition(viewPosition); } }); } - + public void setAllowedTileLays(List<LayTile> allowedTileLays) { map.setAllowedTileLays(allowedTileLays); } @@ -147,21 +148,21 @@ public class MapPanel extends JPanel { gameUIManager.getORUIManager().getORPanel().redrawRoutes(); layeredPane.revalidate(); } - + public void zoom (boolean in) { removeFitToOption(); map.zoom(in); adjustToNewMapZoom(); } - + /** * Zoom-to-fit functionality is based on the discrete zoom steps. * In order to achieve correctly fitting zoom, continuous adjustment factors are - * determined on top of that. + * determined on top of that. */ private void zoomFit (boolean fitToWidth, boolean fitToHeight) { if (!fitToWidth && !fitToHeight) return; - + ImageLoader imageLoader = GameUIManager.getImageLoader(); int zoomStep = map.getZoomStep(); @@ -179,7 +180,7 @@ public class MapPanel extends JPanel { //determine which dimension will be the critical one for the resize boolean isWidthCritical = ( !fitToHeight || (fitToWidth && idealFactorWidth < idealFactorHeight)); - + //check whether scrollbar will appear in the fit-to dimension and //reduce available size accordingly (not relevant for fit-to-window) if (isWidthCritical && idealFactorWidth > idealFactorHeight) { @@ -190,7 +191,7 @@ public class MapPanel extends JPanel { height -= scrollPane.getHorizontalScrollBar().getPreferredSize().height; idealFactorHeight = height / originalMapSize.height; } - + //abort resize if no space available if (width < 0 || height < 0) return; @@ -207,7 +208,7 @@ public class MapPanel extends JPanel { imageLoader.getZoomFactor(zoomStep+1) != imageLoader.getZoomFactor(zoomStep) ) zoomStep++; - + //decrease zoomFactor until constraints do hold //OR zoom cannot be decreased any more while @@ -221,44 +222,44 @@ public class MapPanel extends JPanel { imageLoader.getZoomFactor(zoomStep-1) != imageLoader.getZoomFactor(zoomStep) ) zoomStep--; - + //Determine and apply adjustment factor for precise fit double idealFactor = isWidthCritical ? idealFactorWidth : idealFactorHeight; imageLoader.setZoomAdjustmentFactor ( - idealFactor / imageLoader.getZoomFactor(zoomStep)); - + idealFactor / imageLoader.getZoomFactor(zoomStep)); + //trigger zoom execution map.setZoomStep(zoomStep); adjustToNewMapZoom(); } - + private void fitToOption (boolean fitToWidth, boolean fitToHeight) { //ignore if nothing has changed if (this.fitToWidth == fitToWidth && this.fitToHeight == fitToHeight ) return; - + this.fitToWidth = fitToWidth; this.fitToHeight = fitToHeight; zoomFit(fitToWidth, fitToHeight); } - + public void fitToWindow () { fitToOption (true, true); } - + public void fitToWidth () { fitToOption (true, false); } - + public void fitToHeight () { fitToOption (false, true); } - + public void removeFitToOption () { fitToWidth = false; fitToHeight = false; } - + public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_F1) { HelpWindow.displayHelp(gameUIManager.getHelp()); |
From: Stefan F. <ste...@us...> - 2012-05-02 05:14:04
|
rails/game/specific/_18EU/OffBoardRevenueModifier.java | 2 ++ 1 file changed, 2 insertions(+) New commits: commit 24a8b77ef0783efba3db5ac008d6ffa6674cf495 Author: Stefan Frey <ste...@we...> Date: Wed May 2 07:13:39 2012 +0200 fixed 18EU hamburg revenue calculation bug, reported by James Romano diff --git a/rails/game/specific/_18EU/OffBoardRevenueModifier.java b/rails/game/specific/_18EU/OffBoardRevenueModifier.java index ce0d0ae..c1848d3 100644 --- a/rails/game/specific/_18EU/OffBoardRevenueModifier.java +++ b/rails/game/specific/_18EU/OffBoardRevenueModifier.java @@ -52,6 +52,8 @@ public class OffBoardRevenueModifier implements RevenueStaticModifier { NetworkVertex hamburgTerminal = NetworkVertex.duplicateVertex(revenueAdapter.getGraph(), hamburgCity, "B7", true); hamburgTerminal.setSink(true); offBoard.add(hamburgTerminal); + // following statement was missing, it removes bug reported by James Romano (2012/01/05) + offBoard.remove(hamburgCity); // vertexVisitSet for the two Hamburgs VertexVisit hamburgSet = revenueAdapter.new VertexVisit(); |
From: Stefan F. <ste...@us...> - 2012-04-12 17:58:01
|
buildRails.xml | 1 readme.txt | 14 test/data/bugs/1856_tokens.report | 1 test/data/bugs/1889_presidentContribution.report | 3 test/data/bugs/18EU_layhomeHex.report | 1 test/data/real/1830_A.report | 3 test/data/real/1856_A.report | 3 test/data/real/1889_A.report | 2 test/data/real/1889_B.report | 3 test/data/real/1889_C.report | 3 test/data/real/18AL_A.report | 1 test/data/real/18TN_A.report | 3 test/data/test/1830_5forDtrainExchange.report | 3 test/data/test/1830_SellFullPresCert.report | 535 +++--- test/data/test/1830_SellHalfPresCert.report | 535 +++--- test/data/test/1835_NatDoubleShare.report | 1768 +++++++++++------------ test/data/test/1835_NatSingleShare.report | 700 ++++----- test/data/test/1835_PRHasTwoExcessTrains.report | 2 test/data/test/1835_PR_3rdTrain.report | 2 test/data/test/1851_Late.report | 2 test/data/test/1856_2nd6T+PrezCash2.report | 3 test/data/test/18EU_After2nd8Train.report | 3 version.number | 2 23 files changed, 1818 insertions(+), 1775 deletions(-) New commits: commit 8d3c6b6d52d9cdac96719bea77f3e815f8fd33bb Author: Stefan Frey <ste...@we...> Date: Thu Apr 12 19:57:38 2012 +0200 updated test game reports after change of the game report for rusted and obsolete trains diff --git a/test/data/bugs/1856_tokens.report b/test/data/bugs/1856_tokens.report index 57d007f..1dd552c 100644 --- a/test/data/bugs/1856_tokens.report +++ b/test/data/bugs/1856_tokens.report @@ -492,6 +492,7 @@ CompanyTakesLoan,CPR,100,90 BuysTrain,CPR,4,IPO,350 FirstTrainBought,4 StartOfPhase,4 +TrainsRusted,2 CompanyOperates,LPS,Bill LaysTileAt,LPS,8,E14,SE diff --git a/test/data/bugs/1889_presidentContribution.report b/test/data/bugs/1889_presidentContribution.report index 95f1fe7..330f6aa 100644 --- a/test/data/bugs/1889_presidentContribution.report +++ b/test/data/bugs/1889_presidentContribution.report @@ -304,6 +304,7 @@ All 3-trains are sold out, 4-trains now available BuysTrain,TR,4,IPO,300 FirstTrainBought,4 StartOfPhase,4 +TrainsRusted,2 BuysPrivateFromFor,TR,B,Breno,60 CompanyOperates,IR,Mark @@ -968,6 +969,7 @@ BuysTrain,KU,3,KO,290 BuysTrain,KU,6,IPO,630 FirstTrainBought,6 StartOfPhase,6 +TrainsRusted,3 CompanyOperates,UR,Chris LaysTileAt,UR,23,C8,SE @@ -1041,5 +1043,6 @@ PresidentAddsCash,KO,Peter,93 BuysTrain,KO,D,IPO,1100 FirstTrainBought,D StartOfPhase,D +TrainsRusted,4 CompanyOperates,UR,Chris diff --git a/test/data/bugs/18EU_layhomeHex.report b/test/data/bugs/18EU_layhomeHex.report index 2846088..c2bd6f7 100644 --- a/test/data/bugs/18EU_layhomeHex.report +++ b/test/data/bugs/18EU_layhomeHex.report @@ -1067,6 +1067,7 @@ PRICE_MOVES_LOG,SNCF,135,H3,150,I3 BuysTrain,SNCF,4,IPO,300 FirstTrainBought,4 StartOfPhase,4 +TrainsRusted,2 CompanyOperates,SNCB,John LaysTileAt,SNCB,143,E4,SE diff --git a/test/data/real/1830_A.report b/test/data/real/1830_A.report index 9e6782f..b964f3b 100644 --- a/test/data/real/1830_A.report +++ b/test/data/real/1830_A.report @@ -426,6 +426,7 @@ All 3-trains are sold out, 4-trains now available BuysTrain,C&O,4,IPO,300 FirstTrainBought,4 StartOfPhase,4 +TrainsObsolete.ALL,2 CompanyDiscardsTrain,NYC,2 CompanyOperates,N&W,Chris @@ -897,6 +898,7 @@ PRICE_MOVES_LOG,CPR,82,G3,76,F3 BuysTrain,CPR,6,IPO,630 FirstTrainBought,6 StartOfPhase,6 +TrainsObsolete.ALL,3 CompanyOperates,N&W,Chris LaysTileAt,N&W,7,G9,SE @@ -997,6 +999,7 @@ PRICE_MOVES_LOG,B&O,82,F2,76,E2 ExchangesTrain,B&O,5,D,IPO,750 FirstTrainBought,D StartOfPhase,D +TrainsObsolete.ALL,4 CompanyOperates,PRR,Chris LaysTileAt,PRR,9,H8,W diff --git a/test/data/real/1856_A.report b/test/data/real/1856_A.report index e063728..5532798 100644 --- a/test/data/real/1856_A.report +++ b/test/data/real/1856_A.report @@ -409,6 +409,7 @@ CompanyTakesLoan,CPR,100,90 BuysTrain,CPR,4,IPO,350 FirstTrainBought,4 StartOfPhase,4 +TrainsRusted,2 CompanyOperates,GT,Aliza LaysTileAt,GT,58,N9,S @@ -1119,6 +1120,7 @@ PRICE_MOVES_LOG,CV,75,D3,80,E3 BuysTrain,CV,6,IPO,700 FirstTrainBought,6 StartOfPhase,6 +TrainsRusted,3 StartFormationRound,CGR StartingPlayer,Joakim @@ -1214,6 +1216,7 @@ PRICE_MOVES_LOG,CGR,100,E1,90,D1 ExchangesTrain,CGR,4,D,IPO,750 FirstTrainBought,D StartOfPhase,D +TrainsRusted,4 CompanyOperates,CV,Joakim LaysTileAt,CV,8,N9,S diff --git a/test/data/real/1889_A.report b/test/data/real/1889_A.report index 5ac0c52..693a67d 100644 --- a/test/data/real/1889_A.report +++ b/test/data/real/1889_A.report @@ -412,6 +412,7 @@ PRICE_MOVES_LOG,IR,80,D3,90,E3 BuysTrain,IR,4,IPO,300 FirstTrainBought,4 StartOfPhase,4 +TrainsRusted,2 CompanyOperates,SR,Simon LaysTileAt,SR,9,H3,SW @@ -637,5 +638,6 @@ PRICE_MOVES_LOG,UR,125,F1,110,E1 BuysTrain,UR,6,IPO,630 FirstTrainBought,6 StartOfPhase,6 +TrainsRusted,3 CompanyOperates,SR,Simon diff --git a/test/data/real/1889_B.report b/test/data/real/1889_B.report index 79eb308..7cc6a1b 100644 --- a/test/data/real/1889_B.report +++ b/test/data/real/1889_B.report @@ -307,6 +307,7 @@ All 3-trains are sold out, 4-trains now available BuysTrain,TR,4,IPO,300 FirstTrainBought,4 StartOfPhase,4 +TrainsRusted,2 CompanyOperates,KU,bernd LaysTileAt,KU,5,C10,SE @@ -907,6 +908,7 @@ PRICE_MOVES_LOG,AR,60,B5,55,A5 BuysTrain,AR,6,IPO,630 FirstTrainBought,6 StartOfPhase,6 +TrainsRusted,3 BuysTrain,AR,5,TR,670 EndOfOperatingRound,6.3 @@ -1009,6 +1011,7 @@ PRICE_MOVES_LOG,TR,125,G2,110,F2 ExchangesTrain,TR,4,D,IPO,800 FirstTrainBought,D StartOfPhase,D +TrainsRusted,4 CompanyOperates,KU,bernd CompanyDoesNotPayDividend,KU diff --git a/test/data/real/1889_C.report b/test/data/real/1889_C.report index 512608d..6bc74ba 100644 --- a/test/data/real/1889_C.report +++ b/test/data/real/1889_C.report @@ -462,6 +462,7 @@ BuysTrain,SR,2,IR,600 BuysTrain,SR,4,IPO,300 FirstTrainBought,4 StartOfPhase,4 +TrainsRusted,2 CompanyOperates,AR,Henning LaysTileAt,AR,6,K8,SE @@ -542,6 +543,7 @@ PRICE_MOVES_LOG,TR,100,F3,110,G3 BuysTrain,TR,6,IPO,630 FirstTrainBought,6 StartOfPhase,6 +TrainsRusted,3 BuysTrain,TR,4,KU,1 CompanyOperates,SR,Klaus @@ -842,6 +844,7 @@ BuysTrain,IR,4,SR,15 ExchangesTrain,IR,4,D,IPO,800 FirstTrainBought,D StartOfPhase,D +TrainsRusted,4 CompanyOperates,KU,Henning LaysTileAt,KU,58,B11,NW diff --git a/test/data/real/18AL_A.report b/test/data/real/18AL_A.report index 9ae7ab5..6677931 100644 --- a/test/data/real/18AL_A.report +++ b/test/data/real/18AL_A.report @@ -373,6 +373,7 @@ BuysTrain,M&O,2,ATN,300 BuysTrain,M&O,4,IPO,300 FirstTrainBought,4 StartOfPhase,4 +TrainsRusted,2 CompanyOperates,TAG,Steve LaysTileAt,TAG,15,E6,SW diff --git a/test/data/real/18TN_A.report b/test/data/real/18TN_A.report index 2771851..607574b 100644 --- a/test/data/real/18TN_A.report +++ b/test/data/real/18TN_A.report @@ -398,6 +398,7 @@ PRICE_MOVES_LOG,SOU,65,E6,70,E5 BuysTrain,SOU,4,IPO,300 FirstTrainBought,4 StartOfPhase,4 +TrainsRusted,2 EndOfOperatingRound,4.2 ORWorthIncrease,Bob,4.2,216 @@ -548,6 +549,7 @@ PRICE_MOVES_LOG,IC,55,D6,45,C6 BuysTrain,IC,6,IPO,630 FirstTrainBought,6 StartOfPhase,6 +TrainsRusted,3 EndOfOperatingRound,5.1 ORWorthIncrease,Bob,5.1,110 @@ -590,6 +592,7 @@ PresidentAddsCash,GMO,Joshua,350 BuysTrain,GMO,6,IPO,630 All 6-trains are sold out, 8-trains now available StartOfPhase,6½ +TrainsObsolete.EXCEPT_TRIGGERING,4 CompanyOperates,L&N,Rob LaysTileAt,L&N,8,D9,SE diff --git a/test/data/test/1830_5forDtrainExchange.report b/test/data/test/1830_5forDtrainExchange.report index 1c4dbc0..79632b4 100644 --- a/test/data/test/1830_5forDtrainExchange.report +++ b/test/data/test/1830_5forDtrainExchange.report @@ -213,6 +213,7 @@ PRICE_MOVES_LOG,PRR,100,G1,112,H1 BuysTrain,PRR,4,IPO,300 FirstTrainBought,4 StartOfPhase,4 +TrainsRusted,2 CompanyOperates,NYNH,Alice LaysTileAtFor,NYNH,54,G19,SW,80 @@ -344,6 +345,7 @@ PRICE_MOVES_LOG,C&O,54,E7,45,D7 BuysTrain,C&O,6,IPO,630 FirstTrainBought,6 StartOfPhase,6 +TrainsRusted,3 EndOfOperatingRound,3.1 ORWorthIncrease,Alice,3.1,-115 @@ -409,6 +411,7 @@ PRICE_MOVES_LOG,C&O,45,D7,36,C7 BuysTrain,C&O,D,IPO,1100 FirstTrainBought,D StartOfPhase,D +TrainsRusted,4 EndOfOperatingRound,3.2 ORWorthIncrease,Alice,3.2,249 diff --git a/test/data/test/1830_SellFullPresCert.report b/test/data/test/1830_SellFullPresCert.report index 7baab94..763adc8 100644 --- a/test/data/test/1830_SellFullPresCert.report +++ b/test/data/test/1830_SellFullPresCert.report @@ -1,267 +1,268 @@ -GameIs,1830 -PlayerIs,1,Alice -PlayerIs,2,Bob -PlayerIs,3,Charlie -PlayerCash,800 -BankHas,9600 -StartOfPhase,2 -BankSizeIs,9600 -StartOfInitialRound -HasPriority,Alice -BuysItemFor,Alice,SVNRR,20 -BuysItemFor,Bob,C&StL,40 -BuysItemFor,Charlie,D&H,70 -BuysItemFor,Alice,M&H,110 -BuysItemFor,Bob,C&A,160 -ALSO_GETS,Bob,CERT_NAME,PRR,10 -BuysItemFor,Charlie,B&O,220 -ALSO_GETS,Charlie,PRES_CERT_NAME,B&O,20 -Has,Alice,670 -Has,Bob,600 -Has,Charlie,510 -StartStockRound,1 -HasPriority,Alice -START_COMPANY_LOG,Alice,NYNH,100,200,2,20,BANK -START_COMPANY_LOG,Bob,PRR,100,200,2,20,BANK -BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 -BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 -BUY_SHARE_LOG,Bob,10,PRR,IPO,100 -BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 -BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 -BUY_SHARE_LOG,Bob,10,PRR,IPO,100 -BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 -BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 -BUY_SHARE_LOG,Bob,10,PRR,IPO,100 -FloatsWithCash,PRR,1000 -BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 -FloatsWithCash,B&O,1000 -BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 -FloatsWithCash,NYNH,1000 -BUY_SHARE_LOG,Bob,10,B&O,IPO,100 -BUY_SHARE_LOG,Charlie,10,NYNH,IPO,100 -PASSES,Alice -PASSES,Bob -PASSES,Charlie - -END_SR,1 -Has,B&O,1000 -Has,NYNH,1000 -Has,PRR,1000 -Has,Alice,70 -Has,Bob,0 -Has,Charlie,10 -START_OR,1.1 -ReceivesFor,Alice,5,SVNRR -ReceivesFor,Bob,10,C&StL -ReceivesFor,Charlie,15,D&H -ReceivesFor,Alice,20,M&H -ReceivesFor,Bob,25,C&A -ReceivesFor,Charlie,30,B&O - -CompanyOperates,B&O,Charlie -LaysTileAtFor,B&O,57,J14,SW,80 -LAYS_TOKEN_ON,B&O,J14,40 -CompanyDoesNotPayDividend,B&O -PRICE_MOVES_LOG,B&O,100,G1,90,F1 -BuysTrain,B&O,2,IPO,80 -PrivateCloses,B&O -FirstTrainBought,2 -BuysTrain,B&O,2,IPO,80 -BuysTrain,B&O,2,IPO,80 - -CompanyOperates,NYNH,Alice -LaysTileAt,NYNH,1,F20,SW -CompanyDoesNotPayDividend,NYNH -PRICE_MOVES_LOG,NYNH,100,G1,90,F1 -BuysTrain,NYNH,2,IPO,80 -BuysTrain,NYNH,2,IPO,80 -BuysTrain,NYNH,2,IPO,80 -All 2-trains are sold out, 3-trains now available -BuysTrain,NYNH,3,IPO,180 -FirstTrainBought,3 -StartOfPhase,3 -BuysPrivateFromFor,NYNH,SVNRR,Alice,40 -BuysPrivateFromFor,NYNH,M&H,Alice,220 - -CompanyOperates,PRR,Bob -LaysTileAt,PRR,9,H14,W -CompanyDoesNotPayDividend,PRR -PRICE_MOVES_LOG,PRR,100,G1,90,F1 -BuysTrain,PRR,3,IPO,180 -BuysPrivateFromFor,PRR,C&StL,Bob,80 -BuysPrivateFromFor,PRR,C&A,Bob,320 - -EndOfOperatingRound,1.1 -ORWorthIncrease,Alice,1.1,95 -ORWorthIncrease,Bob,1.1,165 -ORWorthIncrease,Charlie,1.1,-245 -Has,B&O,640 -Has,NYNH,320 -Has,PRR,420 -Has,Alice,355 -Has,Bob,435 -Has,Charlie,55 -StartStockRound,2 -HasPriority,Alice -SELL_SHARE_LOG,Alice,10,NYNH,90 -PRICE_MOVES_LOG,NYNH,90,F1,82,F2 -START_COMPANY_LOG,Alice,C&O,67,134,2,20,BANK -SELL_SHARE_LOG,Bob,10,B&O,90 -PRICE_MOVES_LOG,B&O,90,F1,82,F2 -START_COMPANY_LOG,Bob,NYC,82,164,2,20,BANK -PASSES,Charlie -BUY_SHARE_LOG,Alice,10,C&O,IPO,67 -BUY_SHARE_LOG,Bob,10,NYC,IPO,82 -PASSES,Charlie -BUY_SHARE_LOG,Alice,10,C&O,IPO,67 -BUY_SHARE_LOG,Bob,10,NYC,IPO,82 -PASSES,Charlie -BUY_SHARE_LOG,Alice,10,C&O,IPO,67 -BUY_SHARE_LOG,Bob,10,NYC,IPO,82 -PASSES,Charlie -BUY_SHARE_LOG,Alice,10,C&O,IPO,67 -FloatsWithCash,C&O,670 -BUY_SHARE_LOG,Bob,10,NYC,IPO,82 -FloatsWithCash,NYC,820 -PASSES,Charlie -PASSES,Alice -PASSES,Bob - -END_SR,2 -Has,B&O,640 -Has,C&O,670 -Has,NYC,820 -Has,NYNH,320 -Has,PRR,420 -Has,Alice,43 -Has,Bob,33 -Has,Charlie,55 -START_OR,2.1 -ReceivesFor,NYNH,5,SVNRR -ReceivesFor,PRR,10,C&StL -ReceivesFor,Charlie,15,D&H -ReceivesFor,NYNH,20,M&H -ReceivesFor,PRR,25,C&A - -CompanyOperates,PRR,Bob -LaysTileAt,PRR,57,H16,W -LAYS_TOKEN_ON,PRR,H16,40 -CompanyRevenue,PRR,30 -CompanyPaysOutFull,PRR,30 -Payout,Bob,18,6,10 -PRICE_MOVES_LOG,PRR,90,F1,100,G1 - -CompanyOperates,NYC,Bob -LaysTileAt,NYC,57,E19,SW -CompanyDoesNotPayDividend,NYC -PRICE_MOVES_LOG,NYC,82,G3,76,F3 -BuysTrain,NYC,3,IPO,180 - -CompanyOperates,NYNH,Alice -LaysTileAtFor,NYNH,57,F22,W,80 -LAYS_TOKEN_ON,NYNH,F22,40 -CompanyRevenue,NYNH,130 -CompanyPaysOutFull,NYNH,130 -Payout,Alice,65,5,10 -Payout,Charlie,13,1,10 -Payout,NYNH,13,1,10 -PRICE_MOVES_LOG,NYNH,82,F2,90,G2 - -CompanyOperates,B&O,Charlie -LaysTileAt,B&O,14,J14,NW -CompanyRevenue,B&O,130 -CompanyPaysOutFull,B&O,130 -Payout,Charlie,78,6,10 -Payout,B&O,13,1,10 -PRICE_MOVES_LOG,B&O,82,F2,90,G2 -BuysTrain,B&O,3,IPO,180 -BuysPrivateFromFor,B&O,D&H,Charlie,140 - -CompanyOperates,C&O,Alice -LaysTileAt,C&O,8,G5,W -CompanyDoesNotPayDividend,C&O -PRICE_MOVES_LOG,C&O,67,G6,65,F6 -BuysTrain,C&O,3,IPO,180 -All 3-trains are sold out, 4-trains now available - -EndOfOperatingRound,2.1 -ORWorthIncrease,Alice,2.1,93 -ORWorthIncrease,Bob,2.1,42 -ORWorthIncrease,Charlie,2.1,232 -Has,B&O,333 -Has,C&O,490 -Has,NYC,640 -Has,NYNH,238 -Has,PRR,415 -Has,Alice,108 -Has,Bob,51 -Has,Charlie,301 -START_OR,2.2 -ReceivesFor,NYNH,5,SVNRR -ReceivesFor,PRR,10,C&StL -ReceivesFor,B&O,15,D&H -ReceivesFor,NYNH,20,M&H -ReceivesFor,PRR,25,C&A - -CompanyOperates,PRR,Bob -LaysTileAt,PRR,59,H18,W -LaysTileAt,PRR,58,B20,SW -CompanyRevenue,PRR,60 -CompanyPaysOutFull,PRR,60 -Payout,Bob,36,6,10 -PRICE_MOVES_LOG,PRR,100,G1,112,H1 -BuysTrain,PRR,4,IPO,300 -FirstTrainBought,4 -StartOfPhase,4 - -CompanyOperates,NYNH,Alice -LaysTileAtFor,NYNH,54,G19,SW,80 -CompanyRevenue,NYNH,90 -CompanyPaysOutFull,NYNH,90 -Payout,Alice,45,5,10 -Payout,Charlie,9,1,10 -Payout,NYNH,9,1,10 -PRICE_MOVES_LOG,NYNH,90,G2,100,H2 -BuysTrain,NYNH,4,PRR,191 - -CompanyOperates,B&O,Charlie -LaysTileAt,B&O,53,I15,SW -CompanyRevenue,B&O,110 -CompanyPaysOutFull,B&O,110 -Payout,Charlie,66,6,10 -Payout,B&O,11,1,10 -PRICE_MOVES_LOG,B&O,90,G2,100,H2 -BuysTrain,B&O,4,IPO,300 - -CompanyOperates,NYC,Bob -LaysTileAt,NYC,8,F18,NE -CompanyRevenue,NYC,80 -CompanyPaysOutFull,NYC,80 -Payout,Bob,48,6,10 -PRICE_MOVES_LOG,NYC,76,F3,82,G3 -BuysTrain,NYC,4,IPO,300 - -CompanyOperates,C&O,Alice -LaysTileAt,C&O,8,G3,NW -CompanyRevenue,C&O,70 -CompanyWithholds,C&O,70 -PRICE_MOVES_LOG,C&O,65,F6,58,E6 - -EndOfOperatingRound,2.2 -ORWorthIncrease,Alice,2.2,53 -ORWorthIncrease,Bob,2.2,192 -ORWorthIncrease,Charlie,2.2,145 -Has,B&O,59 -Has,C&O,560 -Has,NYC,340 -Has,NYNH,1 -Has,PRR,341 -Has,Alice,153 -Has,Bob,135 -Has,Charlie,376 -StartStockRound,3 -HasPriority,Charlie -BUY_SHARE_LOG,Charlie,10,NYNH,Pool,100 -SELL_SHARES_LOG,Alice,5,10,50,NYNH,500 -PRICE_MOVES_LOG,NYNH,100,H2,69,H7 -IS_NOW_PRES_OF,Charlie,NYNH +GameIs,1830 +PlayerIs,1,Alice +PlayerIs,2,Bob +PlayerIs,3,Charlie +PlayerCash,800 +BankHas,9600 +StartOfPhase,2 +BankSizeIs,9600 +StartOfInitialRound +HasPriority,Alice +BuysItemFor,Alice,SVNRR,20 +BuysItemFor,Bob,C&StL,40 +BuysItemFor,Charlie,D&H,70 +BuysItemFor,Alice,M&H,110 +BuysItemFor,Bob,C&A,160 +ALSO_GETS,Bob,CERT_NAME,PRR,10 +BuysItemFor,Charlie,B&O,220 +ALSO_GETS,Charlie,PRES_CERT_NAME,B&O,20 +Has,Alice,670 +Has,Bob,600 +Has,Charlie,510 +StartStockRound,1 +HasPriority,Alice +START_COMPANY_LOG,Alice,NYNH,100,200,2,20,BANK +START_COMPANY_LOG,Bob,PRR,100,200,2,20,BANK +BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 +BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 +BUY_SHARE_LOG,Bob,10,PRR,IPO,100 +BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 +BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 +BUY_SHARE_LOG,Bob,10,PRR,IPO,100 +BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 +BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 +BUY_SHARE_LOG,Bob,10,PRR,IPO,100 +FloatsWithCash,PRR,1000 +BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 +FloatsWithCash,B&O,1000 +BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 +FloatsWithCash,NYNH,1000 +BUY_SHARE_LOG,Bob,10,B&O,IPO,100 +BUY_SHARE_LOG,Charlie,10,NYNH,IPO,100 +PASSES,Alice +PASSES,Bob +PASSES,Charlie + +END_SR,1 +Has,B&O,1000 +Has,NYNH,1000 +Has,PRR,1000 +Has,Alice,70 +Has,Bob,0 +Has,Charlie,10 +START_OR,1.1 +ReceivesFor,Alice,5,SVNRR +ReceivesFor,Bob,10,C&StL +ReceivesFor,Charlie,15,D&H +ReceivesFor,Alice,20,M&H +ReceivesFor,Bob,25,C&A +ReceivesFor,Charlie,30,B&O + +CompanyOperates,B&O,Charlie +LaysTileAtFor,B&O,57,J14,SW,80 +LAYS_TOKEN_ON,B&O,J14,40 +CompanyDoesNotPayDividend,B&O +PRICE_MOVES_LOG,B&O,100,G1,90,F1 +BuysTrain,B&O,2,IPO,80 +PrivateCloses,B&O +FirstTrainBought,2 +BuysTrain,B&O,2,IPO,80 +BuysTrain,B&O,2,IPO,80 + +CompanyOperates,NYNH,Alice +LaysTileAt,NYNH,1,F20,SW +CompanyDoesNotPayDividend,NYNH +PRICE_MOVES_LOG,NYNH,100,G1,90,F1 +BuysTrain,NYNH,2,IPO,80 +BuysTrain,NYNH,2,IPO,80 +BuysTrain,NYNH,2,IPO,80 +All 2-trains are sold out, 3-trains now available +BuysTrain,NYNH,3,IPO,180 +FirstTrainBought,3 +StartOfPhase,3 +BuysPrivateFromFor,NYNH,SVNRR,Alice,40 +BuysPrivateFromFor,NYNH,M&H,Alice,220 + +CompanyOperates,PRR,Bob +LaysTileAt,PRR,9,H14,W +CompanyDoesNotPayDividend,PRR +PRICE_MOVES_LOG,PRR,100,G1,90,F1 +BuysTrain,PRR,3,IPO,180 +BuysPrivateFromFor,PRR,C&StL,Bob,80 +BuysPrivateFromFor,PRR,C&A,Bob,320 + +EndOfOperatingRound,1.1 +ORWorthIncrease,Alice,1.1,95 +ORWorthIncrease,Bob,1.1,165 +ORWorthIncrease,Charlie,1.1,-245 +Has,B&O,640 +Has,NYNH,320 +Has,PRR,420 +Has,Alice,355 +Has,Bob,435 +Has,Charlie,55 +StartStockRound,2 +HasPriority,Alice +SELL_SHARE_LOG,Alice,10,NYNH,90 +PRICE_MOVES_LOG,NYNH,90,F1,82,F2 +START_COMPANY_LOG,Alice,C&O,67,134,2,20,BANK +SELL_SHARE_LOG,Bob,10,B&O,90 +PRICE_MOVES_LOG,B&O,90,F1,82,F2 +START_COMPANY_LOG,Bob,NYC,82,164,2,20,BANK +PASSES,Charlie +BUY_SHARE_LOG,Alice,10,C&O,IPO,67 +BUY_SHARE_LOG,Bob,10,NYC,IPO,82 +PASSES,Charlie +BUY_SHARE_LOG,Alice,10,C&O,IPO,67 +BUY_SHARE_LOG,Bob,10,NYC,IPO,82 +PASSES,Charlie +BUY_SHARE_LOG,Alice,10,C&O,IPO,67 +BUY_SHARE_LOG,Bob,10,NYC,IPO,82 +PASSES,Charlie +BUY_SHARE_LOG,Alice,10,C&O,IPO,67 +FloatsWithCash,C&O,670 +BUY_SHARE_LOG,Bob,10,NYC,IPO,82 +FloatsWithCash,NYC,820 +PASSES,Charlie +PASSES,Alice +PASSES,Bob + +END_SR,2 +Has,B&O,640 +Has,C&O,670 +Has,NYC,820 +Has,NYNH,320 +Has,PRR,420 +Has,Alice,43 +Has,Bob,33 +Has,Charlie,55 +START_OR,2.1 +ReceivesFor,NYNH,5,SVNRR +ReceivesFor,PRR,10,C&StL +ReceivesFor,Charlie,15,D&H +ReceivesFor,NYNH,20,M&H +ReceivesFor,PRR,25,C&A + +CompanyOperates,PRR,Bob +LaysTileAt,PRR,57,H16,W +LAYS_TOKEN_ON,PRR,H16,40 +CompanyRevenue,PRR,30 +CompanyPaysOutFull,PRR,30 +Payout,Bob,18,6,10 +PRICE_MOVES_LOG,PRR,90,F1,100,G1 + +CompanyOperates,NYC,Bob +LaysTileAt,NYC,57,E19,SW +CompanyDoesNotPayDividend,NYC +PRICE_MOVES_LOG,NYC,82,G3,76,F3 +BuysTrain,NYC,3,IPO,180 + +CompanyOperates,NYNH,Alice +LaysTileAtFor,NYNH,57,F22,W,80 +LAYS_TOKEN_ON,NYNH,F22,40 +CompanyRevenue,NYNH,130 +CompanyPaysOutFull,NYNH,130 +Payout,Alice,65,5,10 +Payout,Charlie,13,1,10 +Payout,NYNH,13,1,10 +PRICE_MOVES_LOG,NYNH,82,F2,90,G2 + +CompanyOperates,B&O,Charlie +LaysTileAt,B&O,14,J14,NW +CompanyRevenue,B&O,130 +CompanyPaysOutFull,B&O,130 +Payout,Charlie,78,6,10 +Payout,B&O,13,1,10 +PRICE_MOVES_LOG,B&O,82,F2,90,G2 +BuysTrain,B&O,3,IPO,180 +BuysPrivateFromFor,B&O,D&H,Charlie,140 + +CompanyOperates,C&O,Alice +LaysTileAt,C&O,8,G5,W +CompanyDoesNotPayDividend,C&O +PRICE_MOVES_LOG,C&O,67,G6,65,F6 +BuysTrain,C&O,3,IPO,180 +All 3-trains are sold out, 4-trains now available + +EndOfOperatingRound,2.1 +ORWorthIncrease,Alice,2.1,93 +ORWorthIncrease,Bob,2.1,42 +ORWorthIncrease,Charlie,2.1,232 +Has,B&O,333 +Has,C&O,490 +Has,NYC,640 +Has,NYNH,238 +Has,PRR,415 +Has,Alice,108 +Has,Bob,51 +Has,Charlie,301 +START_OR,2.2 +ReceivesFor,NYNH,5,SVNRR +ReceivesFor,PRR,10,C&StL +ReceivesFor,B&O,15,D&H +ReceivesFor,NYNH,20,M&H +ReceivesFor,PRR,25,C&A + +CompanyOperates,PRR,Bob +LaysTileAt,PRR,59,H18,W +LaysTileAt,PRR,58,B20,SW +CompanyRevenue,PRR,60 +CompanyPaysOutFull,PRR,60 +Payout,Bob,36,6,10 +PRICE_MOVES_LOG,PRR,100,G1,112,H1 +BuysTrain,PRR,4,IPO,300 +FirstTrainBought,4 +StartOfPhase,4 +TrainsRusted,2 + +CompanyOperates,NYNH,Alice +LaysTileAtFor,NYNH,54,G19,SW,80 +CompanyRevenue,NYNH,90 +CompanyPaysOutFull,NYNH,90 +Payout,Alice,45,5,10 +Payout,Charlie,9,1,10 +Payout,NYNH,9,1,10 +PRICE_MOVES_LOG,NYNH,90,G2,100,H2 +BuysTrain,NYNH,4,PRR,191 + +CompanyOperates,B&O,Charlie +LaysTileAt,B&O,53,I15,SW +CompanyRevenue,B&O,110 +CompanyPaysOutFull,B&O,110 +Payout,Charlie,66,6,10 +Payout,B&O,11,1,10 +PRICE_MOVES_LOG,B&O,90,G2,100,H2 +BuysTrain,B&O,4,IPO,300 + +CompanyOperates,NYC,Bob +LaysTileAt,NYC,8,F18,NE +CompanyRevenue,NYC,80 +CompanyPaysOutFull,NYC,80 +Payout,Bob,48,6,10 +PRICE_MOVES_LOG,NYC,76,F3,82,G3 +BuysTrain,NYC,4,IPO,300 + +CompanyOperates,C&O,Alice +LaysTileAt,C&O,8,G3,NW +CompanyRevenue,C&O,70 +CompanyWithholds,C&O,70 +PRICE_MOVES_LOG,C&O,65,F6,58,E6 + +EndOfOperatingRound,2.2 +ORWorthIncrease,Alice,2.2,53 +ORWorthIncrease,Bob,2.2,192 +ORWorthIncrease,Charlie,2.2,145 +Has,B&O,59 +Has,C&O,560 +Has,NYC,340 +Has,NYNH,1 +Has,PRR,341 +Has,Alice,153 +Has,Bob,135 +Has,Charlie,376 +StartStockRound,3 +HasPriority,Charlie +BUY_SHARE_LOG,Charlie,10,NYNH,Pool,100 +SELL_SHARES_LOG,Alice,5,10,50,NYNH,500 +PRICE_MOVES_LOG,NYNH,100,H2,69,H7 +IS_NOW_PRES_OF,Charlie,NYNH diff --git a/test/data/test/1830_SellHalfPresCert.report b/test/data/test/1830_SellHalfPresCert.report index 956167d..07739a2 100644 --- a/test/data/test/1830_SellHalfPresCert.report +++ b/test/data/test/1830_SellHalfPresCert.report @@ -1,267 +1,268 @@ -GameIs,1830 -PlayerIs,1,Alice -PlayerIs,2,Bob -PlayerIs,3,Charlie -PlayerCash,800 -BankHas,9600 -StartOfPhase,2 -BankSizeIs,9600 -StartOfInitialRound -HasPriority,Alice -BuysItemFor,Alice,SVNRR,20 -BuysItemFor,Bob,C&StL,40 -BuysItemFor,Charlie,D&H,70 -BuysItemFor,Alice,M&H,110 -BuysItemFor,Bob,C&A,160 -ALSO_GETS,Bob,CERT_NAME,PRR,10 -BuysItemFor,Charlie,B&O,220 -ALSO_GETS,Charlie,PRES_CERT_NAME,B&O,20 -Has,Alice,670 -Has,Bob,600 -Has,Charlie,510 -StartStockRound,1 -HasPriority,Alice -START_COMPANY_LOG,Alice,NYNH,100,200,2,20,BANK -START_COMPANY_LOG,Bob,PRR,100,200,2,20,BANK -BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 -BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 -BUY_SHARE_LOG,Bob,10,PRR,IPO,100 -BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 -BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 -BUY_SHARE_LOG,Bob,10,PRR,IPO,100 -BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 -BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 -BUY_SHARE_LOG,Bob,10,PRR,IPO,100 -FloatsWithCash,PRR,1000 -BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 -FloatsWithCash,B&O,1000 -BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 -FloatsWithCash,NYNH,1000 -BUY_SHARE_LOG,Bob,10,B&O,IPO,100 -BUY_SHARE_LOG,Charlie,10,NYNH,IPO,100 -PASSES,Alice -PASSES,Bob -PASSES,Charlie - -END_SR,1 -Has,B&O,1000 -Has,NYNH,1000 -Has,PRR,1000 -Has,Alice,70 -Has,Bob,0 -Has,Charlie,10 -START_OR,1.1 -ReceivesFor,Alice,5,SVNRR -ReceivesFor,Bob,10,C&StL -ReceivesFor,Charlie,15,D&H -ReceivesFor,Alice,20,M&H -ReceivesFor,Bob,25,C&A -ReceivesFor,Charlie,30,B&O - -CompanyOperates,B&O,Charlie -LaysTileAtFor,B&O,57,J14,SW,80 -LAYS_TOKEN_ON,B&O,J14,40 -CompanyDoesNotPayDividend,B&O -PRICE_MOVES_LOG,B&O,100,G1,90,F1 -BuysTrain,B&O,2,IPO,80 -PrivateCloses,B&O -FirstTrainBought,2 -BuysTrain,B&O,2,IPO,80 -BuysTrain,B&O,2,IPO,80 - -CompanyOperates,NYNH,Alice -LaysTileAt,NYNH,1,F20,SW -CompanyDoesNotPayDividend,NYNH -PRICE_MOVES_LOG,NYNH,100,G1,90,F1 -BuysTrain,NYNH,2,IPO,80 -BuysTrain,NYNH,2,IPO,80 -BuysTrain,NYNH,2,IPO,80 -All 2-trains are sold out, 3-trains now available -BuysTrain,NYNH,3,IPO,180 -FirstTrainBought,3 -StartOfPhase,3 -BuysPrivateFromFor,NYNH,SVNRR,Alice,40 -BuysPrivateFromFor,NYNH,M&H,Alice,220 - -CompanyOperates,PRR,Bob -LaysTileAt,PRR,9,H14,W -CompanyDoesNotPayDividend,PRR -PRICE_MOVES_LOG,PRR,100,G1,90,F1 -BuysTrain,PRR,3,IPO,180 -BuysPrivateFromFor,PRR,C&StL,Bob,80 -BuysPrivateFromFor,PRR,C&A,Bob,320 - -EndOfOperatingRound,1.1 -ORWorthIncrease,Alice,1.1,95 -ORWorthIncrease,Bob,1.1,165 -ORWorthIncrease,Charlie,1.1,-245 -Has,B&O,640 -Has,NYNH,320 -Has,PRR,420 -Has,Alice,355 -Has,Bob,435 -Has,Charlie,55 -StartStockRound,2 -HasPriority,Alice -SELL_SHARE_LOG,Alice,10,NYNH,90 -PRICE_MOVES_LOG,NYNH,90,F1,82,F2 -START_COMPANY_LOG,Alice,C&O,67,134,2,20,BANK -SELL_SHARE_LOG,Bob,10,B&O,90 -PRICE_MOVES_LOG,B&O,90,F1,82,F2 -START_COMPANY_LOG,Bob,NYC,82,164,2,20,BANK -PASSES,Charlie -BUY_SHARE_LOG,Alice,10,C&O,IPO,67 -BUY_SHARE_LOG,Bob,10,NYC,IPO,82 -PASSES,Charlie -BUY_SHARE_LOG,Alice,10,C&O,IPO,67 -BUY_SHARE_LOG,Bob,10,NYC,IPO,82 -PASSES,Charlie -BUY_SHARE_LOG,Alice,10,C&O,IPO,67 -BUY_SHARE_LOG,Bob,10,NYC,IPO,82 -PASSES,Charlie -BUY_SHARE_LOG,Alice,10,C&O,IPO,67 -FloatsWithCash,C&O,670 -BUY_SHARE_LOG,Bob,10,NYC,IPO,82 -FloatsWithCash,NYC,820 -PASSES,Charlie -PASSES,Alice -PASSES,Bob - -END_SR,2 -Has,B&O,640 -Has,C&O,670 -Has,NYC,820 -Has,NYNH,320 -Has,PRR,420 -Has,Alice,43 -Has,Bob,33 -Has,Charlie,55 -START_OR,2.1 -ReceivesFor,NYNH,5,SVNRR -ReceivesFor,PRR,10,C&StL -ReceivesFor,Charlie,15,D&H -ReceivesFor,NYNH,20,M&H -ReceivesFor,PRR,25,C&A - -CompanyOperates,PRR,Bob -LaysTileAt,PRR,57,H16,W -LAYS_TOKEN_ON,PRR,H16,40 -CompanyRevenue,PRR,30 -CompanyPaysOutFull,PRR,30 -Payout,Bob,18,6,10 -PRICE_MOVES_LOG,PRR,90,F1,100,G1 - -CompanyOperates,NYC,Bob -LaysTileAt,NYC,57,E19,SW -CompanyDoesNotPayDividend,NYC -PRICE_MOVES_LOG,NYC,82,G3,76,F3 -BuysTrain,NYC,3,IPO,180 - -CompanyOperates,NYNH,Alice -LaysTileAtFor,NYNH,57,F22,W,80 -LAYS_TOKEN_ON,NYNH,F22,40 -CompanyRevenue,NYNH,130 -CompanyPaysOutFull,NYNH,130 -Payout,Alice,65,5,10 -Payout,Charlie,13,1,10 -Payout,NYNH,13,1,10 -PRICE_MOVES_LOG,NYNH,82,F2,90,G2 - -CompanyOperates,B&O,Charlie -LaysTileAt,B&O,14,J14,NW -CompanyRevenue,B&O,130 -CompanyPaysOutFull,B&O,130 -Payout,Charlie,78,6,10 -Payout,B&O,13,1,10 -PRICE_MOVES_LOG,B&O,82,F2,90,G2 -BuysTrain,B&O,3,IPO,180 -BuysPrivateFromFor,B&O,D&H,Charlie,140 - -CompanyOperates,C&O,Alice -LaysTileAt,C&O,8,G5,W -CompanyDoesNotPayDividend,C&O -PRICE_MOVES_LOG,C&O,67,G6,65,F6 -BuysTrain,C&O,3,IPO,180 -All 3-trains are sold out, 4-trains now available - -EndOfOperatingRound,2.1 -ORWorthIncrease,Alice,2.1,93 -ORWorthIncrease,Bob,2.1,42 -ORWorthIncrease,Charlie,2.1,232 -Has,B&O,333 -Has,C&O,490 -Has,NYC,640 -Has,NYNH,238 -Has,PRR,415 -Has,Alice,108 -Has,Bob,51 -Has,Charlie,301 -START_OR,2.2 -ReceivesFor,NYNH,5,SVNRR -ReceivesFor,PRR,10,C&StL -ReceivesFor,B&O,15,D&H -ReceivesFor,NYNH,20,M&H -ReceivesFor,PRR,25,C&A - -CompanyOperates,PRR,Bob -LaysTileAt,PRR,59,H18,W -LaysTileAt,PRR,58,B20,SW -CompanyRevenue,PRR,60 -CompanyPaysOutFull,PRR,60 -Payout,Bob,36,6,10 -PRICE_MOVES_LOG,PRR,100,G1,112,H1 -BuysTrain,PRR,4,IPO,300 -FirstTrainBought,4 -StartOfPhase,4 - -CompanyOperates,NYNH,Alice -LaysTileAtFor,NYNH,54,G19,SW,80 -CompanyRevenue,NYNH,90 -CompanyPaysOutFull,NYNH,90 -Payout,Alice,45,5,10 -Payout,Charlie,9,1,10 -Payout,NYNH,9,1,10 -PRICE_MOVES_LOG,NYNH,90,G2,100,H2 -BuysTrain,NYNH,4,PRR,191 - -CompanyOperates,B&O,Charlie -LaysTileAt,B&O,53,I15,SW -CompanyRevenue,B&O,110 -CompanyPaysOutFull,B&O,110 -Payout,Charlie,66,6,10 -Payout,B&O,11,1,10 -PRICE_MOVES_LOG,B&O,90,G2,100,H2 -BuysTrain,B&O,4,IPO,300 - -CompanyOperates,NYC,Bob -LaysTileAt,NYC,8,F18,NE -CompanyRevenue,NYC,80 -CompanyPaysOutFull,NYC,80 -Payout,Bob,48,6,10 -PRICE_MOVES_LOG,NYC,76,F3,82,G3 -BuysTrain,NYC,4,IPO,300 - -CompanyOperates,C&O,Alice -LaysTileAt,C&O,8,G3,NW -CompanyRevenue,C&O,70 -CompanyWithholds,C&O,70 -PRICE_MOVES_LOG,C&O,65,F6,58,E6 - -EndOfOperatingRound,2.2 -ORWorthIncrease,Alice,2.2,53 -ORWorthIncrease,Bob,2.2,192 -ORWorthIncrease,Charlie,2.2,145 -Has,B&O,59 -Has,C&O,560 -Has,NYC,340 -Has,NYNH,1 -Has,PRR,341 -Has,Alice,153 -Has,Bob,135 -Has,Charlie,376 -StartStockRound,3 -HasPriority,Charlie -BUY_SHARE_LOG,Charlie,10,NYNH,Pool,100 -SELL_SHARES_LOG,Alice,4,10,40,NYNH,400 -PRICE_MOVES_LOG,NYNH,100,H2,71,H6 -IS_NOW_PRES_OF,Charlie,NYNH +GameIs,1830 +PlayerIs,1,Alice +PlayerIs,2,Bob +PlayerIs,3,Charlie +PlayerCash,800 +BankHas,9600 +StartOfPhase,2 +BankSizeIs,9600 +StartOfInitialRound +HasPriority,Alice +BuysItemFor,Alice,SVNRR,20 +BuysItemFor,Bob,C&StL,40 +BuysItemFor,Charlie,D&H,70 +BuysItemFor,Alice,M&H,110 +BuysItemFor,Bob,C&A,160 +ALSO_GETS,Bob,CERT_NAME,PRR,10 +BuysItemFor,Charlie,B&O,220 +ALSO_GETS,Charlie,PRES_CERT_NAME,B&O,20 +Has,Alice,670 +Has,Bob,600 +Has,Charlie,510 +StartStockRound,1 +HasPriority,Alice +START_COMPANY_LOG,Alice,NYNH,100,200,2,20,BANK +START_COMPANY_LOG,Bob,PRR,100,200,2,20,BANK +BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 +BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 +BUY_SHARE_LOG,Bob,10,PRR,IPO,100 +BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 +BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 +BUY_SHARE_LOG,Bob,10,PRR,IPO,100 +BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 +BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 +BUY_SHARE_LOG,Bob,10,PRR,IPO,100 +FloatsWithCash,PRR,1000 +BUY_SHARE_LOG,Charlie,10,B&O,IPO,100 +FloatsWithCash,B&O,1000 +BUY_SHARE_LOG,Alice,10,NYNH,IPO,100 +FloatsWithCash,NYNH,1000 +BUY_SHARE_LOG,Bob,10,B&O,IPO,100 +BUY_SHARE_LOG,Charlie,10,NYNH,IPO,100 +PASSES,Alice +PASSES,Bob +PASSES,Charlie + +END_SR,1 +Has,B&O,1000 +Has,NYNH,1000 +Has,PRR,1000 +Has,Alice,70 +Has,Bob,0 +Has,Charlie,10 +START_OR,1.1 +ReceivesFor,Alice,5,SVNRR +ReceivesFor,Bob,10,C&StL +ReceivesFor,Charlie,15,D&H +ReceivesFor,Alice,20,M&H +ReceivesFor,Bob,25,C&A +ReceivesFor,Charlie,30,B&O + +CompanyOperates,B&O,Charlie +LaysTileAtFor,B&O,57,J14,SW,80 +LAYS_TOKEN_ON,B&O,J14,40 +CompanyDoesNotPayDividend,B&O +PRICE_MOVES_LOG,B&O,100,G1,90,F1 +BuysTrain,B&O,2,IPO,80 +PrivateCloses,B&O +FirstTrainBought,2 +BuysTrain,B&O,2,IPO,80 +BuysTrain,B&O,2,IPO,80 + +CompanyOperates,NYNH,Alice +LaysTileAt,NYNH,1,F20,SW +CompanyDoesNotPayDividend,NYNH +PRICE_MOVES_LOG,NYNH,100,G1,90,F1 +BuysTrain,NYNH,2,IPO,80 +BuysTrain,NYNH,2,IPO,80 +BuysTrain,NYNH,2,IPO,80 +All 2-trains are sold out, 3-trains now available +BuysTrain,NYNH,3,IPO,180 +FirstTrainBought,3 +StartOfPhase,3 +BuysPrivateFromFor,NYNH,SVNRR,Alice,40 +BuysPrivateFromFor,NYNH,M&H,Alice,220 + +CompanyOperates,PRR,Bob +LaysTileAt,PRR,9,H14,W +CompanyDoesNotPayDividend,PRR +PRICE_MOVES_LOG,PRR,100,G1,90,F1 +BuysTrain,PRR,3,IPO,180 +BuysPrivateFromFor,PRR,C&StL,Bob,80 +BuysPrivateFromFor,PRR,C&A,Bob,320 + +EndOfOperatingRound,1.1 +ORWorthIncrease,Alice,1.1,95 +ORWorthIncrease,Bob,1.1,165 +ORWorthIncrease,Charlie,1.1,-245 +Has,B&O,640 +Has,NYNH,320 +Has,PRR,420 +Has,Alice,355 +Has,Bob,435 +Has,Charlie,55 +StartStockRound,2 +HasPriority,Alice +SELL_SHARE_LOG,Alice,10,NYNH,90 +PRICE_MOVES_LOG,NYNH,90,F1,82,F2 +START_COMPANY_LOG,Alice,C&O,67,134,2,20,BANK +SELL_SHARE_LOG,Bob,10,B&O,90 +PRICE_MOVES_LOG,B&O,90,F1,82,F2 +START_COMPANY_LOG,Bob,NYC,82,164,2,20,BANK +PASSES,Charlie +BUY_SHARE_LOG,Alice,10,C&O,IPO,67 +BUY_SHARE_LOG,Bob,10,NYC,IPO,82 +PASSES,Charlie +BUY_SHARE_LOG,Alice,10,C&O,IPO,67 +BUY_SHARE_LOG,Bob,10,NYC,IPO,82 +PASSES,Charlie +BUY_SHARE_LOG,Alice,10,C&O,IPO,67 +BUY_SHARE_LOG,Bob,10,NYC,IPO,82 +PASSES,Charlie +BUY_SHARE_LOG,Alice,10,C&O,IPO,67 +FloatsWithCash,C&O,670 +BUY_SHARE_LOG,Bob,10,NYC,IPO,82 +FloatsWithCash,NYC,820 +PASSES,Charlie +PASSES,Alice +PASSES,Bob + +END_SR,2 +Has,B&O,640 +Has,C&O,670 +Has,NYC,820 +Has,NYNH,320 +Has,PRR,420 +Has,Alice,43 +Has,Bob,33 +Has,Charlie,55 +START_OR,2.1 +ReceivesFor,NYNH,5,SVNRR +ReceivesFor,PRR,10,C&StL +ReceivesFor,Charlie,15,D&H +ReceivesFor,NYNH,20,M&H +ReceivesFor,PRR,25,C&A + +CompanyOperates,PRR,Bob +LaysTileAt,PRR,57,H16,W +LAYS_TOKEN_ON,PRR,H16,40 +CompanyRevenue,PRR,30 +CompanyPaysOutFull,PRR,30 +Payout,Bob,18,6,10 +PRICE_MOVES_LOG,PRR,90,F1,100,G1 + +CompanyOperates,NYC,Bob +LaysTileAt,NYC,57,E19,SW +CompanyDoesNotPayDividend,NYC +PRICE_MOVES_LOG,NYC,82,G3,76,F3 +BuysTrain,NYC,3,IPO,180 + +CompanyOperates,NYNH,Alice +LaysTileAtFor,NYNH,57,F22,W,80 +LAYS_TOKEN_ON,NYNH,F22,40 +CompanyRevenue,NYNH,130 +CompanyPaysOutFull,NYNH,130 +Payout,Alice,65,5,10 +Payout,Charlie,13,1,10 +Payout,NYNH,13,1,10 +PRICE_MOVES_LOG,NYNH,82,F2,90,G2 + +CompanyOperates,B&O,Charlie +LaysTileAt,B&O,14,J14,NW +CompanyRevenue,B&O,130 +CompanyPaysOutFull,B&O,130 +Payout,Charlie,78,6,10 +Payout,B&O,13,1,10 +PRICE_MOVES_LOG,B&O,82,F2,90,G2 +BuysTrain,B&O,3,IPO,180 +BuysPrivateFromFor,B&O,D&H,Charlie,140 + +CompanyOperates,C&O,Alice +LaysTileAt,C&O,8,G5,W +CompanyDoesNotPayDividend,C&O +PRICE_MOVES_LOG,C&O,67,G6,65,F6 +BuysTrain,C&O,3,IPO,180 +All 3-trains are sold out, 4-trains now available + +EndOfOperatingRound,2.1 +ORWorthIncrease,Alice,2.1,93 +ORWorthIncrease,Bob,2.1,42 +ORWorthIncrease,Charlie,2.1,232 +Has,B&O,333 +Has,C&O,490 +Has,NYC,640 +Has,NYNH,238 +Has,PRR,415 +Has,Alice,108 +Has,Bob,51 +Has,Charlie,301 +START_OR,2.2 +ReceivesFor,NYNH,5,SVNRR +ReceivesFor,PRR,10,C&StL +ReceivesFor,B&O,15,D&H +ReceivesFor,NYNH,20,M&H +ReceivesFor,PRR,25,C&A + +CompanyOperates,PRR,Bob +LaysTileAt,PRR,59,H18,W +LaysTileAt,PRR,58,B20,SW +CompanyRevenue,PRR,60 +CompanyPaysOutFull,PRR,60 +Payout,Bob,36,6,10 +PRICE_MOVES_LOG,PRR,100,G1,112,H1 +BuysTrain,PRR,4,IPO,300 +FirstTrainBought,4 +StartOfPhase,4 +TrainsRusted,2 + +CompanyOperates,NYNH,Alice +LaysTileAtFor,NYNH,54,G19,SW,80 +CompanyRevenue,NYNH,90 +CompanyPaysOutFull,NYNH,90 +Payout,Alice,45,5,10 +Payout,Charlie,9,1,10 +Payout,NYNH,9,1,10 +PRICE_MOVES_LOG,NYNH,90,G2,100,H2 +BuysTrain,NYNH,4,PRR,191 + +CompanyOperates,B&O,Charlie +LaysTileAt,B&O,53,I15,SW +CompanyRevenue,B&O,110 +CompanyPaysOutFull,B&O,110 +Payout,Charlie,66,6,10 +Payout,B&O,11,1,10 +PRICE_MOVES_LOG,B&O,90,G2,100,H2 +BuysTrain,B&O,4,IPO,300 + +CompanyOperates,NYC,Bob +LaysTileAt,NYC,8,F18,NE +CompanyRevenue,NYC,80 +CompanyPaysOutFull,NYC,80 +Payout,Bob,48,6,10 +PRICE_MOVES_LOG,NYC,76,F3,82,G3 +BuysTrain,NYC,4,IPO,300 + +CompanyOperates,C&O,Alice +LaysTileAt,C&O,8,G3,NW +CompanyRevenue,C&O,70 +CompanyWithholds,C&O,70 +PRICE_MOVES_LOG,C&O,65,F6,58,E6 + +EndOfOperatingRound,2.2 +ORWorthIncrease,Alice,2.2,53 +ORWorthIncrease,Bob,2.2,192 +ORWorthIncrease,Charlie,2.2,145 +Has,B&O,59 +Has,C&O,560 +Has,NYC,340 +Has,NYNH,1 +Has,PRR,341 +Has,Alice,153 +Has,Bob,135 +Has,Charlie,376 +StartStockRound,3 +HasPriority,Charlie +BUY_SHARE_LOG,Charlie,10,NYNH,Pool,100 +SELL_SHARES_LOG,Alice,4,10,40,NYNH,400 +PRICE_MOVES_LOG,NYNH,100,H2,71,H6 +IS_NOW_PRES_OF,Charlie,NYNH diff --git a/test/data/test/1835_NatDoubleShare.report b/test/data/test/1835_NatDoubleShare.report index a6a0a67..73fc9e4 100644 --- a/test/data/test/1835_NatDoubleShare.report +++ b/test/data/test/1835_NatDoubleShare.report @@ -1,884 +1,884 @@ -GameIs,1835 -PlayerIs,1,T1 -PlayerIs,2,T2 -PlayerIs,3,T3 -PlayerCash,600 -BankHas,10200 -StartOfPhase,2 -BankSizeIs,10200 -StartOfInitialRound -HasPriority,T1 -BuysItemFor,T3,M5,80 -FloatsWithCash,M5,80 -BuysItemFor,T2,M1,80 -FloatsWithCash,M1,80 -BuysItemFor,T1,M3,80 -FloatsWithCash,M3,80 -BuysItemFor,T1,M6,80 -FloatsWithCash,M6,80 -BuysItemFor,T2,M2,170 -FloatsWithCash,M2,170 -BuysItemFor,T3,PRES_CERT_NAME,BY,20,184 -BuysItemFor,T1,LD,190 -ALSO_GETS,T1,PRES_CERT_NAME,SX,20 -BuysItemFor,T2,HB,160 -BuysItemFor,T3,OBB,120 -ALSO_GETS,T3,CERT_NAME,BY,10 -BuysItemFor,T1,BB,130 -BuysItemFor,T2,NF,100 -ALSO_GETS,T2,CERT_NAME,BY,10 -BuysItemFor,T3,M4,160 -FloatsWithCash,M4,160 -CannotBuyAnything,T1 -CannotBuyAnything,T2 -CannotBuyAnything,T3 -Has,M1,80 -Has,M2,170 -Has,M3,80 -Has,M4,160 -Has,M5,80 -Has,M6,80 -Has,T1,120 -Has,T2,90 -Has,T3,56 -START_OR,0.0 -ReceivesFor,T2,5,NF -ReceivesFor,T3,10,OBB -ReceivesFor,T1,20,LD -ReceivesFor,T1,25,BB -ReceivesFor,T2,30,HB -ShortORExecuted -Has,M1,80 -Has,M2,170 -Has,M3,80 -Has,M4,160 -Has,M5,80 -Has,M6,80 -Has,T1,165 -Has,T2,125 -Has,T3,66 -StartOfInitialRound -HasPriority,T1 -CannotBuyAnything,T3 -BuysItemFor,T1,PfB,150 -ALSO_GETS,T1,CERT_NAME,BY,10 -FloatsWithCash,BY,460 -Has,M1,80 -Has,M2,170 -Has,M3,80 -Has,M4,160 -Has,M5,80 -Has,M6,80 -Has,BY,460 -Has,T1,15 -Has,T2,125 -Has,T3,66 -StartStockRound,1 -HasPriority,T2 -BUY_SHARE_LOG,T2,10,BY,IPO,92 -PriceIsPaidTo,92,BY -PASSES,T3 -PASSES,T1 -PASSES,T2 - -END_SR,1 -Has,M1,80 -Has,M2,170 -Has,M3,80 -Has,M4,160 -Has,M5,80 -Has,M6,80 -Has,BY,552 -Has,T1,15 -Has,T2,33 -Has,T3,66 -START_OR,1.1 -ReceivesFor,T2,5,NF -ReceivesFor,T3,10,OBB -ReceivesFor,T1,15,PfB -ReceivesFor,T1,20,LD -ReceivesFor,T1,25,BB -ReceivesFor,T2,30,HB - -CompanyOperates,M1,T2 -LaysTileAt,M1,201,H2,SW -CompanyDoesNotPayDividend,M1 -BuysTrain,M1,2,IPO,80 -FirstTrainBought,2 - -CompanyOperates,M2,T2 -LaysTileAt,M2,8,E17,NW -CompanyDoesNotPayDividend,M2 -BuysTrain,M2,2,IPO,80 - -CompanyOperates,M3,T1 -LaysTileAt,M3,6,F14,NW -CompanyDoesNotPayDividend,M3 -BuysTrain,M3,2,IPO,80 - -CompanyOperates,M4,T3 -LaysTileAt,M4,57,G5,SW -CompanyDoesNotPayDividend,M4 -BuysTrain,M4,2,IPO,80 -BuysTrain,M4,2,IPO,80 - -CompanyOperates,M5,T3 -LaysTileAt,M5,8,D18,NE -CompanyDoesNotPayDividend,M5 -BuysTrain,M5,2,IPO,80 - -CompanyOperates,M6,T1 -LaysTileAt,M6,9,B10,NW -CompanyDoesNotPayDividend,M6 -BuysTrain,M6,2,IPO,80 - -CompanyOperates,BY,T3 -LaysTileAt,BY,202,O15,E -LaysTileAt,BY,8,O13,NW -CompanyDoesNotPayDividend,BY -PRICE_MOVES_LOG,BY,92,C3,86,B3 -BuysTrain,BY,2,IPO,80 -BuysTrain,BY,2,IPO,80 -All 2-trains are sold out, 2+2-trains now available -BuysTrain,BY,2+2,IPO,120 -FirstTrainBought,2+2 - -EndOfOperatingRound,1.1 -ORWorthIncrease,T1,1.1,54 -ORWorthIncrease,T2,1.1,23 -ORWorthIncrease,T3,1.1,-8 -Has,M1,0 -Has,M2,90 -Has,M3,0 -Has,M4,0 -Has,M5,0 -Has,M6,0 -Has,BY,272 -Has,T1,75 -Has,T2,68 -Has,T3,76 -StartStockRound,2 -HasPriority,T3 -PASSES,T3 -PASSES,T1 -PASSES,T2 - -END_SR,2 -Has,M1,0 -Has,M2,90 -Has,M3,0 -Has,M4,0 -Has,M5,0 -Has,M6,0 -Has,BY,272 -Has,T1,75 -Has,T2,68 -Has,T3,76 -START_OR,2.1 -ReceivesFor,T2,5,NF -ReceivesFor,T3,10,OBB -ReceivesFor,T1,15,PfB -ReceivesFor,T1,20,LD -ReceivesFor,T1,25,BB -ReceivesFor,T2,30,HB - -CompanyOperates,M1,T2 -LaysTileAt,M1,9,J2,NW -CompanyRevenue,M1,40 -CompanySplits,M1,40 -M1 receives 20 -Payout,T2,20,1,100 - -CompanyOperates,M2,T2 -LaysTileAt,M2,8,D16,SE -CompanyRevenue,M2,0 -CompanyDoesNotPayDividend,M2 - -CompanyOperates,M3,T1 -LaysTileAt,M3,4,G15,NW -CompanyRevenue,M3,40 -CompanySplits,M3,40 -M3 receives 20 -Payout,T1,20,1,100 - -CompanyOperates,M4,T3 -LaysTileAt,M4,2,H4,NE -CompanyRevenue,M4,30 -CompanySplits,M4,30 -M4 receives 15 -Payout,T3,15,1,100 - -CompanyOperates,M5,T3 -LaysTileAt,M5,8,C19,E -CompanyRevenue,M5,50 -CompanySplits,M5,50 -M5 receives 25 -Payout,T3,25,1,100 - -CompanyOperates,M6,T1 -LaysTileAt,M6,6,A11,NW -CompanyRevenue,M6,60 -CompanySplits,M6,60 -M6 receives 30 -Payout,T1,30,1,100 - -CompanyOperates,BY,T3 -LaysTileAt,BY,8,N16,SW -LaysTileAt,BY,4,M15,NW -LaysTileAt,BY,6,N12,NW -LAYS_TOKEN_ON,BY,L14,60 -CompanyRevenue,BY,130 -CompanyPaysOutFull,BY,130 -Payout,T1,13,1,10 -Payout,T2,26,2,10 -Payout,T3,39,3,10 -PRICE_MOVES_LOG,BY,86,B3,92,C3 - -EndOfOperatingRound,2.1 -ORWorthIncrease,T1,2.1,129 -ORWorthIncrease,T2,2.1,93 -ORWorthIncrease,T3,2.1,107 -Has,M1,20 -Has,M2,90 -Has,M3,20 -Has,M4,15 -Has,M5,25 -Has,M6,30 -Has,BY,212 -Has,T1,198 -Has,T2,149 -Has,T3,165 -StartStockRound,3 -HasPriority,T3 -BUY_SHARE_LOG,T3,10,BY,IPO,92 -PriceIsPaidTo,92,BY -BUY_SHARE_LOG,T1,10,BY,IPO,92 -PriceIsPaidTo,92,BY -BUY_SHARE_LOG,T2,10,BY,IPO,92 -PriceIsPaidTo,92,BY -PASSES,T3 -BUY_SHARE_LOG,T1,10,BY,IPO,92 -PriceIsPaidTo,92,BY -SELL_SHARE_LOG,T1,10,BY,92 -PRICE_MOVES_LOG,BY,92,C3,88,C4 -PASSES,T2 -PASSES,T3 -SELL_SHARE_LOG,T1,10,BY,88 -PRICE_MOVES_LOG,BY,88,C4,86,C5 -BUY_SHARE_LOG,T1,10,SX,IPO,88 -PASSES,T2 -PASSES,T3 -SELL_SHARE_LOG,T1,10,BY,86 -PRICE_MOVES_LOG,BY,86,C5,82,C6 -BUY_SHARE_LOG,T1,10,SX,IPO,88 -PASSES,T2 -PASSES,T3 -BUY_SHARE_LOG,T1,10,SX,IPO,88 -FloatsWithCash,SX,440 -PASSES,T2 -PASSES,T3 -PASSES,T1 - -END_SR,3 -Has,M1,20 -Has,M2,90 -Has,M3,20 -Has,M4,15 -Has,M5,25 -Has,M6,30 -Has,BY,580 -Has,SX,440 -Has,T1,16 -Has,T2,57 -Has,T3,73 -START_OR,3.1 -ReceivesFor,T2,5,NF -ReceivesFor,T3,10,OBB -ReceivesFor,T1,15,PfB -ReceivesFor,T1,20,LD -ReceivesFor,T1,25,BB -ReceivesFor,T2,30,HB - -CompanyOperates,M1,T2 -LaysTileAt,M1,4,K3,NW -CompanyRevenue,M1,40 -CompanySplits,M1,40 -M1 receives 20 -Payout,T2,20,1,100 - -CompanyOperates,M2,T2 -LaysTileAtFor,M2,8,D14,NW,50 -CompanyRevenue,M2,70 -CompanySplits,M2,70 -M2 receives 35 -Payout,T2,35,1,100 - -CompanyOperates,M3,T1 -LaysTileAt,M3,57,H16,NW -CompanyRevenue,M3,40 -CompanySplits,M3,40 -M3 receives 20 -Payout,T1,20,1,100 - -CompanyOperates,M4,T3 -LaysTileAt,M4,58,F6,E -CompanyRevenue,M4,60 -CompanySplits,M4,60 -M4 receives 30 -Payout,T3,30,1,100 - -CompanyOperates,M5,T3 -CompanyRevenue,M5,50 -CompanySplits,M5,50 -M5 receives 25 -Payout,T3,25,1,100 - -CompanyOperates,M6,T1 -LaysTileAt,M6,58,B12,SW -CompanyRevenue,M6,60 -CompanySplits,M6,60 -M6 receives 30 -Payout,T1,30,1,100 - -CompanyOperates,SX,T1 -LaysTileAt,SX,56,I17,NE -LaysTileAt,SX,202,H20,W -CompanyDoesNotPayDividend,SX -PRICE_MOVES_LOG,SX,88,C4,84,B4 -BuysTrain,SX,2+2,IPO,120 -PrivateCloses,LD -BuysTrain,SX,2+2,IPO,120 - -CompanyOperates,BY,T3 -LaysTileAt,BY,69,N10,NE -LaysTileAt,BY,5,M9,SW -CompanyRevenue,BY,140 -CompanyPaysOutFull,BY,140 -Payout,T2,42,3,10 -Payout,T3,56,4,10 -Payout,BY,42,3,10 -PRICE_MOVES_LOG,BY,82,C6,88,D6 - -EndOfOperatingRound,3.1 -ORWorthIncrease,T1,3.1,-100 -ORWorthIncrease,T2,3.1,150 -ORWorthIncrease,T3,3.1,145 -Has,M1,40 -Has,M2,75 -Has,M3,40 -Has,M4,45 -Has,M5,50 -Has,M6,60 -Has,BY,622 -Has,SX,200 -Has,T1,126 -Has,T2,189 -Has,T3,194 -StartStockRound,4 -HasPriority,T2 -BUY_SHARE_LOG,T2,10,BY,Pool,88 -BUY_SHARE_LOG,T3,10,BY,Pool,88 -BUY_SHARE_LOG,T1,10,SX,IPO,88 -PriceIsPaidTo,88,SX -BUY_SHARE_LOG,T2,10,SX,IPO,88 -PriceIsPaidTo,88,SX -BUY_SHARE_LOG,T3,10,BY,Pool,88 -PASSES,T1 -PASSES,T2 -PASSES,T3 - -END_SR,4 -PRICE_MOVES_LOG,BY,88,D6,90,D5 -SoldOut,BY,88,D6,90,D5 -Has,M1,40 -Has,M2,75 -Has,M3,40 -Has,M4,45 -Has,M5,50 -Has,M6,60 -Has,BY,622 -Has,SX,376 -Has,T1,38 -Has,T2,13 -Has,T3,18 -START_OR,4.1 -ReceivesFor,T2,5,NF -ReceivesFor,T3,10,OBB -ReceivesFor,T1,15,PfB -ReceivesFor,T1,25,BB -ReceivesFor,T2,30,HB - -CompanyOperates,M1,T2 -LaysTileAt,M1,8,L4,NW -CompanyRevenue,M1,40 -CompanySplits,M1,40 -M1 receives 20 -Payout,T2,20,1,100 - -CompanyOperates,M2,T2 -LaysTileAt,M2,58,B14,E -CompanyRevenue,M2,70 -CompanySplits,M2,70 -M2 receives 35 -Payout,T2,35,1,100 - -CompanyOperates,M3,T1 -LaysTileAt,M3,5,F10,SE -CompanyRevenue,M3,40 -CompanySplits,M3,40 -M3 receives 20 -Payout,T1,20,1,100 - -CompanyOperates,M4,T3 -LaysTileAt,M4,8,F8,W -CompanyRevenue,M4,60 -CompanySplits,M4,60 -M4 receives 30 -Payout,T3,30,1,100 - -CompanyOperates,M5,T3 -CompanyRevenue,M5,50 -CompanySplits,M5,50 -M5 receives 25 -Payout,T3,25,1,100 - -CompanyOperates,M6,T1 -LaysTileAt,M6,58,B16,SE -CompanyRevenue,M6,60 -CompanySplits,M6,60 -M6 receives 30 -Payout,T1,30,1,100 - -CompanyOperates,BY,T3 -LaysTileAt,BY,8,M11,W -LaysTileAt,BY,8,L12,SW -CompanyRevenue,BY,140 -CompanyPaysOutFull,BY,140 -Payout,T2,56,4,10 -Payout,T3,84,6,10 -PRICE_MOVES_LOG,BY,90,D5,96,E5 - -CompanyOperates,SX,T1 -LaysTileAt,SX,7,H18,SE -LaysTileAt,SX,3,I15,NE -LAYS_TOKEN_ON,SX,H20,40 -CompanyRevenue,SX,130 -CompanyPaysOutFull,SX,130 -Payout,T1,78,6,10 -Payout,T2,13,1,10 -PRICE_MOVES_LOG,SX,84,B4,88,C4 - -EndOfOperatingRound,4.1 -ORWorthIncrease,T1,4.1,192 -ORWorthIncrease,T2,4.1,187 -ORWorthIncrease,T3,4.1,185 -Has,M1,60 -Has,M2,110 -Has,M3,60 -Has,M4,75 -Has,M5,75 -Has,M6,90 -Has,BY,622 -Has,SX,336 -Has,T1,206 -Has,T2,172 -Has,T3,167 -StartStockRound,5 -HasPriority,T1 -BUY_SHARE_LOG,T1,10,SX,IPO,88 -PriceIsPaidTo,88,SX -BUY_SHARE_LOG,T2,10,SX,IPO,88 -PriceIsPaidTo,88,SX -BUY_SHARE_LOG,T3,10,SX,IPO,88 -PriceIsPaidTo,88,SX -SharesReleased,All,BA -PASSES,T1 -SELL_SHARES_LOG,T2,4,10,40,BY,384 -PRICE_MOVES_LOG,BY,96,E5,92,E6 -START_COMPANY_LOG,T2,BA,84,168,2,20,BANK -SharesReleased,4 10%,PR -PASSES,T3 -BUY_SHARE_LOG,T1,10,BY,Pool,92 -BUY_SHARE_LOG,T2,10,BA,IPO,84 -PASSES,T3 -PASSES,T1 -BUY_SHARE_LOG,T2,10,BA,IPO,84 -Autopasses,T3 -Autopasses,T1 -BUY_SHARE_LOG,T2,10,BA,IPO,84 -FloatsWithCash,BA,420 -SharesReleased,All,WT -Autopasses,T3 -Autopasses,T1 -PASSES,T2 - -END_SR,5 -PRICE_MOVES_LOG,SX,88,C4,92,C3 -SoldOut,SX,88,C4,92,C3 -Has,M1,60 -Has,M2,110 -Has,M3,60 -Has,M4,75 -Has,M5,75 -Has,M6,90 -Has,BY,622 -Has,SX,600 -Has,BA,420 -Has,T1,26 -Has,T2,48 -Has,T3,79 -START_OR,5.1 -ReceivesFor,T2,5,NF -ReceivesFor,T3,10,OBB -ReceivesFor,T1,15,PfB -ReceivesFor,T1,25,BB -ReceivesFor,T2,30,HB - -CompanyOperates,M1,T2 -LaysTileAtFor,M1,201,I3,NW,50 -CompanyRevenue,M1,60 -CompanySplits,M1,60 -M1 receives 30 -Payout,T2,30,1,100 - -CompanyOperates,M2,T2 -LaysTileAt,M2,9,C17,NW -CompanyRevenue,M2,70 -CompanySplits,M2,70 -M2 receives 35 -Payout,T2,35,1,100 - -CompanyOperates,M3,T1 -LaysTileAt,M3,8,E11,SW -CompanyRevenue,M3,40 -CompanySplits,M3,40 -M3 receives 20 -Payout,T1,20,1,100 - -CompanyOperates,M4,T3 -LaysTileAt,M4,9,E9,SW -CompanyRevenue,M4,60 -CompanySplits,M4,60 -M4 receives 30 -Payout,T3,30,1,100 - -CompanyOperates,M5,T3 -CompanyRevenue,M5,50 -CompanySplits,M5,50 -M5 receives 25 -Payout,T3,25,1,100 - -CompanyOperates,M6,T1 -CompanyRevenue,M6,60 -CompanySplits,M6,60 -M6 receives 30 -Payout,T1,30,1,100 - -CompanyOperates,BY,T3 -LaysTileAt,BY,3,K11,E -LaysTileAt,BY,8,K13,SE -CompanyRevenue,BY,140 -CompanyPaysOutFull,BY,140 -Payout,T1,14,1,10 -Payout,T3,84,6,10 -Payout,BY,42,3,10 -PRICE_MOVES_LOG,BY,92,E6,98,F6 - -CompanyOperates,SX,T1 -CompanyRevenue,SX,130 -CompanyPaysOutFull,SX,130 -Payout,T1,91,7,10 -Payout,T3,13,1,10 -Payout,T2,26,2,10 -PRICE_MOVES_LOG,SX,92,C3,100,D3 - -CompanyOperates,BA,T2 -CompanyDoesNotPayDividend,BA -PRICE_MOVES_LOG,BA,84,B4,78,A4 -BuysTrain,BA,2+2,IPO,120 -All 2+2-trains are sold out, 3-trains now available -BuysTrain,BA,3,IPO,180 -FirstTrainBought,3 -StartOfPhase,3 - -EndOfOperatingRound,5.1 -ORWorthIncrease,T1,5.1,257 -ORWorthIncrease,T2,5.1,112 -ORWorthIncrease,T3,5.1,206 -Has,M1,40 -Has,M2,145 -Has,M3,80 -Has,M4,105 -Has,M5,100 -Has,M6,120 -Has,BY,664 -Has,SX,600 -Has,BA,120 -Has,T1,221 -Has,T2,174 -Has,T3,241 -StartStockRound,6 -HasPriority,T3 -START_COMPANY_LOG,T3,WT,84,168,2,20,BANK -PASSES,T1 -BUY_SHARE_LOG,T2,10,BA,IPO,84 -PriceIsPaidTo,84,BA -SELL_SHARE_LOG,T3,10,SX,100 -PRICE_MOVES_LOG,SX,100,D3,94,D4 -BUY_SHARE_LOG,T3,10,WT,IPO,84 -PASSES,T1 -BUY_SHARE_LOG,T2,10,BA,IPO,84 -PriceIsPaidTo,84,BA -BUY_SHARE_LOG,T3,10,WT,IPO,84 -PASSES,T1 -PASSES,T2 -SELL_SHARE_LOG,T3,10,BY,98 -BUY_SHARE_LOG,T3,10,WT,IPO,84 -FloatsWithCash,WT,420 -SharesReleased,All,HE -START_COMPANY_LOG,T1,HE,84,168,2,20,BANK -PASSES,T2 -PASSES,T3 -PASSES,T1 - -END_SR,6 -Has,M1,40 -Has,M2,145 -Has,M3,80 -Has,M4,105 -Has,M5,100 -Has,M6,120 -Has,BY,664 -Has,SX,600 -Has,BA,288 -Has,WT,420 -Has,T1,53 -Has,T2,6 -Has,T3,19 -START_OR,6.1 -ReceivesFor,T2,5,NF -ReceivesFor,T3,10,OBB -ReceivesFor,T1,15,PfB -ReceivesFor,T1,25,BB -ReceivesFor,T2,30,HB - -CompanyOperates,M1,T2 -LaysTileAt,M1,207,H2,E -CompanyRevenue,M1,70 -CompanySplits,M1,70 -M1 receives 35 -Payout,T2,35,1,100 - -CompanyOperates,M2,T2 -LaysTileAt,M2,209,E19,SE -CompanyRevenue,M2,80 -CompanySplits,M2,80 -M2 receives 40 -Payout,T2,40,1,100 -BuysTrain,M2,3,IPO,180 - -CompanyOperates,M3,T1 -LaysTileAt,M3,14,F14,W -CompanyRevenue,M3,50 -CompanySplits,M3,50 -M3 receives 25 -Payout,T1,25,1,100 -BuysTrain,M3,2,M6,105 - -CompanyOperates,M4,T3 -LaysTileAt,M4,205,G5,W -CompanyRevenue,M4,80 -CompanySplits,M4,80 -M4 receives 40 -Payout,T3,40,1,100 - -CompanyOperates,M5,T3 -LaysTileAt,M5,8,F18,NE -CompanyRevenue,M5,80 -CompanySplits,M5,80 -M5 receives 40 -Payout,T3,40,1,100 -BuysTrain,M5,2,BY,140 - -CompanyOperates,M6,T1 -LaysTileAt,M6,12,A11,W -CompanyDoesNotPayDividend,M6 -BuysTrain,M6,2+2,SX,225 - -CompanyOperates,BY,T3 -LaysTileAt,BY,15,M9,NW -CompanyRevenue,BY,120 -CompanyPaysOutFull,BY,120 -Payout,T1,12,1,10 -Payout,T3,60,5,10 -Payout,BY,48,4,10 -PRICE_MOVES_LOG,BY,98,F6,106,G6 -BuysTrain,BY,3,IPO,180 - -CompanyOperates,SX,T1 -LaysTileAt,SX,208,H20,W -CompanyRevenue,SX,90 -CompanyPaysOutFull,SX,90 -Payout,T1,63,7,10 -Payout,T2,18,2,10 -Payout,SX,9,1,10 -PRICE_MOVES_LOG,SX,94,D4,102,E4 -BuysTrain,SX,3,IPO,180 -All 3-trains are sold out, 3+3-trains now available -BuysTrain,SX,3+3,IPO,270 -FirstTrainBought,3+3 - -CompanyOperates,WT,T3 -LaysTileAt,WT,204,K11,NE -CompanyDoesNotPayDividend,WT -PRICE_MOVES_LOG,WT,84,B4,78,A4 -BuysTrain,WT,3+3,IPO,270 -BuysTrain,WT,2,M4,1 - -CompanyOperates,BA,T2 -LaysTileAt,BA,212,L6,SW -LAYS_TOKEN_ON,BA,H2,80 -CompanyRevenue,BA,170 -CompanyPaysOutFull,BA,170 -Payout,T2,119,7,10 -PRICE_MOVES_LOG,BA,78,A4,84,B4 - -EndOfOperatingRound,6.1 -ORWorthIncrease,T1,6.1,204 -ORWorthIncrease,T2,6.1,305 -ORWorthIncrease,T3,6.1,160 -Has,M1,75 -Has,M2,5 -Has,M3,0 -Has,M4,146 -Has,M5,0 -Has,M6,0 -Has,BY,672 -Has,SX,384 -Has,BA,208 -Has,WT,149 -Has,T1,193 -Has,T2,253 -Has,T3,169 -START_OR,6.2 -ReceivesFor,T2,5,NF -ReceivesFor,T3,10,OBB -ReceivesFor,T1,15,PfB -ReceivesFor,T1,25,BB -ReceivesFor,T2,30,HB - -CompanyOperates,M1,T2 -LaysTileAt,M1,207,I3,SW -CompanyRevenue,M1,80 -CompanySplits,M1,80 -M1 receives 40 -Payout,T2,40,1,100 - -CompanyOperates,M2,T2 -LaysTileAt,M2,8,F20,NE -CompanyRevenue,M2,170 -CompanySplits,M2,170 -M2 receives 85 -Payout,T2,85,1,100 - -CompanyOperates,M3,T1 -LaysTileAt,M3,8,D10,NE -CompanyRevenue,M3,90 -CompanySplits,M3,90 -M3 receives 45 -Payout,T1,45,1,100 - -CompanyOperates,M4,T3 -LaysTileAt,M4,24,D10,NE -CompanyRevenue,M4,40 -CompanySplits,M4,40 -M4 receives 20 -Payout,T3,20,1,100 -BuysTrain,M4,2,BY,166 - -CompanyOperates,M5,T3 -LaysTileAt,M5,23,D18,NW -CompanyRevenue,M5,140 -CompanySplits,M5,140 -M5 receives 70 -Payout,T3,70,1,100 - -CompanyOperates,M6,T1 -LaysTileAt,M6,203,B12,W -CompanyRevenue,M6,80 -CompanySplits,M6,80 -M6 receives 40 -Payout,T1,40,1,100 - -CompanyOperates,BY,T3 -LaysTileAt,BY,8,J10,SE -LAYS_TOKEN_ON,BY,J8,120 -CompanyRevenue,BY,160 -CompanyPaysOutFull,BY,160 -Payout,T1,16,1,10 -Payout,T3,80,5,10 -Payout,BY,64,4,10 -PRICE_MOVES_LOG,BY,106,G6,114,G5 -BuysTrain,BY,2,M5,1 - -CompanyOperates,SX,T1 -LaysTileAt,SX,206,H16,SW -LAYS_TOKEN_ON,SX,E19,60 -CompanyRevenue,SX,320 -CompanyPaysOutFull,SX,320 -Payout,T1,224,7,10 -Payout,T2,64,2,10 -Payout,SX,32,1,10 -PRICE_MOVES_LOG,SX,102,E4,112,F4 - -CompanyOperates,BA,T2 -LaysTileAt,BA,9,K5,NW -CompanyRevenue,BA,190 -CompanyPaysOutFull,BA,190 -Payout,T2,133,7,10 -PRICE_MOVES_LOG,BA,84,B4,88,C4 - -CompanyOperates,WT,T3 -LaysTileAt,WT,1,L8,W -CompanyRevenue,WT,160 -CompanyPaysOutFull,WT,160 -Payout,T3,80,5,10 -PRICE_MOVES_LOG,WT,78,A4,84,B4 - -EndOfOperatingRound,6.2 -ORWorthIncrease,T1,6.2,443 -ORWorthIncrease,T2,6.2,405 -ORWorthIncrease,T3,6.2,330 -Has,M1,115 -Has,M2,90 -Has,M3,45 -Has,M4,0 -Has,M5,71 -Has,M6,40 -Has,BY,781 -Has,SX,356 -Has,BA,208 -Has,WT,149 -Has,T1,558 -Has,T2,610 -Has,T3,429 -StartStockRound,7 -HasPriority,T2 -BUY_SHARE_LOG,T2,10,PR,IPO,154 -BUY_SHARE_LOG,T3,10,PR,IPO,154 -BUY_SHARE_LOG,T1,10,PR,IPO,154 -BUY_SHARE_LOG,T2,10,PR,IPO,154 -BUY_SHARE_LOG,T3,10,BY,Pool,114 -BUY_SHARE_LOG,T1,10,SX,Pool,112 -BUY_SHARE_LOG,T2,10,BY,Pool,114 -BUY_SHARE_LOG,T3,10,BA,IPO,84 -PriceIsPaidTo,84,BA -PASSES,T1 -PASSES,T2 -SELL_SHARE_LOG,T3,10,BY,114 -PRICE_MOVES_LOG,BY,114,G5,106,G6 -BUY_SHARE_LOG,T3,20,BA,IPO,168 -PriceIsPaidTo,168,BA -PASSES,T1 -SELL_SHARE_LOG,T2,10,BY,106 -BUY_SHARE_LOG,T2,20,BA,T3,264 +GameIs,1835 +PlayerIs,1,T1 +PlayerIs,2,T2 +PlayerIs,3,T3 +PlayerCash,600 +BankHas,10200 +StartOfPhase,2 +BankSizeIs,10200 +StartOfInitialRound +HasPriority,T1 +BuysItemFor,T3,M5,80 +FloatsWithCash,M5,80 +BuysItemFor,T2,M1,80 +FloatsWithCash,M1,80 +BuysItemFor,T1,M3,80 +FloatsWithCash,M3,80 +BuysItemFor,T1,M6,80 +FloatsWithCash,M6,80 +BuysItemFor,T2,M2,170 +FloatsWithCash,M2,170 +BuysItemFor,T3,PRES_CERT_NAME,BY,20,184 +BuysItemFor,T1,LD,190 +ALSO_GETS,T1,PRES_CERT_NAME,SX,20 +BuysItemFor,T2,HB,160 +BuysItemFor,T3,OBB,120 +ALSO_GETS,T3,CERT_NAME,BY,10 +BuysItemFor,T1,BB,130 +BuysItemFor,T2,NF,100 +ALSO_GETS,T2,CERT_NAME,BY,10 +BuysItemFor,T3,M4,160 +FloatsWithCash,M4,160 +CannotBuyAnything,T1 +CannotBuyAnything,T2 +CannotBuyAnything,T3 +Has,M1,80 +Has,M2,170 +Has,M3,80 +Has,M4,160 +Has,M5,80 +Has,M6,80 +Has,T1,120 +Has,T2,90 +Has,T3,56 +START_OR,0.0 +ReceivesFor,T2,5,NF +ReceivesFor,T3,10,OBB +ReceivesFor,T1,20,LD +ReceivesFor,T1,25,BB +ReceivesFor,T2,30,HB +ShortORExecuted +Has,M1,80 +Has,M2,170 +Has,M3,80 +Has,M4,160 +Has,M5,80 +Has,M6,80 +Has,T1,165 +Has,T2,125 +Has,T3,66 +StartOfInitialRound +HasPriority,T1 +CannotBuyAnything,T3 +BuysItemFor,T1,PfB,150 +ALSO_GETS,T1,CERT_NAME,BY,10 +FloatsWithCash,BY,460 +Has,M1,80 +Has,M2,170 +Has,M3,80 +Has,M4,160 +Has,M5,80 +Has,M6,80 +Has,BY,460 +Has,T1,15 +Has,T2,125 +Has,T3,66 +StartStockRound,1 +HasPriority,T2 +BUY_SHARE_LOG,T2,10,BY,IPO,92 +PriceIsPaidTo,92,BY +PASSES,T3 +PASSES,T1 +PASSES,T2 + +END_SR,1 +Has,M1,80 +Has,M2,170 +Has,M3,80 +Has,M4,160 +Has,M5,80 +Has,M6,80 +Has,BY,552 +Has,T1,15 +Has,T2,33 +Has,T3,66 +START_OR,1.1 +ReceivesFor,T2,5,NF +ReceivesFor,T3,10,OBB +ReceivesFor,T1,15,PfB +ReceivesFor,T1,20,LD +ReceivesFor,T1,25,BB +ReceivesFor,T2,30,HB + +CompanyOperates,M1,T2 +LaysTileAt,M1,201,H2,SW +CompanyDoesNotPayDividend,M1 +BuysTrain,M1,2,IPO,80 +FirstTrainBought,2 + +CompanyOperates,M2,T2 +LaysTileAt,M2,8,E17,NW +CompanyDoesNotPayDividend,M2 +BuysTrain,M2,2,IPO,80 + +CompanyOperates,M3,T1 +LaysTileAt,M3,6,F14,NW +CompanyDoesNotPayDividend,M3 +BuysTrain,M3,2,IPO,80 + +CompanyOperates,M4,T3 +LaysTileAt,M4,57,G5,SW +CompanyDoesNotPayDividend,M4 +BuysTrain,M4,2,IPO,80 +BuysTrain,M4,2,IPO,80 + +CompanyOperates,M5,T3 +LaysTileAt,M5,8,D18,NE +CompanyDoesNotPayDividend,M5 +BuysTrain,M5,2,IPO,80 + +CompanyOperates,M6,T1 +LaysTileAt,M6,9,B10,NW +CompanyDoesNotPayDividend,M6 +BuysTrain,M6,2,IPO,80 + +CompanyOperates,BY,T3 +LaysTileAt,BY,202,O15,E +LaysTileAt,BY,8,O13,NW +CompanyDoesNotPayDividend,BY +PRICE_MOVES_LOG,BY,92,C3,86,B3 +BuysTrain,BY,2,IPO,80 +BuysTrain,BY,2,IPO,80 +All 2-trains are sold out, 2+2-trains now available +BuysTrain,BY,2+2,IPO,120 +FirstTrainBought,2+2 + +EndOfOperatingRound,1.1 +ORWorthIncrease,T1,1.1,54 +ORWorthIncrease,T2,1.1,23 +ORWorthIncrease,T3,1.1,-8 +Has,M1,0 +Has,M2,90 +Has,M3,0 +Has,M4,0 +Has,M5,0 +Has,M6,0 +Has,BY,272 +Has,T1,75 +Has,T2,68 +Has,T3,76 +StartStockRound,2 +HasPriority,T3 +PASSES,T3 +PASSES,T1 +PASSES,T2 + +END_SR,2 +Has,M1,0 +Has,M2,90 +Has,M3,0 +Has,M4,0 +Has,M5,0 +Has,M6,0 +Has,BY,272 +Has,T1,75 +Has,T2,68 +Has,T3,76 +START_OR,2.1 +ReceivesFor,T2,5,NF +ReceivesFor,T3,10,OBB +ReceivesFor,T1,15,PfB +ReceivesFor,T1,20,LD +ReceivesFor,T1,25,BB +ReceivesFor,T2,30,HB + +CompanyOperates,M1,T2 +LaysTileAt,M1,9,J2,NW +CompanyRevenue,M1,40 +CompanySplits,M1,40 +M1 receives 20 +Payout,T2,20,1,100 + +CompanyOperates,M2,T2 +LaysTileAt,M2,8,D16,SE +CompanyRevenue,M2,0 +CompanyDoesNotPayDividend,M2 + +CompanyOperates,M3,T1 +LaysTileAt,M3,4,G15,NW +CompanyRevenue,M3,40 +CompanySplits,M3,40 +M3 receives 20 +Payout,T1,20,1,100 + +CompanyOperates,M4,T3 +LaysTileAt,M4,2,H4,NE +CompanyRevenue,M4,30 +CompanySplits,M4,30 +M4 receives 15 +Payout,T3,15,1,100 + +CompanyOperates,M5,T3 +LaysTileAt,M5,8,C19,E +CompanyRevenue,M5,50 +CompanySplits,M5,50 +M5 receives 25 +Payout,T3,25,1,100 + +CompanyOperates,M6,T1 +LaysTileAt,M6,6,A11,NW +CompanyRevenue,M6,60 +CompanySplits,M6,60 +M6 receives 30 +Payout,T1,30,1,100 + +CompanyOperates,BY,T3 +LaysTileAt,BY,8,N16,SW +LaysTileAt,BY,4,M15,NW +LaysTileAt,BY,6,N12,NW +LAYS_TOKEN_ON,BY,L14,60 +CompanyRevenue,BY,130 +CompanyPaysOutFull,BY,130 +Payout,T1,13,1,10 +Payout,T2,26,2,10 +Payout,T3,39,3,10 +PRICE_MOVES_LOG,BY,86,B3,92,C3 + +EndOfOperatingRound,2.1 +ORWorthIncrease,T1,2.1,129 +ORWorthIncrease,T2,2.1,93 +ORWorthIncrease,T3,2.1,107 +Has,M1,20 +Has,M2,90 +Has,M3,20 +Has,M4,15 +Has,M5,25 +Has,M6,30 +Has,BY,212 +Has,T1,198 +Has,T2,149 +Has,T3,165 +StartStockRound,3 +HasPriority,T3 +BUY_SHARE_LOG,T3,10,BY,IPO,92 +PriceIsPaidTo,92,BY +BUY_SHARE_LOG,T1,10,BY,IPO,92 +PriceIsPaidTo,92,BY +BUY_SHARE_LOG,T2,10,BY,IPO,92 +PriceIsPaidTo,92,BY +PASSES,T3 +BUY_SHARE_LOG,T1,10,BY,IPO,92 +PriceIsPaidTo,92,BY +SELL_SHARE_LOG,T1,10,BY,92 +PRICE_MOVES_LOG,BY,92,C3,88,C4 +PASSES,T2 +PASSES,T3 +SELL_SHARE_LOG,T1,10,BY,88 +PRICE_MOVES_LOG,BY,88,C4,86,C5 +BUY_SHARE_LOG,T1,10,SX,IPO,88 +PASSES,T2 +PASSES,T3 +SELL_SHARE_LOG,T1,10,BY,86 +PRICE_MOVES_LOG,BY,86,C5,82,C6 +BUY_SHARE_LOG,T1,10,SX,IPO,88 +PASSES,T2 +PASSES,T3 +BUY_SHARE_LOG,T1,10,SX,IPO,88 +FloatsWithCash,SX,440 +PASSES,T2 +PASSES,T3 +PASSES,T1 + +END_SR,3 +Has,M1,20 +Has,M2,90 +Has,M3,20 +Has,M4,15 +Has,M5,25 +Has,M6,30 +Has,BY,580 +Has,SX,440 +Has,T1,16 +Has,T2,57 +Has,T3,73 +START_OR,3.1 +ReceivesFor,T2,5,NF +ReceivesFor,T3,10,OBB +ReceivesFor,T1,15,PfB +ReceivesFor,T1,20,LD +ReceivesFor,T1,25,BB +ReceivesFor,T2,30,HB + +CompanyOperates,M1,T2 +LaysTileAt,M1,4,K3,NW +CompanyRevenue,M1,40 +CompanySplits,M1,40 +M1 receives 20 +Payout,T2,20,1,100 + +CompanyOperates,M2,T2 +LaysTileAtFor,M2,8,D14,NW,50 +CompanyRevenue,M2,70 +CompanySplits,M2,70 +M2 receives 35 +Payout,T2,35,1,100 + +CompanyOperates,M3,T1 +LaysTileAt,M3,57,H16,NW +CompanyRevenue,M3,40 +CompanySplits,M3,40 +M3 receives 20 +Payout,T1,20,1,100 + +CompanyOperates,M4,T3 +LaysTileAt,M4,58,F6,E +CompanyRevenue,M4,60 +CompanySplits,M4,60 +M4 receives 30 +Payout,T3,30,1,100 + +CompanyOperates,M5,T3 +CompanyRevenue,M5,50 +CompanySplits,M5,50 +M5 receives 25 +Payout,T3,25,1,100 + +CompanyOperates,M6,T1 +LaysTileAt,M6,58,B12,SW +CompanyRevenue,M6,60 +CompanySplits,M6,60 +M6 receives 30 +Payout,T1,30,1,100 + +CompanyOperates,SX,T1 +LaysTileAt,SX,56,I17,NE +LaysTileAt,SX,202,H20,W +CompanyDoesNotPayDividend,SX +PRICE_MOVES_LOG,SX,88,C4,84,B4 +BuysTrain,SX,2+2,IPO,120 +PrivateCloses,LD +BuysTrain,SX,2+2,IPO,120 + +CompanyOperates,BY,T3 +LaysTileAt,BY,69,N10,NE +LaysTileAt,BY,5,M9,SW +CompanyRevenue,BY,140 +CompanyPaysOutFull,BY,140 +Payout,T2,42,3,10 +Payout,T3,56,4,10 +Payout,BY,42,3,10 +PRICE_MOVES_LOG,BY,82,C6,88,D6 + +EndOfOperatingRound,3.1 +ORWorthIncrease,T1,3.1,-100 +ORWorthIncrease,T2,3.1,150 +ORWorthIncrease,T3,3.1,145 +Has,M1,40 +Has,M2,75 +Has,M3,40 +Has,M4,45 +Has,M5,50 +Has,M6,60 +Has,BY,622 +Has,SX,200 +Has,T1,126 +Has,T2,189 +Has,T3,194 +StartStockRound,4 +HasPriority,T2 +BUY_SHARE_LOG,T2,10,BY,Pool,88 +BUY_SHARE_LOG,T3,10,BY,Pool,88 +BUY_SHARE_LOG,T1,10,SX,IPO,88 +PriceIsPaidTo,88,SX +BUY_SHARE_LOG,T2,10,SX,IPO,88 +PriceIsPaidTo,88,SX +BUY_SHARE_LOG,T3,10,BY,Pool,88 +PASSES,T1 +PASSES,T2 +PASSES,T3 + +END_SR,4 +PRICE_MOVES_LOG,BY,88,D6,90,D5 +SoldOut,BY,88,D6,90,D5 +Has,M1,40 +Has,M2,75 +Has,M3,40 +Has,M4,45 +Has,M5,50 +Has,M6,60 +Has,BY,622 +Has,SX,376 +Has,T1,38 +Has,T2,13 +Has,T3,18 +START_OR,4.1 +ReceivesFor,T2,5,NF +ReceivesFor,T3,10,OBB +ReceivesFor,T1,15,PfB +ReceivesFor,T1,25,BB +ReceivesFor,T2,30,HB + +CompanyOperates,M1,T2 +LaysTileAt,M1,8,L4,NW +CompanyRevenue,M1,40 +CompanySplits,M1,40 +M1 receives 20 +Payout,T2,20,1,100 + +CompanyOperates,M2,T2 +LaysTileAt,M2,58,B14,E +CompanyRevenue,M2,70 +CompanySplits,M2,70 +M2 receives 35 +Payout,T2,35,1,100 + +CompanyOperates,M3,T1 +LaysTileAt,M3,5,F10,SE +CompanyRevenue,M3,40 +CompanySplits,M3,40 +M3 receives 20 +Payout,T1,20,1,100 + +CompanyOperates,M4,T3 +LaysTileAt,M4,8,F8,W +CompanyRevenue,M4,60 +CompanySplits,M4,60 +M4 receives 30 +Payout,T3,30,1,100 + +CompanyOperates,M5,T3 +CompanyRevenue,M5,50 +CompanySplits,M5,50 +M5 receives 25 +Payout,T3,25,1,100 + +CompanyOperates,M6,T1 +LaysTileAt,M6,58,B16,SE +CompanyRevenue,M6,60 +CompanySplits,M6,60 +M6 receives 30 +Payout,T1,30,1,100 + +CompanyOperates,BY,T3 +LaysTileAt,BY,8... [truncated message content] |
From: Dr. M. B. <neu...@us...> - 2012-04-12 15:29:05
|
rails/common/ConfigProfile.java | 4 ---- rails/game/TrainManager.java | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) New commits: commit 81327fddb721925d55762c3f827e4ce12e24ce44 Author: Martin Brumm <Dr....@t-...> Date: Thu Apr 12 17:28:50 2012 +0200 Fixing Merge Conflicts part II diff --git a/rails/common/ConfigProfile.java b/rails/common/ConfigProfile.java index ecc8bb7..b4338c0 100644 --- a/rails/common/ConfigProfile.java +++ b/rails/common/ConfigProfile.java @@ -2,16 +2,12 @@ package rails.common; import java.io.File; import java.io.FilenameFilter; -<<<<<<< HEAD -import java.util.*; -======= import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; ->>>>>>> refs/remotes/origin/rails1.7.x import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOCase; diff --git a/rails/game/TrainManager.java b/rails/game/TrainManager.java index 454f6e9..a9b381a 100644 --- a/rails/game/TrainManager.java +++ b/rails/game/TrainManager.java @@ -1 +1 @@ -/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/TrainManager.java,v 1.28 2010/04/21 21:25:50 evos Exp $ */ package rails.game; import java.util.*; import org.apache.log4j.Logger; import rails.common.LocalText; import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; import rails.game.move.ObjectMove; import rails.game.state.BooleanState; import rails.game.state.IntegerState; import rails.util.Util; public class TrainManager implements ConfigurableComponentI { // Static attributes protected List<TrainType> lTrainTypes = new ArrayList<TrainType>(); protected Map<String, TrainType> mTrainTypes = new HashMap<String, TrainType>(); protected List<TrainCertificateType> trainCertTypes = new ArrayList<TrainCertificateType>(); protected Map<String, TrainCertificateType> trainCertTypeMap = new HashMap<String, TrainCertificateType>(); protected Map<String, TrainI> trainMap = new HashMap<String, TrainI>(); protected Map<TrainCertificateType, List<TrainI>> trainsPerCertType = new HashMap<TrainCertificateType, List<TrainI>>(); protected TrainType defaultType = null; // Only required locally and in ChoiceType private boolean removeTrain = false; // defines obsolescence public enum ObsoleteTrainForType {ALL, EXCEPT_TRIGGERING} protected ObsoleteTrainForType obsoleteTrainFor = ObsoleteTrainForType.EXCEPT_TRIGGERING; // default is ALL // Dynamic attributes protected IntegerState newTypeIndex; protected Map<String, Integer> lastIndexPerType = new HashMap<String, Integer>(); protected boolean trainsHaveRusted = false; protected boolean phaseHasChanged = false; protected boolean trainAvailabilityChanged = false; protected List<PublicCompanyI> companiesWithExcessTrains; protected GameManagerI gameManager = null; protected Bank bank = null; /** Required for the sell- |
From: Stefan F. <ste...@us...> - 2012-04-12 11:54:13
|
Tag 'v1.7.3' created by Stefan Frey <ste...@we...> at 2012-04-12 11:53 +0000 rails release version 1.7.3 Changes since v1.7.2-6: --- 0 files changed --- |
From: Dr. M. B. <neu...@us...> - 2012-04-12 07:30:50
|
LocalisedText.properties | 10 buildRails.xml | 8 data/1830/Game.xml | 4 data/1830/Map.xml | 8 data/1830/TileSet.xml | 1 data/1830/Tiles.xml | 5 data/1835/Game.xml | 3 data/1856/Map.xml | 2 data/1856/TileSet.xml | 1 data/1856/Tiles.xml | 6 data/18AL/Game.xml | 1 data/18EU/Map.xml | 2 data/18EU/TileSet.xml | 1 data/18EU/Tiles.xml | 6 data/18Kaas/Game.xml | 6 data/18TN/Game.xml | 1 data/Properties.xml | 1 data/profiles/LIST_OF_PROFILES | 1 data/profiles/ORDocking.predefined | 2 data/profiles/hotseat.predefined | 4 data/profiles/pbem.predefined | 6 data/profiles/prettyUI.predefined | 2 data/profiles/root | 3 rails/common/ConfigManager.java | 13 rails/common/ConfigProfile.java | 152 + rails/game/GameManager.java | 52 rails/game/GameManagerI.java | 4 rails/game/PublicCompany.java | 12 rails/game/TrainManager.java | 2 rails/game/specific/_1835/ElsasModifier.java | 46 rails/game/specific/_18EU/StockRound_18EU.java | 8 rails/ui/swing/ConfigWindow.java | 131 - rails/ui/swing/GameSetupWindow.java | 17 rails/ui/swing/GameStatus.java | 74 rails/ui/swing/GameUIManager.java | 72 rails/ui/swing/GridPanel.java | 33 rails/ui/swing/ORUIManager.java | 9 rails/ui/swing/StartRoundWindow.java | 97 rails/ui/swing/StatusWindow.java | 8 rails/ui/swing/WindowSettings.java | 5 rails/ui/swing/elements/DockingFrame.java | 13 rails/ui/swing/elements/RailsIcon.java | 1 rails/util/GameFileIO.java | 5 readme.txt | 78 test/data/bugs/18EU_layhomeHex.rails |binary test/data/bugs/18EU_layhomeHex.report | 1592 +++++++++++++++ test/data/test/1835_PRHasTwoExcessTrains.report | 2283 +++++++++++----------- test/data/test/1835_PR_3rdTrain.report | 2207 ++++++++++----------- test/data/test/1835_SwapPresForDoubleShare.report | 700 +++--- version.number | 4 50 files changed, 4817 insertions(+), 2885 deletions(-) New commits: commit fc60c8de9d6c6a30611152b8d0cad63133f6f776 Merge: 84ccccb 82d4e5c Author: Martin <dr....@t-...> Date: Thu Apr 12 09:30:00 2012 +0200 Merge remote branch 'origin/rails1.7.x' into specific_1880 Conflicts: rails/common/ConfigProfile.java rails/game/TrainManager.java readme.txt test/data/test/1835_PRHasTwoExcessTrains.report test/data/test/1835_PR_3rdTrain.report version.number diff --cc buildRails.xml index aca719d,3af31a6..d626a97 --- a/buildRails.xml +++ b/buildRails.xml @@@ -166,7 -164,7 +166,7 @@@ </exec> <exec executable="scp" dir="./" failonerror="true"> <arg value="readme.txt"/> - <arg value="${sf.user},rails@${sf.uri}${sf.filedir}${version}/"/> + <arg value="${sf.user}@${sf.uri}${sf.filedir}${version}/"/> </exec> </target> --</project> ++</project> diff --cc rails/common/ConfigProfile.java index ca418d3,2fb7762..ecc8bb7 --- a/rails/common/ConfigProfile.java +++ b/rails/common/ConfigProfile.java @@@ -2,7 -2,12 +2,16 @@@ package rails.common import java.io.File; import java.io.FilenameFilter; ++<<<<<<< HEAD +import java.util.*; ++======= + import java.util.ArrayList; + import java.util.Collection; + import java.util.HashMap; + import java.util.List; + import java.util.Map; + import java.util.Properties; ++>>>>>>> refs/remotes/origin/rails1.7.x import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOCase; @@@ -103,26 -108,33 +112,34 @@@ public final class ConfigProfile implem new ConfigProfile(Type.USER, FilenameUtils.getBaseName(fileName)); } } - + static ConfigProfile getStartProfile() { // first checks cli - String profile = System.getProperty(CLI_AND_RECENT_OPTION); - if (Util.hasValue(profile) && profiles.containsKey(profile)) { - return profiles.get(profile); - } ++ + ConfigProfile profile = getProfile(System.getProperty(CLI_AND_RECENT_OPTION)); + if (profile != null) { + return profile; + } // second check recent - profile = Config.getRecent(CLI_AND_RECENT_OPTION); - if (Util.hasValue(profile) && profiles.containsKey(profile)) { - return profiles.get(profile); - } + profile = getProfile(Config.getRecent(CLI_AND_RECENT_OPTION)); + if (profile != null) { + return profile; + } // third return standard profile - return profiles.get(STANDARD_PROFILE); + profile = getProfile(STANDARD_PROFILE); + if (profile != null) { + return profile; + } + // last return root + return root; } - + static ConfigProfile getProfile(String name) { + if (name == null) return null; + if (name.equals(ROOT_PROFILE)) return root; return profiles.get(name); } - + static Collection<ConfigProfile> getProfiles() { return profiles.values(); } @@@ -146,54 -158,53 +163,53 @@@ boolean isLoaded() { return loaded; } - + boolean isFinal() { - if (!loaded && type == Type.USER) return true; - + ensureLoad(); + if (Util.hasValue(properties.getProperty(FINAL_KEY))) { return Util.parseBoolean(properties.getProperty(FINAL_KEY)); } return false; } - + ConfigProfile setParent(ConfigProfile parent) { - if (parent != null) { - this.parent = parent; - properties.setProperty(PARENT_KEY, parent.getName()); - } + ensureLoad(); + this.parent = parent; + properties.setProperty(PARENT_KEY, parent.getName()); return this; } - + private ConfigProfile setParent(String name) { - return setParent(profiles.get(name)); + return setParent(getProfile(name)); } ConfigProfile getParent() { + ensureLoad(); return parent; } - + String getProperty(String key) { - if (this == root || properties.containsKey(key)) { + ensureLoad(); + if (this == parent || properties.containsKey(key)) { return properties.getProperty(key); } else { return parent.getProperty(key); } } - + void setProperty(String key, String value) { - if (!parent.getProperty(key).equals(value)) { - properties.setProperty(key, value); - } else { + ensureLoad(); + if (parent.getProperty(key) != null && parent.getProperty(key).equals(value)) { properties.remove(key); + } else { + properties.setProperty(key, value); } } - - + + void makeActive(){ - // check if is already loaded - if (!isLoaded()) { - load(); - } + ensureLoad(); // and store it to recent Config.storeRecent(CLI_AND_RECENT_OPTION, getName()); } @@@ -221,6 -236,12 +241,12 @@@ return newProfile; } + private void ensureLoad() { + if (loaded == false) { + load(); + } + } - ++ boolean load() { // loaded is set independent of success loaded = true; @@@ -280,17 -302,77 +307,79 @@@ } return Util.loadPropertiesFromResource(properties, filePath); } + - boolean store() { - if (type != Type.USER) return false; - loaded = true; + + private File getFile() { ++ File folder = SystemOS.get().getConfigurationFolder(PROFILE_FOLDER, true); if (folder == null) { + return null; + } else { + return new File(folder, name + PROFILE_EXTENSION); + } + } + + /** + * stores profile + * @return true if save was successful + */ + boolean store() { + if (type != Type.USER) return false; + + File file = getFile(); + if (file != null) { + return Util.storeProperties(properties, file); + } else { return false; + } + } + + private List<ConfigProfile> getChildren() { + List<ConfigProfile> children = new ArrayList<ConfigProfile>(); + for (ConfigProfile profile:profiles.values()) { + if (profile.getParent() == this) { + children.add(profile); + } + } + return children; + } + + /** + * delete profile (including deleting the saved file and removing from the map of profiles) + * @return true if deletion was successful + */ + boolean delete() { + // cannot delete parents + if (type != Type.USER) return false; + + // delete profile file + boolean result; + File file = getFile(); + if (file != null) { + if (file.delete()) { + profiles.remove(this.name); + result = true; + } else { + result = false; + } } else { - File profile = new File(folder, name + PROFILE_EXTENSION); - return Util.storeProperties(properties, profile); + result = false; + } + + + if (result) { + // and reassign and save children + for (ConfigProfile child:getChildren()) { + child.setParent(parent); + // and transfer (directly stored) properties + for (Object key:properties.keySet()) { + child.setProperty((String)key, (String)properties.get(key)); + } + child.store(); + } } + return result; + } private int compare(ConfigProfile a, ConfigProfile b) { diff --cc rails/game/TrainManager.java index cfa95f8,b99b128..454f6e9 --- a/rails/game/TrainManager.java +++ b/rails/game/TrainManager.java @@@ -1,1 -1,1 +1,1 @@@ - /* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/TrainManager.java,v 1.28 2010/04/21 21:25:50 evos Exp $ */ package rails.game; import java.util.*; import org.apache.log4j.Logger; import rails.common.LocalText; import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; import rails.game.move.ObjectMove; import rails.game.state.BooleanState; import rails.game.state.IntegerState; public class TrainManager implements ConfigurableComponentI { // Static attributes protected List<TrainType> lTrainTypes = new ArrayList<TrainType>(); protected Map<String, TrainType> mTrainTypes = new HashMap<String, TrainType>(); protected List<TrainCertificateType> trainCertTypes = new ArrayList<TrainCertificateType>(); protected Map<String, TrainCertificateType> trainCertTypeMap = new HashMap<String, TrainCertificateType>(); protected Map<String, TrainI> trainMap = new HashMap<String, TrainI>(); protected Map<TrainCertificateType, List<TrainI>> trainsPerCertType = new HashMap<TrainCertificateType, List<TrainI>>(); protected TrainType defaultType = null; // Only required locally and in ChoiceType private boolean removeTrain = false; // Dynamic attributes protected IntegerState newTypeIndex; protected Map<String, Integer> lastIndexPerType = new HashMap<String, Integer>(); protected boolean trainsHaveRusted = false; protected boolean phaseHasChanged = false; protected boolean trainAvailabilityChanged = false; protected List<PublicCompanyI> companiesWithExcessTrains; protected GameManagerI gameManager = null; protected Bank bank = null; /** Required for the sell-train-to-foreigners feature of some games */ protected BooleanState anyTrainBought = new BooleanState ("AnyTrainBought", false); // Triggered phase changes protected Map<TrainCertificateType, Map<Integer, |
From: Erik V. <ev...@us...> - 2012-04-10 13:20:37
|
rails/game/GameManager.java | 40 +++++++-- rails/game/GameManagerI.java | 4 rails/ui/swing/GameStatus.java | 74 +++++++++++++----- rails/ui/swing/GameUIManager.java | 50 ++++++++++++ rails/ui/swing/GridPanel.java | 33 +++----- rails/ui/swing/StartRoundWindow.java | 97 +++++++++++++++++------- rails/ui/swing/StatusWindow.java | 8 + test/data/test/1835_PRHasTwoExcessTrains.report | 2 test/data/test/1835_PR_3rdTrain.report | 6 - 9 files changed, 232 insertions(+), 82 deletions(-) New commits: commit fc634eb4a9d56c061375477083d7f049a89cf2b7 Author: Erik Vos <eri...@xs...> Date: Tue Apr 10 15:18:36 2012 +0200 Replaced two 1835 test reports, which were affected by the PR worth calculation fix. diff --git a/test/data/test/1835_PRHasTwoExcessTrains.report b/test/data/test/1835_PRHasTwoExcessTrains.report index 2049760..4396818 100644 --- a/test/data/test/1835_PRHasTwoExcessTrains.report +++ b/test/data/test/1835_PRHasTwoExcessTrains.report @@ -1038,7 +1038,7 @@ CompanyWithholds,WT,280 PRICE_MOVES_LOG,WT,72,A5,64,A6 EndOfOperatingRound,7.1 -ORWorthIncrease,Alice,7.1,741 +ORWorthIncrease,Alice,7.1,587 ORWorthIncrease,Bob,7.1,442 ORWorthIncrease,Charlie,7.1,516 Has,M1,1 diff --git a/test/data/test/1835_PR_3rdTrain.report b/test/data/test/1835_PR_3rdTrain.report index aef617c..d80d659 100644 --- a/test/data/test/1835_PR_3rdTrain.report +++ b/test/data/test/1835_PR_3rdTrain.report @@ -1061,9 +1061,9 @@ PrivateCloses,PfB CompanyDiscardsTrain,SX,3 EndOfOperatingRound,7.1 -ORWorthIncrease,Alice,7.1,549 -ORWorthIncrease,Bob,7.1,824 -ORWorthIncrease,Charlie,7.1,946 +ORWorthIncrease,Alice,7.1,395 +ORWorthIncrease,Bob,7.1,439 +ORWorthIncrease,Charlie,7.1,561 Has,BY,250 Has,SX,175 Has,BA,24 commit e5581e31305d172a7ff5d68ede5e5fe0207165bc Author: Erik Vos <eri...@xs...> Date: Tue Apr 10 15:09:03 2012 +0200 Player columns in StartRoundWindow and GameStatus can now be reordered. Required for 1880 and other games. Remaining issue: Undo does not reverse the new player order in the GameStatus window. But at the next SR the player order should be OK. diff --git a/rails/game/GameManager.java b/rails/game/GameManager.java index 15915f0..b379959 100644 --- a/rails/game/GameManager.java +++ b/rails/game/GameManager.java @@ -71,7 +71,7 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { protected int numberOfPlayers; protected State currentPlayer = new State("CurrentPlayer", Player.class); protected State priorityPlayer = new State("PriorityPlayer", Player.class); - protected StringState[] playerNameModels; + protected PlayerOrderState playerNamesModel; /** Map relating portfolio names and objects, to enable deserialization. * OBSOLETE since Rails 1.3.1, but still required to enable reading old saved files */ @@ -565,10 +565,8 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { numberOfPlayers = players.size(); priorityPlayer.setState(players.get(0)); setPlayerCertificateLimit (playerManager.getInitialPlayerCertificateLimit()); - playerNameModels = new StringState[numberOfPlayers]; - for (int i=0; i<numberOfPlayers; i++) { - playerNameModels[i] = new StringState ("Player_"+(i+1), players.get(i).getName()); - } + + playerNamesModel = new PlayerOrderState ("PlayerOrder", new ArrayList<String>(originalPlayerNamesList)); showCompositeORNumber = !"simple".equalsIgnoreCase(Config.get("or.number_format")); } @@ -639,7 +637,7 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { * @return instance of GameManager */ public static GameManagerI getInstance () { -// return gameManagerMap.get(NDC.peek()); + // return gameManagerMap.get(NDC.peek()); return gameManagerMap.get(GM_KEY); } @@ -1929,19 +1927,21 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { players.clear(); Player player; + List<String> reorderedPlayerNames = new ArrayList<String>(players.size()); for (int i=0; i<reorderedPlayers.size(); i++) { player = reorderedPlayers.get(i); players.add(player); player.setIndex (i); - playerNameModels[i].set(player.getName()); + reorderedPlayerNames.add(player.getName()); log.debug("New player "+i+" is "+player.getName() +" (cash="+Bank.format(player.getCash())+")"); } + playerNamesModel.set(reorderedPlayerNames); return this.players.get(0); } - public StringState getPlayerNameModel(int index) { - return playerNameModels[index]; + public PlayerOrderState getPlayerNamesModel() { + return playerNamesModel; } public void resetStorage() { @@ -1965,5 +1965,27 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { public void processPhaseAction (String name, String value) { getCurrentRound().processPhaseAction(name, value); } + + public class PlayerOrderState extends State { + + protected PlayerOrderState (String name, List<String> playerNames) { + super (name, playerNames); + } + + protected void set (List<String> playerNames) { + super.set (playerNames); + } + + @SuppressWarnings("unchecked") + @Override + public List<String> get() { + return (List<String>) super.get(); + } + + @Override + public String getText () { + return Util.joinWithDelimiter(get().toArray(new String[0]), ";"); + } + } } diff --git a/rails/game/GameManagerI.java b/rails/game/GameManagerI.java index 92f2a88..63ae0e5 100644 --- a/rails/game/GameManagerI.java +++ b/rails/game/GameManagerI.java @@ -6,6 +6,7 @@ import java.util.Map; import rails.algorithms.RevenueManager; import rails.common.*; import rails.common.parser.ConfigurableComponentI; +import rails.game.GameManager.PlayerOrderState; import rails.game.action.PossibleAction; import rails.game.correct.CorrectionManagerI; import rails.game.correct.CorrectionType; @@ -13,7 +14,6 @@ import rails.game.model.ModelObject; import rails.game.move.MoveStack; import rails.game.move.MoveableHolder; import rails.game.special.SpecialPropertyI; -import rails.game.state.StringState; public interface GameManagerI extends MoveableHolder, ConfigurableComponentI { @@ -222,7 +222,7 @@ public interface GameManagerI extends MoveableHolder, ConfigurableComponentI { public void setSkipDone (GameDef.OrStep step); public Player reorderPlayersByCash(boolean high); - public StringState getPlayerNameModel(int index) ; + public PlayerOrderState getPlayerNamesModel(); /** * reset the storage for other elements like tokens, special property diff --git a/rails/ui/swing/GameStatus.java b/rails/ui/swing/GameStatus.java index a10dd80..4022dc3 100644 --- a/rails/ui/swing/GameStatus.java +++ b/rails/ui/swing/GameStatus.java @@ -112,7 +112,8 @@ public class GameStatus extends GridPanel implements ActionListener { protected int actorIndex = -2; protected ButtonGroup buySellGroup = new ButtonGroup(); - protected ClickField dummyButton; // To be selected if none else is. + /** Invisible default radio button option */ + protected ClickField dummyButton = new ClickField("", "", "", this, buySellGroup); protected Map<PublicCompanyI, Integer> companyIndex = new HashMap<PublicCompanyI, Integer>(); @@ -187,8 +188,6 @@ public class GameStatus extends GridPanel implements ActionListener { upperPlayerCaption = new Cell[np]; lowerPlayerCaption = new Cell[np]; - MouseListener companyCaptionMouseClickListener = gameUIManager.getORUIManager().getORPanel().getCompanyCaptionMouseClickListener(); - int lastX = 0; int lastY = 1; certPerPlayerXOffset = ++lastX; @@ -256,19 +255,27 @@ public class GameStatus extends GridPanel implements ActionListener { fields = new JComponent[1+lastX][2+lastY]; rowVisibilityObservers = new RowVisibility[nc]; + initFields(); + + } + + protected void initFields () { + + MouseListener companyCaptionMouseClickListener = gameUIManager.getORUIManager().getORPanel().getCompanyCaptionMouseClickListener(); + // Top captions addField(new Caption(LocalText.getText("COMPANY")), 0, 0, 1, 2, WIDE_BOTTOM, true); addField(new Caption(LocalText.getText("PLAYERS")), certPerPlayerXOffset, 0, np, 1, WIDE_LEFT + WIDE_RIGHT, true); - boolean playerOrderCanVary = gameUIManager.getGameParameterAsBoolean(GuiDef.Parm.PLAYER_ORDER_VARIES); for (int i = 0; i < np; i++) { - if (playerOrderCanVary) { - f = upperPlayerCaption[i] = new Field(gameUIManager.getGameManager().getPlayerNameModel(i)); - upperPlayerCaption[i].setNormalBgColour(Cell.NORMAL_CAPTION_BG_COLOUR); - } else { - f = upperPlayerCaption[i] = new Caption(players.get(i).getNameAndPriority()); - } + //if (playerOrderCanVary) { + // f = upperPlayerCaption[i] = new Field(gameUIManager.getGameManager().getPlayerNameModel(i)); + // upperPlayerCaption[i].setNormalBgColour(Cell.NORMAL_CAPTION_BG_COLOUR); + //} else { + f = upperPlayerCaption[i] = new Caption(players.get(i).getNameAndPriority()); + log.debug(" GS: new player "+i+" is "+players.get(i).getName()); + //} int wideGapPosition = WIDE_BOTTOM + ((i==0)? WIDE_LEFT : 0) + ((i==np-1)? WIDE_RIGHT : 0); addField(f, certPerPlayerXOffset + i, 1, 1, 1, wideGapPosition, true); @@ -536,12 +543,12 @@ public class GameStatus extends GridPanel implements ActionListener { // Bottom player captions for (int i = 0; i < np; i++) { - if (playerOrderCanVary) { - f = lowerPlayerCaption[i] = new Field(gameUIManager.getGameManager().getPlayerNameModel(i)); - lowerPlayerCaption[i].setNormalBgColour(Cell.NORMAL_CAPTION_BG_COLOUR); - } else { - f = lowerPlayerCaption[i] = new Caption(players.get(i).getNameAndPriority()); - } + //if (playerOrderCanVary) { + // f = lowerPlayerCaption[i] = new Field(gameUIManager.getGameManager().getPlayerNameModel(i)); + // lowerPlayerCaption[i].setNormalBgColour(Cell.NORMAL_CAPTION_BG_COLOUR); + //} else { + f = lowerPlayerCaption[i] = new Caption(players.get(i).getNameAndPriority()); + //} int wideGapPosition = WIDE_TOP + ((i==0)? WIDE_LEFT : 0) + ((i==np-1)? WIDE_RIGHT : 0); addField(f, i + 1, playerCertCountYOffset + 1, 1, 1, wideGapPosition, true); @@ -583,8 +590,6 @@ public class GameStatus extends GridPanel implements ActionListener { newTrains = new Field(ipo.getTrainsModel()); addField(newTrains, newTrainsXOffset, newTrainsYOffset, 1, 1, 0, true); - dummyButton = new ClickField("", "", "", this, buySellGroup); - // Future trains addField(new Caption(LocalText.getText("Future")), futureTrainsXOffset, futureTrainsYOffset - 1, futureTrainsWidth, 1, WIDE_TOP, true); @@ -602,8 +607,39 @@ public class GameStatus extends GridPanel implements ActionListener { 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 + } + + public void recreate() { + log.debug("GameStatus.recreate() called"); + + // Remove old fields. Don't forget to deregister the Observers + deRegisterObservers(); + removeAll(); + + // Create new fields + initFields(); + + //repaint(); + } - dummyButton = new ClickField("", "", "", this, buySellGroup); + public void updatePlayerOrder (List<String> newPlayerNames) { + + List<String> oldPlayerNames = gameUIManager.getCurrentGuiPlayerNames(); + log.debug("GS: old player list: "+Util.joinWithDelimiter(oldPlayerNames.toArray(new String[0]), ",")); + log.debug("GS: new player list: "+Util.joinWithDelimiter(newPlayerNames.toArray(new String[0]), ",")); + + /* Currently, the passed new player order is ignored. + * A call to this method only serves as a signal to rebuild the player columns in the proper order + * (in fact, the shortcut is taken to rebuild the whole GameStatus panel). + * For simplicity reasons, the existing reference to the (updated) + * players list in GameManager is used. + * + * In the future (e.g. when implementing a client/server split), + * newPlayerNames may actually become to be used to reorder the + * (then internal) UI player list. + */ + recreate(); + gameUIManager.packAndApplySizing(parent); } public void actionPerformed(ActionEvent actor) { diff --git a/rails/ui/swing/GameUIManager.java b/rails/ui/swing/GameUIManager.java index a43f683..15e0f2c 100644 --- a/rails/ui/swing/GameUIManager.java +++ b/rails/ui/swing/GameUIManager.java @@ -16,6 +16,7 @@ import org.apache.log4j.Logger; import rails.common.*; import rails.game.*; import rails.game.action.*; +import rails.game.model.ModelObject; import rails.sound.SoundManager; import rails.ui.swing.elements.*; import rails.util.Util; @@ -88,6 +89,14 @@ public class GameUIManager implements DialogOwner { protected boolean previousResult; + // Player order + protected PlayerOrderView playerOrderView; + /** Player names set at time of initialisation or after reordering. + *<p> To be used as a reference to the current player order as shown in the UI. + * Note, that getPlayers() currently calls the game engine directly, and + * therefore updates before the UI gets notice via the playerOrderView.*/ + protected List<String> currentGuiPlayerNames; + /* Keys of dialogs owned by this class */ public static final String COMPANY_START_PRICE_DIALOG = "CompanyStartPrice"; public static final String SELECT_COMPANY_DIALOG = "SelectCompany"; @@ -120,6 +129,11 @@ public class GameUIManager implements DialogOwner { configuredStockChartVisibility = "yes".equalsIgnoreCase(Config.get("stockchart.window.open")); + playerOrderView = new PlayerOrderView(); + currentGuiPlayerNames = new ArrayList<String>(); + for (Player player : getPlayers()) { + currentGuiPlayerNames.add (player.getName()); + } } private void initWindowSettings () { @@ -552,6 +566,12 @@ public class GameUIManager implements DialogOwner { } + protected void updatePlayerOrder (List<String> newPlayerOrder) { + if (startRoundWindow != null) startRoundWindow.updatePlayerOrder (newPlayerOrder); + if (statusWindow != null) statusWindow.updatePlayerOrder (newPlayerOrder); + currentGuiPlayerNames = newPlayerOrder; + } + /** Stub, to be overridden in subclasses for special round types */ protected void updateStatus(ActionPerformer activeWindow) { @@ -1212,4 +1232,34 @@ public class GameUIManager implements DialogOwner { } }); } + + public List<String> getCurrentGuiPlayerNames() { + return currentGuiPlayerNames; + } + + public class PlayerOrderView implements ViewObject { + + PlayerOrderView () { + gameManager.getPlayerNamesModel().addObserver(this); + } + + public void update(Observable o, Object arg) { + if (o instanceof GameManager.PlayerOrderState && arg instanceof String) { + List<String> newPlayerNames = Arrays.asList(((String)arg).split(";")); + updatePlayerOrder (newPlayerNames); + } + + } + + public ModelObject getModel() { + // TODO Auto-generated method stub + return null; + } + + public void deRegister() { + // TODO Auto-generated method stub + + } + + } } diff --git a/rails/ui/swing/GridPanel.java b/rails/ui/swing/GridPanel.java index 20d78d3..a4f2592 100644 --- a/rails/ui/swing/GridPanel.java +++ b/rails/ui/swing/GridPanel.java @@ -112,28 +112,27 @@ implements ActionListener, KeyListener { int padTop, padLeft, padBottom, padRight; padTop = (wideGapPositions & WIDE_TOP) > 0 ? WIDE_GAP - NARROW_GAP : 0; padLeft = (wideGapPositions & WIDE_LEFT) > 0 ? WIDE_GAP - NARROW_GAP : 0; - padBottom = - (wideGapPositions & WIDE_BOTTOM) > 0 ? WIDE_GAP - NARROW_GAP : 0; - padRight = (wideGapPositions & WIDE_RIGHT) > 0 ? WIDE_GAP - NARROW_GAP : 0; + padBottom = (wideGapPositions & WIDE_BOTTOM) > 0 ? WIDE_GAP - NARROW_GAP : 0; + padRight = (wideGapPositions & WIDE_RIGHT) > 0 ? WIDE_GAP - NARROW_GAP : 0; - //set field borders - //- inner border: the field's native border - //- outline border: the field's outline (in narrow_gap thickness) - //- outer border: grid table lines (in wide_gap - narrow_gap thickness) + //set field borders + //- inner border: the field's native border + //- outline border: the field's outline (in narrow_gap thickness) + //- outer border: grid table lines (in wide_gap - narrow_gap thickness) - comp.setBorder(new FieldBorder(comp.getBorder(), - new DynamicBorder(cellOutlineColor,NARROW_GAP), - new DynamicBorder(tableBorderColor,padTop,padLeft,padBottom,padRight))); + comp.setBorder(new FieldBorder(comp.getBorder(), + new DynamicBorder(cellOutlineColor,NARROW_GAP), + new DynamicBorder(tableBorderColor,padTop,padLeft,padBottom,padRight))); - gridPanel.add(comp, gbc); + gridPanel.add(comp, gbc); - if (comp instanceof ViewObject - && ((ViewObject) comp).getModel() != null) { - observers.add((ViewObject) comp); - } + if (comp instanceof ViewObject + && ((ViewObject) comp).getModel() != null) { + observers.add((ViewObject) comp); + } - if (fields != null && fields[x][y] == null) fields[x][y] = comp; - comp.setVisible(visible); + if (fields != null && fields[x][y] == null) fields[x][y] = comp; + comp.setVisible(visible); } /** diff --git a/rails/ui/swing/StartRoundWindow.java b/rails/ui/swing/StartRoundWindow.java index cb3445c..ed4c2ca 100644 --- a/rails/ui/swing/StartRoundWindow.java +++ b/rails/ui/swing/StartRoundWindow.java @@ -10,7 +10,6 @@ import javax.swing.*; import org.apache.log4j.Logger; -import rails.common.GuiDef; import rails.common.LocalText; import rails.game.*; import rails.game.action.*; @@ -18,6 +17,7 @@ import rails.game.special.SpecialPropertyI; import rails.sound.SoundManager; import rails.ui.swing.elements.*; import rails.ui.swing.hexmap.HexHighlightMouseListener; +import rails.util.Util; /** * This displays the Auction Window @@ -64,8 +64,10 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { private int infoXOffset, infoYOffset; private Field itemStatus[]; // Remains invisible, only used for status tooltip + private int playerCaptionXOffset, upperPlayerCaptionYOffset, lowerPlayerCaptionYOffset; private Cell[] upperPlayerCaption; private Cell[] lowerPlayerCaption; + private JComponent[][] fields; private ActionButton bidButton; private ActionButton buyButton; @@ -183,7 +185,7 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { infoIcon = createInfoIcon(); - init(); + initCells(); getContentPane().add(statusPanel, BorderLayout.NORTH); getContentPane().add(buttonPanel, BorderLayout.SOUTH); @@ -223,9 +225,9 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { gameUIManager.packAndApplySizing(this); } - private void init() { + private void initCells() { int lastX = -1; - int lastY = 1; + int lastY = 0; itemName = new Caption[ni]; itemNameButton = new ClickField[ni]; @@ -239,6 +241,8 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { playerBids = new Field[np]; playerFree = new Field[np]; + upperPlayerCaptionYOffset = ++lastY; + itemNameXOffset = ++lastX; itemNameYOffset = ++lastY; if (showBasePrices) { @@ -249,7 +253,7 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { minBidXOffset = ++lastX; minBidYOffset = lastY; } - bidPerPlayerXOffset = ++lastX; + bidPerPlayerXOffset = playerCaptionXOffset = ++lastX; bidPerPlayerYOffset = lastY; infoXOffset = bidPerPlayerXOffset + np; @@ -264,6 +268,10 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { playerFreeCashXOffset = bidPerPlayerXOffset; playerFreeCashYOffset = ++lastY; + lowerPlayerCaptionYOffset = ++lastY; + + fields = new JComponent[1+infoXOffset][2+lastY]; + addField(new Caption(LocalText.getText("ITEM")), 0, 0, 1, 2, WIDE_RIGHT + WIDE_BOTTOM); if (showBasePrices) { @@ -278,16 +286,16 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { // Top player captions addField(new Caption(LocalText.getText("PLAYERS")), - bidPerPlayerXOffset, 0, np, 1, 0); - boolean playerOrderCanVary = getGameUIManager().getGameParameterAsBoolean(GuiDef.Parm.PLAYER_ORDER_VARIES); + playerCaptionXOffset, 0, np, 1, 0); + //boolean playerOrderCanVary = getGameUIManager().getGameParameterAsBoolean(GuiDef.Parm.PLAYER_ORDER_VARIES); for (int i = 0; i < np; i++) { - if (playerOrderCanVary) { - f = upperPlayerCaption[i] = new Field(getGameUIManager().getGameManager().getPlayerNameModel(i)); - upperPlayerCaption[i].setNormalBgColour(Cell.NORMAL_CAPTION_BG_COLOUR); - } else { - f = upperPlayerCaption[i] = new Caption(players.get(i).getNameAndPriority()); - } - addField(f, bidPerPlayerXOffset + i, 1, 1, 1, WIDE_BOTTOM); + //if (playerOrderCanVary) { + // f = upperPlayerCaption[i] = new Field(getGameUIManager().getGameManager().getPlayerNameModel(i)); + // upperPlayerCaption[i].setNormalBgColour(Cell.NORMAL_CAPTION_BG_COLOUR); + //} else { + f = upperPlayerCaption[i] = new Caption(players.get(i).getNameAndPriority()); + //} + addField(f, playerCaptionXOffset + i, upperPlayerCaptionYOffset, 1, 1, WIDE_BOTTOM); } for (int i = 0; i < ni; i++) { @@ -364,13 +372,13 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { } for (int i = 0; i < np; i++) { - if (playerOrderCanVary) { - f = lowerPlayerCaption[i] = new Field(getGameUIManager().getGameManager().getPlayerNameModel(i)); - lowerPlayerCaption[i].setNormalBgColour(Cell.NORMAL_CAPTION_BG_COLOUR); - } else { - f = lowerPlayerCaption[i] = new Caption(players.get(i).getNameAndPriority()); - } - addField(f, playerFreeCashXOffset + i, playerFreeCashYOffset + 1, + //if (playerOrderCanVary) { + // f = lowerPlayerCaption[i] = new Field(getGameUIManager().getGameManager().getPlayerNameModel(i)); + // lowerPlayerCaption[i].setNormalBgColour(Cell.NORMAL_CAPTION_BG_COLOUR); + //} else { + f = lowerPlayerCaption[i] = new Caption(players.get(i).getNameAndPriority()); + //} + addField(f, playerCaptionXOffset + i, lowerPlayerCaptionYOffset, 1, 1, WIDE_TOP); } @@ -390,13 +398,12 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { gbc.fill = GridBagConstraints.BOTH; 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); - - statusPanel.add(comp, gbc); + 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); + statusPanel.add(comp, gbc); + fields[x][y] = comp; } public void updateStatus(boolean myTurn) { @@ -548,11 +555,45 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { return true; } + public void updatePlayerOrder (List<String> newPlayerNames) { + + int[] xref = new int[np]; + List<String> oldPlayerNames = gameUIManager.getCurrentGuiPlayerNames(); + for (int i=0; i<np; i++) { + xref[i] = oldPlayerNames.indexOf(newPlayerNames.get(i)); + } + log.debug("SRW: old player list: "+Util.joinWithDelimiter(oldPlayerNames.toArray(new String[0]), ",")); + log.debug("SRW: new player list: "+Util.joinWithDelimiter(newPlayerNames.toArray(new String[0]), ",")); + //log.debug("SRW: xref="+Util.joinWithDelimiter(xref, ",")); + + JComponent[] cells = new Cell[np]; + GridBagConstraints[] constraints = new GridBagConstraints[np]; + JComponent f; + for (int y=upperPlayerCaptionYOffset; y<=lowerPlayerCaptionYOffset; y++) { + for (int i=0, x=playerCaptionXOffset; i<np; i++, x++) { + cells[i] = fields[x][y]; + constraints[i] = gb.getConstraints(cells[i]); + statusPanel.remove(cells[i]); + } + for (int i=0, x=playerCaptionXOffset; i<np; i++, x++) { + f = fields[x][y] = cells[xref[i]]; + statusPanel.add (f, constraints[i]); + } + } + for (int i=0, x=playerCaptionXOffset; i<np; i++, x++) { + upperPlayerCaption[i] = (Cell) fields[x][upperPlayerCaptionYOffset]; + lowerPlayerCaption[i] = (Cell) fields[x][lowerPlayerCaptionYOffset]; + } + + gameUIManager.packAndApplySizing(this); + } + /* * (non-Javadoc) * * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */ + public void actionPerformed(ActionEvent actor) { JComponent source = (JComponent) actor.getSource(); @@ -561,7 +602,7 @@ implements ActionListener, KeyListener, ActionPerformer, DialogOwner { StartItemAction currentActiveItem = (StartItemAction) ((ClickField) source).getPossibleActions().get( 0); - + //notify sound manager that click field has been selected SoundManager.notifyOfClickFieldSelection(currentActiveItem); diff --git a/rails/ui/swing/StatusWindow.java b/rails/ui/swing/StatusWindow.java index 554eef8..28d5c60 100644 --- a/rails/ui/swing/StatusWindow.java +++ b/rails/ui/swing/StatusWindow.java @@ -10,9 +10,7 @@ import javax.swing.*; import org.apache.log4j.Logger; -import rails.common.Config; -import rails.common.GuiDef; -import rails.common.LocalText; +import rails.common.*; import rails.game.*; import rails.game.action.*; import rails.game.correct.CorrectionModeAction; @@ -578,6 +576,10 @@ KeyListener, ActionPerformer { toFront(); } + public void updatePlayerOrder (List<String> newPlayerNames) { + gameStatus.updatePlayerOrder (newPlayerNames); + } + public void disableButtons () { passButton.setEnabled(false); autopassButton.setEnabled(false); |
From: Stefan F. <ste...@us...> - 2012-04-09 16:25:37
|
LocalisedText.properties | 3 +- data/1830/Game.xml | 4 +++ data/1830/Map.xml | 4 +-- data/18AL/Game.xml | 1 data/18TN/Game.xml | 1 rails/game/MapHex.java | 17 +++++++++++++ rails/game/TrainManager.java | 2 - rails/ui/swing/hexmap/GUITile.java | 47 +++++++++++++++++++++---------------- 8 files changed, 55 insertions(+), 24 deletions(-) New commits: commit 82d4e5c70e67e20c53a885aa19b6c81bb78f2f0c Author: Stefan Frey <ste...@we...> Date: Mon Apr 9 11:57:22 2012 +0200 Fixed wrong train obsoleting in 1830 variants (coalfields et.al.), reported by Arne Osterlund. Added new attribute ObsoleteTrainFor for TrainManager in Game.xml Added reporting for train obsoleting and rusting in ReportWindow. diff --git a/LocalisedText.properties b/LocalisedText.properties index 463e3ae..b1fad5b 100644 --- a/LocalisedText.properties +++ b/LocalisedText.properties @@ -734,7 +734,8 @@ TokenLayingHexMismatch=Token laid in {0} but special property is for {1}: mismat TRADE_TREASURY_SHARES_TITLE=Rails: Game Status - TRADING TREASURY SHARES OF COMPANY {0} TrainInfo={0}-train, price: {1}, quantity: {2} TrainsAvailable={0}-trains are now available. -TrainsObsolete=All {0}-trains are obsolete and will be removed after the next run. +TrainsObsolete.ALL=All {0}-trains are obsolete and will be removed after the next run. +TrainsObsolete.EXCEPT_TRIGGERING=All {0}-trains (except those owned by the active company) are obsolete and will be removed after the next run. TrainsObsoleteRusted=Obsolete Train {0} of company {1} rusted. TrainsRusted=All {0}-trains have rusted and have been removed. TREASURY_SHARES=<html>Treasury<br>shares diff --git a/data/1830/Game.xml b/data/1830/Game.xml index f6c1ffe..c39bf20 100644 --- a/data/1830/Game.xml +++ b/data/1830/Game.xml @@ -118,6 +118,10 @@ <Component name="StockMarket" class="rails.game.StockMarket" file="StockMarket.xml"/> <Component name="TrainManager" class="rails.game.TrainManager"> + <IfOption name="Variant" + value="Coalfields,Reading,Coalfields&Reading"> + <Attributes ObsoleteTrainFor="ALL" /> + </IfOption> <Defaults> <Reach base="stops" countTowns="yes"/> <!-- Alternative values: diff --git a/data/18AL/Game.xml b/data/18AL/Game.xml index 8cc9911..52712bf 100644 --- a/data/18AL/Game.xml +++ b/data/18AL/Game.xml @@ -58,6 +58,7 @@ <Component name="StockMarket" class="rails.game.StockMarket" file="StockMarket.xml"/> <Component name="TrainManager" class="rails.game.TrainManager"> + <Attributes ObsoleteTrainFor="EXCEPT_TRIGGERING" /> <Defaults class="rails.game.specific._18AL.NameableTrain"> <Reach base="stops" countTowns="no"/> <Score towns="yes"/> diff --git a/data/18TN/Game.xml b/data/18TN/Game.xml index 62f3209..a5957bf 100644 --- a/data/18TN/Game.xml +++ b/data/18TN/Game.xml @@ -53,6 +53,7 @@ <Component name="StockMarket" class="rails.game.StockMarket" file="StockMarket.xml"/> <Component name="TrainManager" class="rails.game.TrainManager"> + <Attributes ObsoleteTrainFor="EXCEPT_TRIGGERING" /> <Defaults> <Reach base="stops" countTowns="yes"/> <!-- Alternative values: diff --git a/rails/game/TrainManager.java b/rails/game/TrainManager.java index 2b18b83..b99b128 100644 --- a/rails/game/TrainManager.java +++ b/rails/game/TrainManager.java @@ -1 +1 @@ -/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/TrainManager.java,v 1.28 2010/04/21 21:25:50 evos Exp $ */ package rails.game; import java.util.*; import org.apache.log4j.Logger; import rails.common.LocalText; import rails.common.parser.ConfigurableComponentI; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; import rails.game.move.ObjectMove; import rails.game.state.BooleanState; import rails.game.state.IntegerState; public class TrainManager implements ConfigurableComponentI { // Static attributes protected List<TrainType> lTrainTypes = new ArrayList<TrainType>(); protected Map<String, TrainType> mTrainTypes = new HashMap<String, TrainType>(); protected List<TrainCertificateType> trainCertTypes = new ArrayList<TrainCertificateType>(); protected Map<String, TrainCertificateType> trainCertTypeMap = new HashMap<String, TrainCertificateType>(); protected Map<String, TrainI> trainMap = new HashMap<String, TrainI>(); protected Map<TrainCertificateType, List<TrainI>> trainsPerCertType = new HashMap<TrainCertificateType, List<TrainI>>(); protected TrainType defaultType = null; // Only required locally and in ChoiceType private boolean removeTrain = false; // Dynamic attributes protected IntegerState newTypeIndex; protected Map<String, Integer> lastIndexPerType = new HashMap<String, Integer>(); protected boolean trainsHaveRusted = false; protected boolean phaseHasChanged = false; protected boolean trainAvailabilityChanged = false; protected List<PublicCompanyI> companiesWithExcessTrains; protected GameManagerI gameManager = null; protected Bank bank = null; /** Required for the sell-train-to-foreigners feature of some games */ protected BooleanState anyTrainBought = new BooleanState ("AnyTrainBought", false); // Triggered phase changes protected Map<TrainCertificateType, Map<Integer, |
From: Stefan F. <ste...@us...> - 2012-04-05 10:42:04
|
buildRails.xml | 6 +++--- rails/ui/swing/elements/RailsIcon.java | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) New commits: commit 64ba0577d8393210715c85a7153f6d3a37113f2c Author: Stefan Frey <ste...@we...> Date: Thu Apr 5 12:41:37 2012 +0200 fixed UI problem in 18EU startound: missing text on decline to bid button, reported by Volker Schnell diff --git a/rails/ui/swing/elements/RailsIcon.java b/rails/ui/swing/elements/RailsIcon.java index 90db59c..3cb1a61 100644 --- a/rails/ui/swing/elements/RailsIcon.java +++ b/rails/ui/swing/elements/RailsIcon.java @@ -21,6 +21,7 @@ public enum RailsIcon { BUY_PRIVATE ("money_bag.png","BUY_PRIVATE"), BUY_TRAIN ("train.png","BUY_TRAIN"), CANCEL ("cancel.png","CANCEL"), + DECLINE_TO_BID ("control_play_blue.png","DeclineToBid"), DONE ("accept.png","Done"), INFO ("information.png","Info"), LAY_TILE ("add.png","LayTile"), commit f33e444b4d7cca4911733dcd4f035175585e6d56 Author: Stefan Frey <ste...@we...> Date: Wed Apr 4 17:20:48 2012 +0200 changed uri and user defintion for sourceforge file system diff --git a/buildRails.xml b/buildRails.xml index 93946e1..3af31a6 100644 --- a/buildRails.xml +++ b/buildRails.xml @@ -3,7 +3,7 @@ <project basedir="." default="build" name="Rails"> <!-- Sourceforge properties --> - <property name="sf.uri" value="frs.sourceforge.net:/home/frs/project/r/ra/rails/"/> + <property name="sf.uri" value="frs.sourceforge.net:/home/frs/project/rails/"/> <property name="sf.filedir" value="Rails/"/> <property name="sf.user" value="stefanfrey"/> <!-- Password is asked for --> @@ -160,11 +160,11 @@ <arg value="ssh"/> <arg value="rails-${version}.zip"/> <arg value="rails-${version}.tar.gz"/> - <arg value="${sf.user},rails@${sf.uri}${sf.filedir}${version}/"/> + <arg value="${sf.user}@${sf.uri}${sf.filedir}${version}/"/> </exec> <exec executable="scp" dir="./" failonerror="true"> <arg value="readme.txt"/> - <arg value="${sf.user},rails@${sf.uri}${sf.filedir}${version}/"/> + <arg value="${sf.user}@${sf.uri}${sf.filedir}${version}/"/> </exec> </target> </project> \ No newline at end of file |
From: Stefan F. <ste...@us...> - 2012-04-04 14:57:25
|
Tag 'v1.7.2' created by Stefan Frey <ste...@we...> at 2012-04-04 14:56 +0000 rails version 1.7.2 Changes since v1.7.1-6: --- 0 files changed --- |
From: Stefan F. <ste...@us...> - 2012-04-04 14:57:23
|
rails/ui/swing/ORUIManager.java | 9 ++++----- readme.txt | 23 ++++++----------------- version.number | 2 +- 3 files changed, 11 insertions(+), 23 deletions(-) New commits: commit 727d742bdfed911891d18fb829ed8eaa79f02c9d Author: Stefan Frey <ste...@we...> Date: Wed Apr 4 16:56:16 2012 +0200 prepared for rails 1.7.2 diff --git a/readme.txt b/readme.txt index c615a0f..d6da496 100644 --- a/readme.txt +++ b/readme.txt @@ -1,25 +1,14 @@ -Rails release 1.7.1: +Rails release 1.7.2: A new maintenance release for Rails 1.x series This release fixes several recent bugs. -Contributors: Erik Vos, Martin Brumm, Stefan Frey +Contributors: Erik Vos, Stefan Frey -Bugs reported by John David Galt, Volker Schnell, Mike Bourke, Arne Ãstlund, Jerry Anderson -(I hope I forgot to list no one). - -A few minor improvements to the rails setup: -- An (initial) configuration profile for face-to-face/hotseat play is added ("hotseat"): Activates autosave and changes filename pattern -suggested for save. -- Windows settings (including docking settings if activated) and autosave backup are stored in the centralized rails configuraton folder. -Thus from this release on those settings should survive upgrades to new releases. +Bugs reported by John David Galt, Phil Davies List of bugs fixed: - -- Typo in manifest that caused image errors in some background maps -- 18EU: Not possible to lay home token for companies started outside of current network. -- 1856, 18EU, 1830 Coalfield and others: Fixed wrong calculation for routes for Goderich tile, red off-board run-through (-939) -- 18Kaas: Enables unlimited D-trains option -- 1835: Fixed wrong total player worth calculation -- 1835: Fixed wrong revenue calculation with respect to Elsas/Alsace outside of green phase +- Fixed error in creation of new profiles on Windows OS systems +- Made configuration system more robust against corrupted/misconfigured profiles +- Fixed missing options after "Destinations reached" dialogue without any selection diff --git a/version.number b/version.number index 982695a..83bbf18 100644 --- a/version.number +++ b/version.number @@ -1,5 +1,5 @@ #Property file that contains version number and the develop indicator -version=1.7.1 +version=1.7.2 # the following string "@DEVELOP@ is replaced by an empty string in the release version # this is done automatically by ant develop=@DEVELOP@ \ No newline at end of file commit d0c6540a9250e2f48bc6b7b772c56db16fc0acfa Author: Erik Vos <eri...@xs...> Date: Tue Apr 3 15:32:06 2012 +0200 Fixed: after 'Destinations reached' dialog with no checks, buttons remained disabled. Reported by John David Galt.(cherry picked from commit 7394b2bb745bfd1cc665fb3ee5513f7a9461c6e2) diff --git a/rails/ui/swing/ORUIManager.java b/rails/ui/swing/ORUIManager.java index 0c634df..0224995 100644 --- a/rails/ui/swing/ORUIManager.java +++ b/rails/ui/swing/ORUIManager.java @@ -9,9 +9,7 @@ import org.apache.log4j.Logger; import org.jgrapht.graph.SimpleGraph; import rails.algorithms.*; -import rails.common.Config; -import rails.common.GuiDef; -import rails.common.LocalText; +import rails.common.*; import rails.game.*; import rails.game.action.*; import rails.game.correct.*; @@ -590,12 +588,13 @@ public class ORUIManager implements DialogOwner { // Prevent that a null action gets processed if (action.getReachedCompanies() == null - || action.getReachedCompanies().isEmpty()) return; + || action.getReachedCompanies().isEmpty()) currentDialogAction = null; } else { - return; + currentDialogAction = null; } + // Required even if no action is executed, to update the UI, re-enable buttons etc. gameUIManager.processAction(currentDialogAction); } |
From: Stefan F. <ste...@us...> - 2012-04-04 14:06:13
|
rails/common/ConfigProfile.java | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) New commits: commit 8f3d0f38fae254c55c74930be3e4142b012af685 Author: Stefan Frey <ste...@we...> Date: Wed Apr 4 16:05:42 2012 +0200 made selection of start profile and parent profile more robust diff --git a/rails/common/ConfigProfile.java b/rails/common/ConfigProfile.java index 3b9d101..2fb7762 100644 --- a/rails/common/ConfigProfile.java +++ b/rails/common/ConfigProfile.java @@ -111,20 +111,27 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { static ConfigProfile getStartProfile() { // first checks cli - String profile = System.getProperty(CLI_AND_RECENT_OPTION); - if (Util.hasValue(profile) && profiles.containsKey(profile)) { - return profiles.get(profile); + ConfigProfile profile = getProfile(System.getProperty(CLI_AND_RECENT_OPTION)); + if (profile != null) { + return profile; } // second check recent - profile = Config.getRecent(CLI_AND_RECENT_OPTION); - if (Util.hasValue(profile) && profiles.containsKey(profile)) { - return profiles.get(profile); + profile = getProfile(Config.getRecent(CLI_AND_RECENT_OPTION)); + if (profile != null) { + return profile; } // third return standard profile - return profiles.get(STANDARD_PROFILE); + profile = getProfile(STANDARD_PROFILE); + if (profile != null) { + return profile; + } + // last return root + return root; } static ConfigProfile getProfile(String name) { + if (name == null) return null; + if (name.equals(ROOT_PROFILE)) return root; return profiles.get(name); } @@ -169,7 +176,7 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { } private ConfigProfile setParent(String name) { - return setParent(profiles.get(name)); + return setParent(getProfile(name)); } ConfigProfile getParent() { |
From: Stefan F. <ste...@us...> - 2012-04-03 15:00:42
|
data/profiles/ORDocking.predefined | 2 ++ data/profiles/prettyUI.predefined | 2 ++ rails/common/ConfigProfile.java | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 8f6de4968fea3b5268a0324a9ddbf2c6ea8819a5 Author: Stefan Frey <ste...@we...> Date: Tue Apr 3 17:00:04 2012 +0200 avoid runtime error due to missing parent defintions diff --git a/data/profiles/ORDocking.predefined b/data/profiles/ORDocking.predefined index aa4985d..19c00d9 100644 --- a/data/profiles/ORDocking.predefined +++ b/data/profiles/ORDocking.predefined @@ -1,5 +1,7 @@ ### ORDocking profile ### activates the docking framework or.window.dockablePanels=yes +### parent +profile.parent=pbem ### cannot be derived profile.final=yes diff --git a/data/profiles/prettyUI.predefined b/data/profiles/prettyUI.predefined index f2e51b3..cfcf6f3 100644 --- a/data/profiles/prettyUI.predefined +++ b/data/profiles/prettyUI.predefined @@ -7,5 +7,7 @@ gridPanel.tableBorders=enabled map.image.display=yes map.displayCurrentRoutes=yes map.highlightHexes=yes +### parent +profile.parent=pbem ### cannot be derived profile.final=yes diff --git a/rails/common/ConfigProfile.java b/rails/common/ConfigProfile.java index 1ee6876..3b9d101 100644 --- a/rails/common/ConfigProfile.java +++ b/rails/common/ConfigProfile.java @@ -179,7 +179,7 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { String getProperty(String key) { ensureLoad(); - if (this == root || properties.containsKey(key)) { + if (this == parent || properties.containsKey(key)) { return properties.getProperty(key); } else { return parent.getProperty(key); @@ -254,6 +254,7 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { if (Util.hasValue(properties.getProperty(PARENT_KEY))) { setParent(properties.getProperty(PARENT_KEY)); } + if (parent == null) { setParent(root); } |
From: Stefan F. <ste...@us...> - 2012-04-03 14:36:35
|
rails/common/ConfigProfile.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) New commits: commit bf4edec12c22ba77b954fc4cdfb6912557ccd79a Author: Stefan Frey <ste...@we...> Date: Tue Apr 3 16:34:47 2012 +0200 fixed wrong logic in setProperty of configProfile diff --git a/rails/common/ConfigProfile.java b/rails/common/ConfigProfile.java index 1057a72..1ee6876 100644 --- a/rails/common/ConfigProfile.java +++ b/rails/common/ConfigProfile.java @@ -188,10 +188,10 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { void setProperty(String key, String value) { ensureLoad(); - if (!parent.getProperty(key).equals(value)) { - properties.setProperty(key, value); - } else { + if (parent.getProperty(key) != null && parent.getProperty(key).equals(value)) { properties.remove(key); + } else { + properties.setProperty(key, value); } } @@ -219,7 +219,8 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { newProfile.setParent(reference); // copy properties - for (String key:properties.stringPropertyNames()){ + for (Object k:properties.keySet()){ + String key = (String)k; if (!key.equals(PARENT_KEY) && !key.equals(FINAL_KEY)) { newProfile.setProperty(key, properties.getProperty(key)); } @@ -350,6 +351,7 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { result = false; } + if (result) { // and reassign and save children for (ConfigProfile child:getChildren()) { @@ -382,3 +384,4 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { } + |
From: Erik V. <ev...@us...> - 2012-04-03 13:32:41
|
rails/ui/swing/ORUIManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit 7394b2bb745bfd1cc665fb3ee5513f7a9461c6e2 Author: Erik Vos <eri...@xs...> Date: Tue Apr 3 15:32:06 2012 +0200 Fixed: after 'Destinations reached' dialog with no checks, buttons remained disabled. Reported by John David Galt. diff --git a/rails/ui/swing/ORUIManager.java b/rails/ui/swing/ORUIManager.java index 0c634df..0224995 100644 --- a/rails/ui/swing/ORUIManager.java +++ b/rails/ui/swing/ORUIManager.java @@ -9,9 +9,7 @@ import org.apache.log4j.Logger; import org.jgrapht.graph.SimpleGraph; import rails.algorithms.*; -import rails.common.Config; -import rails.common.GuiDef; -import rails.common.LocalText; +import rails.common.*; import rails.game.*; import rails.game.action.*; import rails.game.correct.*; @@ -590,12 +588,13 @@ public class ORUIManager implements DialogOwner { // Prevent that a null action gets processed if (action.getReachedCompanies() == null - || action.getReachedCompanies().isEmpty()) return; + || action.getReachedCompanies().isEmpty()) currentDialogAction = null; } else { - return; + currentDialogAction = null; } + // Required even if no action is executed, to update the UI, re-enable buttons etc. gameUIManager.processAction(currentDialogAction); } |
From: Stefan F. <ste...@us...> - 2012-04-03 11:42:31
|
buildRails.xml | 2 +- rails/common/ConfigProfile.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) New commits: commit ab58aaeb53a57b9b714f4d76d0d48d8c1018fe7a Author: Stefan Frey <ste...@we...> Date: Tue Apr 3 13:42:10 2012 +0200 fixed error in the creation of new profiles that causes an error on other systems diff --git a/rails/common/ConfigProfile.java b/rails/common/ConfigProfile.java index 20eee1c..1057a72 100644 --- a/rails/common/ConfigProfile.java +++ b/rails/common/ConfigProfile.java @@ -206,6 +206,7 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { ensureLoad(); ConfigProfile newProfile = new ConfigProfile(Type.USER, name); + newProfile.loaded = true; // the new profile is assumed to be loaded ConfigProfile reference; if (isFinal()) { commit 7063df618853db00e7b7c52acfe87eb04f0f81a9 Author: Stefan Frey <ste...@we...> Date: Tue Apr 3 13:41:33 2012 +0200 fixed wrong readme.txt reference in build file diff --git a/buildRails.xml b/buildRails.xml index 158fc15..93946e1 100644 --- a/buildRails.xml +++ b/buildRails.xml @@ -162,7 +162,7 @@ <arg value="rails-${version}.tar.gz"/> <arg value="${sf.user},rails@${sf.uri}${sf.filedir}${version}/"/> </exec> - <exec executable="scp" dir="../../rails-${version}" failonerror="true"> + <exec executable="scp" dir="./" failonerror="true"> <arg value="readme.txt"/> <arg value="${sf.user},rails@${sf.uri}${sf.filedir}${version}/"/> </exec> |
From: Stefan F. <ste...@us...> - 2012-04-03 10:59:57
|
Tag 'v1.7.1' created by Stefan Frey <ste...@we...> at 2012-04-03 10:59 +0000 rails version 1.7.1 Changes since v1.7.0-16: --- 0 files changed --- |
From: Stefan F. <ste...@us...> - 2012-04-03 10:59:53
|
rails/game/specific/_1835/ElsasModifier.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) New commits: commit 6a7bca5cc8266db82a457a88caa03259822797d2 Author: Stefan Frey <ste...@we...> Date: Tue Apr 3 12:12:24 2012 +0200 fixed recent 1835 elsas modifier: added N4 hex diff --git a/rails/game/specific/_1835/ElsasModifier.java b/rails/game/specific/_1835/ElsasModifier.java index cce0b74..2c9898c 100644 --- a/rails/game/specific/_1835/ElsasModifier.java +++ b/rails/game/specific/_1835/ElsasModifier.java @@ -1,5 +1,7 @@ package rails.game.specific._1835; +import java.util.ArrayList; +import java.util.List; import java.util.Set; import org.apache.log4j.Logger; @@ -29,12 +31,15 @@ public class ElsasModifier implements NetworkGraphModifier { GameManagerI gm = GameManager.getInstance(); SimpleGraph<NetworkVertex, NetworkEdge> graph = graphBuilder.getMapGraph(); - // Check if elsasHex has zero value ... - MapHex elsasHex = gm.getMapManager().getHex("M5"); - if (elsasHex.getCurrentValueForPhase(gm.getCurrentPhase()) == 0) { - // .. then remove - Set<NetworkVertex> elsasVertices = NetworkVertex.getVerticesByHex(graph.vertexSet(), elsasHex); - graph.removeAllVertices(elsasVertices); + // Check if (one of the elsasHex has zero value ... + MapHex hex = gm.getMapManager().getHex("M5"); + if (hex.getCurrentValueForPhase(gm.getCurrentPhase()) == 0) { + // .. then remove both + Set<NetworkVertex> vertices = NetworkVertex.getVerticesByHex(graph.vertexSet(), hex); + graph.removeAllVertices(vertices); + hex = gm.getMapManager().getHex("N4"); + vertices = NetworkVertex.getVerticesByHex(graph.vertexSet(), hex); + graph.removeAllVertices(vertices); log.debug("Elsas is inactive"); } } |
From: Stefan F. <ste...@us...> - 2012-04-03 09:56:13
|
data/profiles/LIST_OF_PROFILES | 2 data/profiles/ftf.predefined | 4 - data/profiles/hotseat.predefined | 4 + readme.txt | 85 ++++++++------------------------------- version.number | 2 5 files changed, 24 insertions(+), 73 deletions(-) New commits: commit e26ef7440c373db7459c4b734a6d2d7db85aec23 Author: Stefan Frey <ste...@we...> Date: Tue Apr 3 11:55:40 2012 +0200 prepared for version 1.7.1 diff --git a/readme.txt b/readme.txt index 0bac2d1..c615a0f 100644 --- a/readme.txt +++ b/readme.txt @@ -1,74 +1,25 @@ -Rails release 1.7.0: +Rails release 1.7.1: -A new release for Rails 1.x series +A new maintenance release for Rails 1.x series -This release celebrates many improvements to the UI due to the -work of Frederick Weld. +This release fixes several recent bugs. -Contributors: Erik Vos, Frederick Weld, Martin Brumm, Stefan Frey +Contributors: Erik Vos, Martin Brumm, Stefan Frey -Includes all previously reported bug fixes of the 1.6.x branch. +Bugs reported by John David Galt, Volker Schnell, Mike Bourke, Arne Ãstlund, Jerry Anderson +(I hope I forgot to list no one). -Please be aware that this release contains many changes, so bugs are more likely. -Any feedback is welcome. +A few minor improvements to the rails setup: +- An (initial) configuration profile for face-to-face/hotseat play is added ("hotseat"): Activates autosave and changes filename pattern +suggested for save. +- Windows settings (including docking settings if activated) and autosave backup are stored in the centralized rails configuraton folder. +Thus from this release on those settings should survive upgrades to new releases. -Many of the included changes are NOT activated by default: Either switch them off -using the configuration dialog or use one of the new predefined profiles: - -prettyUI --> all UI changes except docking activated -ORdocking --> only activates the docking framework -(currently only available for the OR window) - -Note: To show a background map, the option has to be switched on in Configuration => Map/Report => Display background map. -Background maps are only available for 1856, 1889, 18EU, 18GA (incl. Cotton Port) and 18AL so far. - -The following are the major changes by topic: - -General UI improvements: -* Interactive highlighting of hexes -* Enhanced highlighting of active table cells during Operating Round -* Adaptive rendering of token labels -* Lay Tile: Invalid tile lays are displayed (incl. the reason for -not being valid) -* Support for icons -* Splash screen with improvement startup behavior - -Added UI options: -* Map / Zoom Fit Option: Fit-to-window and more -* Map / Display Routes of Active Company -* Map / Highlight company locations -* Appearance / Display borders in grid layout -* Windows / Flexible panels for operating round: -Applies a docking framework to Operating Round Window - -Added Music/Sound Effects options (mp3 only): -* Music: Background music can be specified per round-type and phase -* Sound Effects: Sound effects can be associated to more than 20 game events -* Includes support of "intelligent" effects (eg., revenue -sound as in RailroadTycoon1) -* No music/sound files are provided by Rails - -Rails configuration: -* Added support for OS dependent centralized rails file storage -(UNIX: ~/rails, Windows: %APPDIR, MacOS: ~/Library/Preferences/net.sourceforge.rails) -* New configuration profile system based on profile hierachy -* Several predefined profiles can be distributed - -Further changes: -* Added StatusWindow File menu action to dump the (transposed) contents into a csv file -* Several changes to use non-modal dialogs -* Several updates to 1880 development -* Added user-friendly network info including keyboard shortcut -* Added highlighting of private companies' hexes triggered by mouse-over -* Added invalid tile lays to upgrade panel (grayed out & reason) -* Added option to play 1856 as a 2-player game. - - -Further bug fixes: -* Fix for 1835 bug: BY presidency not transferred during start round. -* Always address the company president when a home token must be relaid. -* Fixed 'Load Recent' by running it in a separate thread. -* Fixed the glitch of initially displaying map images in the wrong scale -* Fixed 1856 background map's mini-map (Windsor area) -* Added precise sizing and positioning of token labels +List of bugs fixed: +- Typo in manifest that caused image errors in some background maps +- 18EU: Not possible to lay home token for companies started outside of current network. +- 1856, 18EU, 1830 Coalfield and others: Fixed wrong calculation for routes for Goderich tile, red off-board run-through (-939) +- 18Kaas: Enables unlimited D-trains option +- 1835: Fixed wrong total player worth calculation +- 1835: Fixed wrong revenue calculation with respect to Elsas/Alsace outside of green phase diff --git a/version.number b/version.number index 59d7603..982695a 100644 --- a/version.number +++ b/version.number @@ -1,5 +1,5 @@ #Property file that contains version number and the develop indicator -version=1.7.0 +version=1.7.1 # the following string "@DEVELOP@ is replaced by an empty string in the release version # this is done automatically by ant develop=@DEVELOP@ \ No newline at end of file commit 16e1bc9ede9820a1f10ab280e8965c50c1e32336 Author: Stefan Frey <ste...@we...> Date: Tue Apr 3 11:48:43 2012 +0200 renamed ftf profile to hotseat diff --git a/data/profiles/LIST_OF_PROFILES b/data/profiles/LIST_OF_PROFILES index eeeda12..cd648ff 100644 --- a/data/profiles/LIST_OF_PROFILES +++ b/data/profiles/LIST_OF_PROFILES @@ -2,6 +2,6 @@ ### available for user selection ### with extension .predefined pbem -ftf +hotseat ORDocking prettyUI diff --git a/data/profiles/ftf.predefined b/data/profiles/ftf.predefined deleted file mode 100644 index c784667..0000000 --- a/data/profiles/ftf.predefined +++ /dev/null @@ -1,4 +0,0 @@ -### ftf profile -### optimized for face-to-face play -save.filename.suffix=CURRENT_ROUND -save.recovery.active=yes diff --git a/data/profiles/hotseat.predefined b/data/profiles/hotseat.predefined new file mode 100644 index 0000000..c784667 --- /dev/null +++ b/data/profiles/hotseat.predefined @@ -0,0 +1,4 @@ +### ftf profile +### optimized for face-to-face play +save.filename.suffix=CURRENT_ROUND +save.recovery.active=yes |
From: Stefan F. <ste...@us...> - 2012-04-03 09:37:31
|
data/1835/Game.xml | 3 + rails/game/specific/_1835/ElsasModifier.java | 41 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) New commits: commit b9e3d4c14a6ef9b2ac3fb50641bb1e4ed38d1b6c Author: Stefan Frey <ste...@we...> Date: Tue Apr 3 11:37:01 2012 +0200 added 1835 modifier for elsas to fix wrong revenue calculation reported by jdg diff --git a/data/1835/Game.xml b/data/1835/Game.xml index 2f26bbf..d9f62a8 100644 --- a/data/1835/Game.xml +++ b/data/1835/Game.xml @@ -114,4 +114,7 @@ <Trains rusted="3+3"/> </Phase> </Component> + <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> + <Modifier class="rails.game.specific._1835.ElsasModifier" /> + </Component> </ComponentManager> diff --git a/rails/game/specific/_1835/ElsasModifier.java b/rails/game/specific/_1835/ElsasModifier.java new file mode 100644 index 0000000..cce0b74 --- /dev/null +++ b/rails/game/specific/_1835/ElsasModifier.java @@ -0,0 +1,41 @@ +package rails.game.specific._1835; + +import java.util.Set; + +import org.apache.log4j.Logger; +import org.jgrapht.graph.SimpleGraph; + +import rails.algorithms.NetworkEdge; +import rails.algorithms.NetworkGraphBuilder; +import rails.algorithms.NetworkGraphModifier; +import rails.algorithms.NetworkVertex; +import rails.game.GameManager; +import rails.game.GameManagerI; +import rails.game.MapHex; + +/** + * Analogue to the BirminghamTileModifier in 1851 + * Removes Elsas from the map if value is equal to zero + * @author freystef + */ + +public class ElsasModifier implements NetworkGraphModifier { + + protected static Logger log = + Logger.getLogger(ElsasModifier.class.getPackage().getName()); + + public void modifyGraph(NetworkGraphBuilder graphBuilder) { + + GameManagerI gm = GameManager.getInstance(); + SimpleGraph<NetworkVertex, NetworkEdge> graph = graphBuilder.getMapGraph(); + + // Check if elsasHex has zero value ... + MapHex elsasHex = gm.getMapManager().getHex("M5"); + if (elsasHex.getCurrentValueForPhase(gm.getCurrentPhase()) == 0) { + // .. then remove + Set<NetworkVertex> elsasVertices = NetworkVertex.getVerticesByHex(graph.vertexSet(), elsasHex); + graph.removeAllVertices(elsasVertices); + log.debug("Elsas is inactive"); + } + } +} |
From: Stefan F. <ste...@us...> - 2012-04-01 12:23:45
|
data/1830/Map.xml | 8 data/1830/TileSet.xml | 1 data/1830/Tiles.xml | 5 data/1856/Map.xml | 2 data/1856/TileSet.xml | 1 data/1856/Tiles.xml | 6 data/18EU/Map.xml | 2 data/18EU/TileSet.xml | 1 data/18EU/Tiles.xml | 6 data/18Kaas/Game.xml | 6 rails/game/PublicCompany.java | 12 test/data/bugs/18EU_layhomeHex.rails |binary test/data/bugs/18EU_layhomeHex.report | 1592 +++++++++++++++ test/data/test/1835_PRHasTwoExcessTrains.report | 2282 +++++++++++----------- test/data/test/1835_PR_3rdTrain.report | 2206 ++++++++++----------- test/data/test/1835_SwapPresForDoubleShare.report | 700 +++--- 16 files changed, 4205 insertions(+), 2625 deletions(-) New commits: commit dd3d3f087feed0428e3f18a0968291e6a4c9c9e2 Author: Stefan Frey <ste...@we...> Date: Sun Apr 1 14:23:00 2012 +0200 changed reports for 1835 after fix of Prussian worth calculation diff --git a/test/data/test/1835_PRHasTwoExcessTrains.report b/test/data/test/1835_PRHasTwoExcessTrains.report index 2049760..8b9b361 100644 --- a/test/data/test/1835_PRHasTwoExcessTrains.report +++ b/test/data/test/1835_PRHasTwoExcessTrains.report @@ -1,1141 +1,1141 @@ -GameIs,1835 -PlayerIs,1,Alice -PlayerIs,2,Bob -PlayerIs,3,Charlie -PlayerCash,600 -BankHas,10200 -StartOfPhase,2 -BankSizeIs,10200 -StartOfInitialRound -HasPriority,Alice -BuysItemFor,Alice,NF,100 -ALSO_GETS,Alice,CERT_NAME,BY,10 -BuysItemFor,Bob,M1,80 -FloatsWithCash,M1,80 -BuysItemFor,Charlie,LD,190 -ALSO_GETS,Charlie,PRES_CERT_NAME,SX,20 -BuysItemFor,Alice,M2,170 -FloatsWithCash,M2,170 -BuysItemFor,Bob,M3,80 -FloatsWithCash,M3,80 -BuysItemFor,Charlie,M4,160 -FloatsWithCash,M4,160 -BuysItemFor,Alice,PRES_CERT_NAME,BY,20,184 -BuysItemFor,Bob,BB,130 -BuysItemFor,Charlie,HB,160 -BuysItemFor,Alice,OBB,120 -ALSO_GETS,Alice,CERT_NAME,BY,10 -BuysItemFor,Bob,PfB,150 -ALSO_GETS,Bob,CERT_NAME,BY,10 -FloatsWithCash,BY,460 -BuysItemFor,Charlie,M5,80 -FloatsWithCash,M5,80 -CannotBuyAnything,Alice -BuysItemFor,Bob,M6,80 -FloatsWithCash,M6,80 -Has,M1,80 -Has,M2,170 -Has,M3,80 -Has,M4,160 -Has,M5,80 -Has,M6,80 -Has,BY,460 -Has,Alice,26 -Has,Bob,80 -Has,Charlie,10 -StartStockRound,1 -HasPriority,Charlie -PASSES,Charlie -PASSES,Alice -PASSES,Bob - -END_SR,1 -Has,M1,80 -Has,M2,170 -Has,M3,80 -Has,M4,160 -Has,M5,80 -Has,M6,80 -Has,BY,460 -Has,Alice,26 -Has,Bob,80 -Has,Charlie,10 -START_OR,1.1 -ReceivesFor,Alice,5,NF -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Charlie,20,LD -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,202,H2,W -CompanyDoesNotPayDividend,M1 -BuysTrain,M1,2,IPO,80 -FirstTrainBought,2 - -CompanyOperates,M2,Alice -LaysTileAt,M2,8,E17,NW -CompanyDoesNotPayDividend,M2 -BuysTrain,M2,2,IPO,80 - -CompanyOperates,M3,Bob -LaysTileAt,M3,6,F14,NW -CompanyDoesNotPayDividend,M3 -BuysTrain,M3,2,IPO,80 - -CompanyOperates,M4,Charlie -LaysTileAt,M4,57,G5,SW -CompanyDoesNotPayDividend,M4 -BuysTrain,M4,2,IPO,80 -BuysTrain,M4,2,IPO,80 - -CompanyOperates,M5,Charlie -LaysTileAt,M5,8,D18,NE -CompanyDoesNotPayDividend,M5 -BuysTrain,M5,2,IPO,80 - -CompanyOperates,M6,Bob -LaysTileAt,M6,9,B10,NW -CompanyDoesNotPayDividend,M6 -BuysTrain,M6,2,IPO,80 - -CompanyOperates,BY,Alice -LAYS_FREE_TOKEN_ON,BY,L14 -PrivateCloses,NF -LaysTileAtFor,BY,9,K15,SW,70 -LaysTileAt,BY,1,I17,SW -LaysTileAt,BY,58,M15,SW -CompanyDoesNotPayDividend,BY -PRICE_MOVES_LOG,BY,92,C3,86,B3 -BuysTrain,BY,2,IPO,80 -BuysTrain,BY,2,IPO,80 -All 2-trains are sold out, 2+2-trains now available -BuysTrain,BY,2+2,IPO,120 -FirstTrainBought,2+2 - -EndOfOperatingRound,1.1 -ORWorthIncrease,Alice,1.1,-109 -ORWorthIncrease,Bob,1.1,34 -ORWorthIncrease,Charlie,1.1,50 -Has,M1,0 -Has,M2,90 -Has,M3,0 -Has,M4,0 -Has,M5,0 -Has,M6,0 -Has,BY,110 -Has,Alice,41 -Has,Bob,120 -Has,Charlie,60 -StartStockRound,2 -HasPriority,Charlie -PASSES,Charlie -PASSES,Alice -BUY_SHARE_LOG,Bob,10,BY,IPO,92 -PriceIsPaidTo,92,BY -PASSES,Charlie -PASSES,Alice -PASSES,Bob - -END_SR,2 -Has,M1,0 -Has,M2,90 -Has,M3,0 -Has,M4,0 -Has,M5,0 -Has,M6,0 -Has,BY,202 -Has,Alice,41 -Has,Bob,28 -Has,Charlie,60 -START_OR,2.1 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Charlie,20,LD -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,69,H4,NW -CompanyRevenue,M1,40 -CompanySplits,M1,40 -M1 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M2,Alice -LaysTileAt,M2,8,D16,SE -CompanyRevenue,M2,0 -CompanyDoesNotPayDividend,M2 - -CompanyOperates,M3,Bob -LaysTileAt,M3,4,G15,NW -CompanyRevenue,M3,40 -CompanySplits,M3,40 -M3 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M4,Charlie -LaysTileAt,M4,4,F6,SW -CompanyRevenue,M4,60 -CompanySplits,M4,60 -M4 receives 30 -Payout,Charlie,30,1,100 - -CompanyOperates,M5,Charlie -LaysTileAt,M5,8,C19,E -CompanyRevenue,M5,50 -CompanySplits,M5,50 -M5 receives 25 -Payout,Charlie,25,1,100 - -CompanyOperates,M6,Bob -LaysTileAt,M6,6,A11,NW -CompanyRevenue,M6,60 -CompanySplits,M6,60 -M6 receives 30 -Payout,Bob,30,1,100 - -CompanyOperates,BY,Alice -LaysTileAt,BY,202,H20,W -LaysTileAt,BY,9,F20,NW -LAYS_TOKEN_ON,BY,H20,160 -CompanyRevenue,BY,160 -CompanyPaysOutFull,BY,160 -Payout,Bob,32,2,10 -Payout,Alice,64,4,10 -PRICE_MOVES_LOG,BY,86,B3,92,C3 - -EndOfOperatingRound,2.1 -ORWorthIncrease,Alice,2.1,98 -ORWorthIncrease,Bob,2.1,154 -ORWorthIncrease,Charlie,2.1,105 -Has,M1,20 -Has,M2,90 -Has,M3,20 -Has,M4,30 -Has,M5,25 -Has,M6,30 -Has,BY,42 -Has,Alice,115 -Has,Bob,170 -Has,Charlie,165 -StartStockRound,3 -HasPriority,Charlie -BUY_SHARE_LOG,Charlie,10,BY,IPO,92 -PriceIsPaidTo,92,BY -BUY_SHARE_LOG,Alice,10,BY,IPO,92 -PriceIsPaidTo,92,BY -BUY_SHARE_LOG,Bob,10,BY,IPO,92 -PriceIsPaidTo,92,BY -PASSES,Charlie -PASSES,Alice -PASSES,Bob - -END_SR,3 -Has,M1,20 -Has,M2,90 -Has,M3,20 -Has,M4,30 -Has,M5,25 -Has,M6,30 -Has,BY,318 -Has,Alice,23 -Has,Bob,78 -Has,Charlie,73 -START_OR,3.1 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Charlie,20,LD -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,9,J2,NW -CompanyRevenue,M1,40 -CompanySplits,M1,40 -M1 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M2,Alice -LaysTileAtFor,M2,8,D14,NW,50 -CompanyRevenue,M2,70 -CompanySplits,M2,70 -M2 receives 35 -Payout,Alice,35,1,100 - -CompanyOperates,M3,Bob -LaysTileAt,M3,6,H16,SE -CompanyRevenue,M3,40 -CompanySplits,M3,40 -M3 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M4,Charlie -LaysTileAt,M4,9,E7,SW -CompanyRevenue,M4,60 -CompanySplits,M4,60 -M4 receives 30 -Payout,Charlie,30,1,100 - -CompanyOperates,M5,Charlie -CompanyRevenue,M5,50 -CompanySplits,M5,50 -M5 receives 25 -Payout,Charlie,25,1,100 - -CompanyOperates,M6,Bob -LaysTileAt,M6,58,B12,NW -CompanyRevenue,M6,60 -CompanySplits,M6,60 -M6 receives 30 -Payout,Bob,30,1,100 - -CompanyOperates,BY,Alice -LaysTileAt,BY,8,N14,NE -LaysTileAt,BY,201,O15,NW -CompanyRevenue,BY,190 -CompanyPaysOutFull,BY,190 -Payout,Charlie,19,1,10 -Payout,Bob,57,3,10 -Payout,Alice,95,5,10 -PRICE_MOVES_LOG,BY,92,C3,100,D3 -BuysTrain,BY,2+2,IPO,120 - -EndOfOperatingRound,3.1 -ORWorthIncrease,Alice,3.1,180 -ORWorthIncrease,Bob,3.1,191 -ORWorthIncrease,Charlie,3.1,132 -Has,M1,40 -Has,M2,75 -Has,M3,40 -Has,M4,60 -Has,M5,50 -Has,M6,60 -Has,BY,198 -Has,Alice,163 -Has,Bob,245 -Has,Charlie,197 -StartStockRound,4 -HasPriority,Charlie -BUY_SHARE_LOG,Charlie,10,SX,IPO,88 -BUY_SHARE_LOG,Alice,10,BY,IPO,92 -PriceIsPaidTo,92,BY -BUY_SHARE_LOG,Bob,10,SX,IPO,88 -BUY_SHARE_LOG,Charlie,10,SX,IPO,88 -FloatsWithCash,SX,440 -PASSES,Alice -BUY_SHARE_LOG,Bob,10,SX,IPO,88 -PriceIsPaidTo,88,SX -PASSES,Charlie -PASSES,Alice -PASSES,Bob - -END_SR,4 -PRICE_MOVES_LOG,BY,100,D3,108,D2 -SoldOut,BY,100,D3,108,D2 -Has,M1,40 -Has,M2,75 -Has,M3,40 -Has,M4,60 -Has,M5,50 -Has,M6,60 -Has,BY,290 -Has,SX,528 -Has,Alice,71 -Has,Bob,69 -Has,Charlie,21 -START_OR,4.1 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Charlie,20,LD -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,4,K3,NW -CompanyRevenue,M1,40 -CompanySplits,M1,40 -M1 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M2,Alice -CompanyRevenue,M2,70 -CompanySplits,M2,70 -M2 receives 35 -Payout,Alice,35,1,100 - -CompanyOperates,M3,Bob -LaysTileAt,M3,57,F10,W -CompanyRevenue,M3,40 -CompanySplits,M3,40 -M3 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M4,Charlie -LaysTileAtFor,M4,5,D8,W,50 -CompanyRevenue,M4,60 -CompanySplits,M4,60 -M4 receives 30 -Payout,Charlie,30,1,100 - -CompanyOperates,M5,Charlie -CompanyRevenue,M5,50 -CompanySplits,M5,50 -M5 receives 25 -Payout,Charlie,25,1,100 - -CompanyOperates,M6,Bob -LaysTileAt,M6,58,B14,SE -CompanyRevenue,M6,60 -CompanySplits,M6,60 -M6 receives 30 -Payout,Bob,30,1,100 - -CompanyOperates,BY,Alice -LaysTileAtFor,BY,9,J14,W,70 -LaysTileAt,BY,9,J12,W -CompanyRevenue,BY,200 -CompanyPaysOutFull,BY,200 -Payout,Bob,60,3,10 -Payout,Charlie,20,1,10 -Payout,Alice,120,6,10 -PRICE_MOVES_LOG,BY,108,D2,120,E2 - -CompanyOperates,SX,Charlie -LaysTileAt,SX,8,H18,SE -CompanyDoesNotPayDividend,SX -PRICE_MOVES_LOG,SX,88,C4,84,B4 -BuysTrain,SX,2+2,IPO,120 -PrivateCloses,LD -BuysTrain,SX,2+2,IPO,120 -All 2+2-trains are sold out, 3-trains now available -BuysTrain,SX,3,IPO,180 -FirstTrainBought,3 -StartOfPhase,3 - -EndOfOperatingRound,4.1 -ORWorthIncrease,Alice,4.1,237 -ORWorthIncrease,Bob,4.1,198 -ORWorthIncrease,Charlie,4.1,-69 -Has,M1,60 -Has,M2,110 -Has,M3,60 -Has,M4,40 -Has,M5,75 -Has,M6,90 -Has,BY,220 -Has,SX,108 -Has,Alice,236 -Has,Bob,239 -Has,Charlie,146 -StartStockRound,5 -HasPriority,Charlie -BUY_SHARE_LOG,Charlie,10,SX,IPO,88 -PriceIsPaidTo,88,SX -BUY_SHARE_LOG,Alice,10,SX,IPO,88 -PriceIsPaidTo,88,SX -BUY_SHARE_LOG,Bob,10,SX,IPO,88 -PriceIsPaidTo,88,SX -PASSES,Charlie -BUY_SHARE_LOG,Alice,10,SX,IPO,88 -PriceIsPaidTo,88,SX -SharesReleased,All,BA -PASSES,Bob -PASSES,Charlie -PASSES,Alice - -END_SR,5 -PRICE_MOVES_LOG,BY,120,E2,132,E1 -SoldOut,BY,120,E2,132,E1 -PRICE_MOVES_LOG,SX,84,B4,86,B3 -SoldOut,SX,84,B4,86,B3 -Has,M1,60 -Has,M2,110 -Has,M3,60 -Has,M4,40 -Has,M5,75 -Has,M6,90 -Has,BY,220 -Has,SX,460 -Has,Alice,60 -Has,Bob,151 -Has,Charlie,58 -START_OR,5.1 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,207,H2,E -CompanyRevenue,M1,50 -CompanySplits,M1,50 -M1 receives 25 -Payout,Bob,25,1,100 - -CompanyOperates,M2,Alice -LaysTileAt,M2,209,E19,SW -CompanyRevenue,M2,80 -CompanySplits,M2,80 -M2 receives 40 -Payout,Alice,40,1,100 -BuysTrain,M2,2+2,BY,150 - -CompanyOperates,M3,Bob -LaysTileAt,M3,205,F14,SE -CompanyRevenue,M3,50 -CompanySplits,M3,50 -M3 receives 25 -Payout,Bob,25,1,100 - -CompanyOperates,M4,Charlie -LaysTileAt,M4,14,G5,SW -CompanyRevenue,M4,80 -CompanySplits,M4,80 -M4 receives 40 -Payout,Charlie,40,1,100 - -CompanyOperates,M5,Charlie -LaysTileAt,M5,208,H20,W -CompanyRevenue,M5,80 -CompanySplits,M5,80 -M5 receives 40 -Payout,Charlie,40,1,100 -BuysTrain,M5,2+2,SX,115 - -CompanyOperates,M6,Bob -LaysTileAt,M6,12,A11,W -CompanyRevenue,M6,70 -CompanySplits,M6,70 -M6 receives 35 -Payout,Bob,35,1,100 - -CompanyOperates,BY,Alice -LaysTileAt,BY,9,J10,W -LAYS_TOKEN_ON,BY,J8,120 -CompanyRevenue,BY,240 -CompanyPaysOutFull,BY,240 -Payout,Bob,72,3,10 -Payout,Alice,144,6,10 -Payout,Charlie,24,1,10 -PRICE_MOVES_LOG,BY,132,E1,148,F1 -BuysTrain,BY,3,IPO,180 - -CompanyOperates,SX,Charlie -LaysTileAt,SX,13,H16,W -LAYS_TOKEN_ON,SX,E19,60 -CompanyRevenue,SX,190 -CompanyPaysOutFull,SX,190 -Payout,Alice,38,2,10 -Payout,Bob,57,3,10 -Payout,Charlie,95,5,10 -PRICE_MOVES_LOG,SX,86,B3,92,C3 -BuysTrain,SX,3,IPO,180 -BuysTrain,SX,3,IPO,180 -All 3-trains are sold out, 3+3-trains now available - -EndOfOperatingRound,5.1 -ORWorthIncrease,Alice,5.1,340 -ORWorthIncrease,Bob,5.1,320 -ORWorthIncrease,Charlie,5.1,275 -Has,M1,85 -Has,M2,0 -Has,M3,85 -Has,M4,80 -Has,M5,0 -Has,M6,125 -Has,BY,70 -Has,SX,155 -Has,Alice,292 -Has,Bob,405 -Has,Charlie,287 -START_OR,5.2 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAtFor,M1,211,G3,E,50 -CompanyRevenue,M1,70 -CompanySplits,M1,70 -M1 receives 35 -Payout,Bob,35,1,100 - -CompanyOperates,M2,Alice -LaysTileAt,M2,23,D18,NW -CompanyRevenue,M2,180 -CompanySplits,M2,180 -M2 receives 90 -Payout,Alice,90,1,100 - -CompanyOperates,M3,Bob -LaysTileAt,M3,8,F8,E -CompanyRevenue,M3,50 -CompanySplits,M3,50 -M3 receives 25 -Payout,Bob,25,1,100 - -CompanyOperates,M4,Charlie -LaysTileAt,M4,8,G7,W -CompanyRevenue,M4,110 -CompanySplits,M4,110 -M4 receives 55 -Payout,Charlie,55,1,100 - -CompanyOperates,M5,Charlie -LaysTileAt,M5,8,C17,SE -CompanyRevenue,M5,180 -CompanySplits,M5,180 -M5 receives 90 -Payout,Charlie,90,1,100 - -CompanyOperates,M6,Bob -LaysTileAt,M6,8,C15,NW -CompanyRevenue,M6,70 -CompanySplits,M6,70 -M6 receives 35 -Payout,Bob,35,1,100 - -CompanyOperates,BY,Alice -LaysTileAtFor,BY,214,J6,SE,50 -CompanyRevenue,BY,330 -CompanyPaysOutFull,BY,330 -Payout,Alice,198,6,10 -Payout,Bob,99,3,10 -Payout,Charlie,33,1,10 -PRICE_MOVES_LOG,BY,148,F1,166,G1 - -CompanyOperates,SX,Charlie -LaysTileAt,SX,23,H18,E -LAYS_TOKEN_ON,SX,H20,40 -CompanyRevenue,SX,370 -CompanyPaysOutFull,SX,370 -Payout,Alice,74,2,10 -Payout,Bob,111,3,10 -Payout,Charlie,185,5,10 -PRICE_MOVES_LOG,SX,92,C3,100,D3 - -EndOfOperatingRound,5.2 -ORWorthIncrease,Alice,5.2,496 -ORWorthIncrease,Bob,5.2,423 -ORWorthIncrease,Charlie,5.2,451 -Has,M1,70 -Has,M2,90 -Has,M3,110 -Has,M4,135 -Has,M5,90 -Has,M6,160 -Has,BY,20 -Has,SX,115 -Has,Alice,664 -Has,Bob,750 -Has,Charlie,680 -StartStockRound,6 -HasPriority,Bob -START_COMPANY_LOG,Bob,BA,84,168,2,20,BANK -SharesReleased,4 10%,PR -BUY_SHARE_LOG,Charlie,10,BA,IPO,84 -BUY_SHARE_LOG,Alice,10,BA,IPO,84 -BUY_SHARE_LOG,Bob,10,BA,IPO,84 -FloatsWithCash,BA,420 -SharesReleased,All,WT -BUY_SHARE_LOG,Charlie,10,BA,IPO,84 -PriceIsPaidTo,84,BA -START_COMPANY_LOG,Alice,WT,84,168,2,20,BANK -BUY_SHARE_LOG,Bob,10,BA,IPO,84 -PriceIsPaidTo,84,BA -BUY_SHARE_LOG,Charlie,10,BA,IPO,84 -PriceIsPaidTo,84,BA -BUY_SHARE_LOG,Alice,10,WT,IPO,84 -BUY_SHARE_LOG,Bob,20,BA,IPO,168 -PriceIsPaidTo,168,BA -BUY_SHARE_LOG,Charlie,10,WT,IPO,84 -BUY_SHARE_LOG,Alice,10,WT,IPO,84 -FloatsWithCash,WT,420 -SharesReleased,All,HE -BUY_SHARE_LOG,Bob,10,WT,IPO,84 -PriceIsPaidTo,84,WT -START_COMPANY_LOG,Charlie,HE,84,168,2,20,BANK -BUY_SHARE_LOG,Alice,10,HE,IPO,84 -BUY_SHARE_LOG,Bob,10,HE,IPO,84 -BUY_SHARE_LOG,Charlie,10,HE,IPO,84 -FloatsWithCash,HE,420 -BUY_SHARE_LOG,Alice,10,HE,IPO,84 -PriceIsPaidTo,84,HE -PASSES,Bob -BUY_SHARE_LOG,Charlie,10,HE,IPO,84 -PriceIsPaidTo,84,HE -PASSES,Alice -PASSES,Bob -PASSES,Charlie - -END_SR,6 -PRICE_STAYS_LOG,BY,166,G1 -SoldOutNoRaise,BY,166,G1 -PRICE_MOVES_LOG,SX,100,D3,108,D2 -SoldOut,SX,100,D3,108,D2 -PRICE_MOVES_LOG,BA,84,B4,86,B3 -SoldOut,BA,84,B4,86,B3 -Has,M1,70 -Has,M2,90 -Has,M3,110 -Has,M4,135 -Has,M5,90 -Has,M6,160 -Has,BY,20 -Has,SX,115 -Has,BA,840 -Has,WT,504 -Has,HE,588 -Has,Alice,76 -Has,Bob,78 -Has,Charlie,8 -START_OR,6.1 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,9,I5,SE -CompanyRevenue,M1,70 -CompanySplits,M1,70 -M1 receives 35 -Payout,Bob,35,1,100 - -CompanyOperates,M2,Alice -CompanyRevenue,M2,180 -CompanySplits,M2,180 -M2 receives 90 -Payout,Alice,90,1,100 - -CompanyOperates,M3,Bob -LaysTileAt,M3,206,F10,SE -CompanyRevenue,M3,50 -CompanySplits,M3,50 -M3 receives 25 -Payout,Bob,25,1,100 - -CompanyOperates,M4,Charlie -LaysTileAt,M4,15,D8,NE -CompanyRevenue,M4,110 -CompanySplits,M4,110 -M4 receives 55 -Payout,Charlie,55,1,100 - -CompanyOperates,M5,Charlie -CompanyRevenue,M5,180 -CompanySplits,M5,180 -M5 receives 90 -Payout,Charlie,90,1,100 - -CompanyOperates,M6,Bob -CompanyRevenue,M6,70 -CompanySplits,M6,70 -M6 receives 35 -Payout,Bob,35,1,100 - -CompanyOperates,BY,Alice -LaysTileAt,BY,8,K5,NE -CompanyRevenue,BY,330 -CompanyPaysOutFull,BY,330 -Payout,Alice,198,6,10 -Payout,Bob,99,3,10 -Payout,Charlie,33,1,10 -PRICE_MOVES_LOG,BY,166,G1,186,H1 - -CompanyOperates,SX,Charlie -CompanyRevenue,SX,370 -CompanyPaysOutFull,SX,370 -Payout,Alice,74,2,10 -Payout,Bob,111,3,10 -Payout,Charlie,185,5,10 -PRICE_MOVES_LOG,SX,108,D2,120,E2 - -CompanyOperates,BA,Bob -LaysTileAt,BA,210,L6,E -CompanyDoesNotPayDividend,BA -PRICE_MOVES_LOG,BA,86,B3,82,A3 -BuysTrain,BA,3+3,IPO,270 -FirstTrainBought,3+3 -BuysTrain,BA,3+3,IPO,270 -BuysTrain,BA,3+3,IPO,270 -All 3+3-trains are sold out, 4-trains now available - -CompanyOperates,WT,Alice -LaysTileAt,WT,57,M9,W -CompanyDoesNotPayDividend,WT -PRICE_MOVES_LOG,WT,84,B4,78,A4 -BuysTrain,WT,4,IPO,360 -FirstTrainBought,4 -StartOfPhase,4 -CompanyDiscardsTrain,SX,2+2 -StartFormationRound,PR -StartingPlayer,Alice - -EndOfFormationRound,PR,OperatingRound 6.1 - -CompanyOperates,HE,Charlie -LaysTileAtFor,HE,9,K7,SW,50 -CompanyDoesNotPayDividend,HE -PRICE_MOVES_LOG,HE,84,B4,78,A4 -BuysTrain,HE,4,IPO,360 - -EndOfOperatingRound,6.1 -ORWorthIncrease,Alice,6.1,476 -ORWorthIncrease,Bob,6.1,405 -ORWorthIncrease,Charlie,6.1,431 -Has,M1,105 -Has,M2,180 -Has,M3,135 -Has,M4,190 -Has,M5,180 -Has,M6,195 -Has,BY,20 -Has,SX,115 -Has,BA,30 -Has,WT,144 -Has,HE,178 -Has,Alice,448 -Has,Bob,423 -Has,Charlie,401 -StartFormationRound,PR -StartingPlayer,Alice - -EndOfFormationRoundNoInterrupt,PR -START_OR,6.2 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,8,D10,W -CompanyDoesNotPayDividend,M1 -BuysTrain,M1,3+3,BA,105 - -CompanyOperates,M2,Alice -LaysTileAt,M2,203,B12,W -CompanyRevenue,M2,100 -CompanySplits,M2,100 -M2 receives 50 -Payout,Alice,50,1,100 - -CompanyOperates,M3,Bob -LaysTileAt,M3,9,F16,W -CompanyDoesNotPayDividend,M3 - -CompanyOperates,M4,Charlie -CompanyDoesNotPayDividend,M4 -BuysTrain,M4,3,SX,190 - -CompanyOperates,M5,Charlie -CompanyRevenue,M5,100 -CompanySplits,M5,100 -M5 receives 50 -Payout,Charlie,50,1,100 - -CompanyOperates,M6,Bob -CompanyDoesNotPayDividend,M6 -BuysTrain,M6,3+3,BA,195 - -CompanyOperates,BY,Alice -LaysTileAt,BY,23,F20,NW -CompanyRevenue,BY,180 -CompanyPaysOutFull,BY,180 -Payout,Alice,108,6,10 -Payout,Bob,54,3,10 -Payout,Charlie,18,1,10 -PRICE_MOVES_LOG,BY,186,H1,208,I1 -BuysTrain,BY,2+2,M2,1 - -CompanyOperates,SX,Charlie -CompanyRevenue,SX,220 -CompanyPaysOutFull,SX,220 -Payout,Alice,44,2,10 -Payout,Bob,66,3,10 -Payout,Charlie,110,5,10 -PRICE_MOVES_LOG,SX,120,E2,134,F2 -BuysTrain,SX,2+2,M5,1 - -CompanyOperates,BA,Bob -CompanyRevenue,BA,120 -CompanyPaysOutFull,BA,120 -Payout,Alice,12,1,10 -Payout,Bob,72,6,10 -Payout,Charlie,36,3,10 -PRICE_MOVES_LOG,BA,82,A3,86,B3 -BuysTrain,BA,3+3,M1,1 - -CompanyOperates,WT,Alice -LaysTileAt,WT,9,M11,W -CompanyRevenue,WT,0 -CompanyDoesNotPayDividend,WT -PRICE_MOVES_LOG,WT,78,A4,72,A5 - -CompanyOperates,HE,Charlie -CompanyRevenue,HE,130 -CompanyPaysOutFull,HE,130 -Payout,Alice,26,2,10 -Payout,Bob,13,1,10 -Payout,Charlie,52,4,10 -PRICE_MOVES_LOG,HE,78,A4,84,B4 -BuysTrain,HE,3+3,M6,1 - -EndOfOperatingRound,6.2 -ORWorthIncrease,Alice,6.2,402 -ORWorthIncrease,Bob,6.2,377 -ORWorthIncrease,Charlie,6.2,418 -Has,M1,1 -Has,M2,231 -Has,M3,135 -Has,M4,0 -Has,M5,231 -Has,M6,1 -Has,BY,19 -Has,SX,304 -Has,BA,329 -Has,WT,144 -Has,HE,177 -Has,Alice,698 -Has,Bob,668 -Has,Charlie,697 -StartFormationRound,PR -StartingPlayer,Alice - -EndOfFormationRoundNoInterrupt,PR -StartStockRound,7 -HasPriority,Alice -BUY_SHARE_LOG,Alice,10,PR,IPO,154 -BUY_SHARE_LOG,Bob,10,PR,IPO,154 -BUY_SHARE_LOG,Charlie,10,PR,IPO,154 -BUY_SHARE_LOG,Alice,10,PR,IPO,154 -SELL_SHARE_LOG,Bob,10,BY,208 -PRICE_MOVES_LOG,BY,208,I1,188,I2 -BUY_SHARE_LOG,Charlie,10,HE,IPO,84 -PriceIsPaidTo,84,HE -BUY_SHARE_LOG,Alice,10,BY,Pool,188 -BUY_SHARE_LOG,Bob,20,HE,IPO,168 -PriceIsPaidTo,168,HE -BUY_SHARE_LOG,Charlie,10,WT,IPO,84 -PriceIsPaidTo,84,WT -BUY_SHARE_LOG,Alice,10,WT,IPO,84 -PriceIsPaidTo,84,WT -PASSES,Bob -PASSES,Charlie -PASSES,Alice - -END_SR,7 -PRICE_MOVES_LOG,BY,188,I2,208,I1 -SoldOut,BY,188,I2,208,I1 -PRICE_MOVES_LOG,SX,134,F2,148,F1 -SoldOut,SX,134,F2,148,F1 -SoldOutNoRaise,BA,86,B3 -PRICE_MOVES_LOG,HE,84,B4,86,B3 -SoldOut,HE,84,B4,86,B3 -Has,M1,1 -Has,M2,231 -Has,M3,135 -Has,M4,0 -Has,M5,231 -Has,M6,1 -Has,BY,19 -Has,SX,304 -Has,BA,329 -Has,WT,312 -Has,HE,429 -Has,Alice,118 -Has,Bob,554 -Has,Charlie,375 -StartFormationRound,PR -StartingPlayer,Alice - -EndOfFormationRoundNoInterrupt,PR -START_OR,7.1 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -CompanyDoesNotPayDividend,M1 - -CompanyOperates,M2,Alice -CompanyDoesNotPayDividend,M2 -BuysTrain,M2,2+2,BY,231 - -CompanyOperates,M3,Bob -CompanyDoesNotPayDividend,M3 -BuysTrain,M3,3+3,BA,135 - -CompanyOperates,M4,Charlie -CompanyRevenue,M4,90 -CompanySplits,M4,90 -M4 receives 45 -Payout,Charlie,45,1,100 - -CompanyOperates,M5,Charlie -CompanyDoesNotPayDividend,M5 -BuysTrain,M5,2+2,SX,231 - -CompanyOperates,M6,Bob -CompanyDoesNotPayDividend,M6 - -CompanyOperates,BY,Alice -CompanyRevenue,BY,190 -CompanyPaysOutFull,BY,190 -Payout,Alice,133,7,10 -Payout,Bob,38,2,10 -Payout,Charlie,19,1,10 -PRICE_MOVES_LOG,BY,208,I1,232,J1 - -CompanyOperates,SX,Charlie -CompanyRevenue,SX,220 -CompanyPaysOutFull,SX,220 -Payout,Alice,44,2,10 -Payout,Bob,66,3,10 -Payout,Charlie,110,5,10 -PRICE_MOVES_LOG,SX,148,F1,166,G1 -BuysTrain,SX,4,IPO,360 -All 4-trains are sold out, 4+4-trains now available - -CompanyOperates,BA,Bob -CompanyRevenue,BA,120 -CompanyPaysOutFull,BA,120 -Payout,Alice,12,1,10 -Payout,Bob,72,6,10 -Payout,Charlie,36,3,10 -PRICE_MOVES_LOG,BA,86,B3,92,C3 -BuysTrain,BA,4+4,IPO,440 -All 4+4-trains are sold out, 5-trains now available -FirstTrainBought,4+4 -StartOfPhase,4+4 -StartFormationRound,PR -START_MERGED_COMPANY,PR,154,154 -FloatsWithCash,PR,616 -MERGE_MINOR_LOG,Alice,M2,PR,0,0 -GetShareForMinor,Alice,10,PR,IPO,M2 -ExchangesBaseToken,PR,M2,E19/1 - -EndOfFormationRound,PR,OperatingRound 7.1 - -CompanyOperates,HE,Charlie -LaysTileAt,HE,8,L4,NW -LAYS_TOKEN_ON,HE,G5,60 -CompanyRevenue,HE,260 -CompanyPaysOutFull,HE,260 -Payout,Alice,52,2,10 -Payout,Bob,78,3,10 -Payout,Charlie,130,5,10 -PRICE_MOVES_LOG,HE,86,B3,92,C3 - -CompanyOperates,WT,Alice -LaysTileAt,WT,69,M7,SE -CompanyRevenue,WT,280 -CompanyWithholds,WT,280 -PRICE_MOVES_LOG,WT,72,A5,64,A6 - -EndOfOperatingRound,7.1 -ORWorthIncrease,Alice,7.1,741 -ORWorthIncrease,Bob,7.1,442 -ORWorthIncrease,Charlie,7.1,516 -Has,M1,1 -Has,M3,0 -Has,M4,45 -Has,M5,0 -Has,M6,1 -Has,BY,250 -Has,SX,175 -Has,BA,24 -Has,WT,592 -Has,HE,369 -Has,PR,616 -Has,Alice,369 -Has,Bob,848 -Has,Charlie,745 -StartFormationRound,PR - -EndOfFormationRoundNoInterrupt,PR -START_OR,7.2 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -CompanyDoesNotPayDividend,M1 -BuysTrain,M1,3+3,BA,1 - -CompanyOperates,M3,Bob -CompanyRevenue,M3,90 -CompanySplits,M3,90 -M3 receives 45 -Payout,Bob,45,1,100 - -CompanyOperates,M4,Charlie -CompanyRevenue,M4,90 -CompanySplits,M4,90 -M4 receives 45 -Payout,Charlie,45,1,100 - -CompanyOperates,M5,Charlie -CompanyDoesNotPayDividend,M5 - -CompanyOperates,M6,Bob -CompanyDoesNotPayDividend,M6 -BuysTrain,M6,3,SX,1 - -CompanyOperates,BY,Alice -CompanyRevenue,BY,110 -CompanyPaysOutFull,BY,110 -Payout,Alice,77,7,10 -Payout,Bob,22,2,10 -Payout,Charlie,11,1,10 -PRICE_MOVES_LOG,BY,232,J1,258,K1 - -CompanyOperates,SX,Charlie -CompanyRevenue,SX,240 -CompanyPaysOutFull,SX,240 -Payout,Alice,48,2,10 -Payout,Bob,72,3,10 -Payout,Charlie,120,5,10 -PRICE_MOVES_LOG,SX,166,G1,186,H1 - -CompanyOperates,PR,Alice -CompanyDoesNotPayDividend,PR -PRICE_MOVES_LOG,PR,154,I4,138,H4 -BuysTrain,PR,5,IPO,500 -FirstTrainBought,5 -StartOfPhase,5 -PrivateCloses,OBB -PrivateCloses,PfB -StartFormationRound,PR -MERGE_MINOR_LOG,Bob,BB,PR,no,no -GetShareForMinor,Bob,10,PR,IPO,BB -PrivateCloses,BB -MERGE_MINOR_LOG,Charlie,HB,PR,no,no -GetShareForMinor,Charlie,10,PR,IPO,HB -PrivateCloses,HB -MERGE_MINOR_LOG,Bob,M1,PR,0,1 -GetShareForMinor,Bob,5,PR,IPO,M1 -ExchangesBaseToken,PR,M1,H2/1 -MERGE_MINOR_LOG,Bob,M3,PR,45,1 -GetShareForMinor,Bob,5,PR,IPO,M3 -ExchangesBaseToken,PR,M3,F14/1 -MERGE_MINOR_LOG,Charlie,M4,PR,90,1 -GetShareForMinor,Charlie,10,PR,IPO,M4 -ExchangesBaseToken,PR,M4,G5/1 -MERGE_MINOR_LOG,Charlie,M5,PR,0,0 -GetShareForMinor,Charlie,5,PR,IPO,M5 -MERGE_MINOR_LOG,Bob,M6,PR,0,1 -GetShareForMinor,Bob,5,PR,IPO,M6 -ExchangesBaseToken,PR,M6,C11/1 -CompanyDiscardsTrain,PR,3 -CompanyDiscardsTrain,PR,3 - -EndOfFormationRound,PR,OperatingRound 7.2 -IS_NOW_PRES_OF,Bob,PR - -CompanyOperates,BA,Bob +GameIs,1835 +PlayerIs,1,Alice +PlayerIs,2,Bob +PlayerIs,3,Charlie +PlayerCash,600 +BankHas,10200 +StartOfPhase,2 +BankSizeIs,10200 +StartOfInitialRound +HasPriority,Alice +BuysItemFor,Alice,NF,100 +ALSO_GETS,Alice,CERT_NAME,BY,10 +BuysItemFor,Bob,M1,80 +FloatsWithCash,M1,80 +BuysItemFor,Charlie,LD,190 +ALSO_GETS,Charlie,PRES_CERT_NAME,SX,20 +BuysItemFor,Alice,M2,170 +FloatsWithCash,M2,170 +BuysItemFor,Bob,M3,80 +FloatsWithCash,M3,80 +BuysItemFor,Charlie,M4,160 +FloatsWithCash,M4,160 +BuysItemFor,Alice,PRES_CERT_NAME,BY,20,184 +BuysItemFor,Bob,BB,130 +BuysItemFor,Charlie,HB,160 +BuysItemFor,Alice,OBB,120 +ALSO_GETS,Alice,CERT_NAME,BY,10 +BuysItemFor,Bob,PfB,150 +ALSO_GETS,Bob,CERT_NAME,BY,10 +FloatsWithCash,BY,460 +BuysItemFor,Charlie,M5,80 +FloatsWithCash,M5,80 +CannotBuyAnything,Alice +BuysItemFor,Bob,M6,80 +FloatsWithCash,M6,80 +Has,M1,80 +Has,M2,170 +Has,M3,80 +Has,M4,160 +Has,M5,80 +Has,M6,80 +Has,BY,460 +Has,Alice,26 +Has,Bob,80 +Has,Charlie,10 +StartStockRound,1 +HasPriority,Charlie +PASSES,Charlie +PASSES,Alice +PASSES,Bob + +END_SR,1 +Has,M1,80 +Has,M2,170 +Has,M3,80 +Has,M4,160 +Has,M5,80 +Has,M6,80 +Has,BY,460 +Has,Alice,26 +Has,Bob,80 +Has,Charlie,10 +START_OR,1.1 +ReceivesFor,Alice,5,NF +ReceivesFor,Alice,10,OBB +ReceivesFor,Bob,15,PfB +ReceivesFor,Charlie,20,LD +ReceivesFor,Bob,25,BB +ReceivesFor,Charlie,30,HB + +CompanyOperates,M1,Bob +LaysTileAt,M1,202,H2,W +CompanyDoesNotPayDividend,M1 +BuysTrain,M1,2,IPO,80 +FirstTrainBought,2 + +CompanyOperates,M2,Alice +LaysTileAt,M2,8,E17,NW +CompanyDoesNotPayDividend,M2 +BuysTrain,M2,2,IPO,80 + +CompanyOperates,M3,Bob +LaysTileAt,M3,6,F14,NW +CompanyDoesNotPayDividend,M3 +BuysTrain,M3,2,IPO,80 + +CompanyOperates,M4,Charlie +LaysTileAt,M4,57,G5,SW +CompanyDoesNotPayDividend,M4 +BuysTrain,M4,2,IPO,80 +BuysTrain,M4,2,IPO,80 + +CompanyOperates,M5,Charlie +LaysTileAt,M5,8,D18,NE +CompanyDoesNotPayDividend,M5 +BuysTrain,M5,2,IPO,80 + +CompanyOperates,M6,Bob +LaysTileAt,M6,9,B10,NW +CompanyDoesNotPayDividend,M6 +BuysTrain,M6,2,IPO,80 + +CompanyOperates,BY,Alice +LAYS_FREE_TOKEN_ON,BY,L14 +PrivateCloses,NF +LaysTileAtFor,BY,9,K15,SW,70 +LaysTileAt,BY,1,I17,SW +LaysTileAt,BY,58,M15,SW +CompanyDoesNotPayDividend,BY +PRICE_MOVES_LOG,BY,92,C3,86,B3 +BuysTrain,BY,2,IPO,80 +BuysTrain,BY,2,IPO,80 +All 2-trains are sold out, 2+2-trains now available +BuysTrain,BY,2+2,IPO,120 +FirstTrainBought,2+2 + +EndOfOperatingRound,1.1 +ORWorthIncrease,Alice,1.1,-109 +ORWorthIncrease,Bob,1.1,34 +ORWorthIncrease,Charlie,1.1,50 +Has,M1,0 +Has,M2,90 +Has,M3,0 +Has,M4,0 +Has,M5,0 +Has,M6,0 +Has,BY,110 +Has,Alice,41 +Has,Bob,120 +Has,Charlie,60 +StartStockRound,2 +HasPriority,Charlie +PASSES,Charlie +PASSES,Alice +BUY_SHARE_LOG,Bob,10,BY,IPO,92 +PriceIsPaidTo,92,BY +PASSES,Charlie +PASSES,Alice +PASSES,Bob + +END_SR,2 +Has,M1,0 +Has,M2,90 +Has,M3,0 +Has,M4,0 +Has,M5,0 +Has,M6,0 +Has,BY,202 +Has,Alice,41 +Has,Bob,28 +Has,Charlie,60 +START_OR,2.1 +ReceivesFor,Alice,10,OBB +ReceivesFor,Bob,15,PfB +ReceivesFor,Charlie,20,LD +ReceivesFor,Bob,25,BB +ReceivesFor,Charlie,30,HB + +CompanyOperates,M1,Bob +LaysTileAt,M1,69,H4,NW +CompanyRevenue,M1,40 +CompanySplits,M1,40 +M1 receives 20 +Payout,Bob,20,1,100 + +CompanyOperates,M2,Alice +LaysTileAt,M2,8,D16,SE +CompanyRevenue,M2,0 +CompanyDoesNotPayDividend,M2 + +CompanyOperates,M3,Bob +LaysTileAt,M3,4,G15,NW +CompanyRevenue,M3,40 +CompanySplits,M3,40 +M3 receives 20 +Payout,Bob,20,1,100 + +CompanyOperates,M4,Charlie +LaysTileAt,M4,4,F6,SW +CompanyRevenue,M4,60 +CompanySplits,M4,60 +M4 receives 30 +Payout,Charlie,30,1,100 + +CompanyOperates,M5,Charlie +LaysTileAt,M5,8,C19,E +CompanyRevenue,M5,50 +CompanySplits,M5,50 +M5 receives 25 +Payout,Charlie,25,1,100 + +CompanyOperates,M6,Bob +LaysTileAt,M6,6,A11,NW +CompanyRevenue,M6,60 +CompanySplits,M6,60 +M6 receives 30 +Payout,Bob,30,1,100 + +CompanyOperates,BY,Alice +LaysTileAt,BY,202,H20,W +LaysTileAt,BY,9,F20,NW +LAYS_TOKEN_ON,BY,H20,160 +CompanyRevenue,BY,160 +CompanyPaysOutFull,BY,160 +Payout,Bob,32,2,10 +Payout,Alice,64,4,10 +PRICE_MOVES_LOG,BY,86,B3,92,C3 + +EndOfOperatingRound,2.1 +ORWorthIncrease,Alice,2.1,98 +ORWorthIncrease,Bob,2.1,154 +ORWorthIncrease,Charlie,2.1,105 +Has,M1,20 +Has,M2,90 +Has,M3,20 +Has,M4,30 +Has,M5,25 +Has,M6,30 +Has,BY,42 +Has,Alice,115 +Has,Bob,170 +Has,Charlie,165 +StartStockRound,3 +HasPriority,Charlie +BUY_SHARE_LOG,Charlie,10,BY,IPO,92 +PriceIsPaidTo,92,BY +BUY_SHARE_LOG,Alice,10,BY,IPO,92 +PriceIsPaidTo,92,BY +BUY_SHARE_LOG,Bob,10,BY,IPO,92 +PriceIsPaidTo,92,BY +PASSES,Charlie +PASSES,Alice +PASSES,Bob + +END_SR,3 +Has,M1,20 +Has,M2,90 +Has,M3,20 +Has,M4,30 +Has,M5,25 +Has,M6,30 +Has,BY,318 +Has,Alice,23 +Has,Bob,78 +Has,Charlie,73 +START_OR,3.1 +ReceivesFor,Alice,10,OBB +ReceivesFor,Bob,15,PfB +ReceivesFor,Charlie,20,LD +ReceivesFor,Bob,25,BB +ReceivesFor,Charlie,30,HB + +CompanyOperates,M1,Bob +LaysTileAt,M1,9,J2,NW +CompanyRevenue,M1,40 +CompanySplits,M1,40 +M1 receives 20 +Payout,Bob,20,1,100 + +CompanyOperates,M2,Alice +LaysTileAtFor,M2,8,D14,NW,50 +CompanyRevenue,M2,70 +CompanySplits,M2,70 +M2 receives 35 +Payout,Alice,35,1,100 + +CompanyOperates,M3,Bob +LaysTileAt,M3,6,H16,SE +CompanyRevenue,M3,40 +CompanySplits,M3,40 +M3 receives 20 +Payout,Bob,20,1,100 + +CompanyOperates,M4,Charlie +LaysTileAt,M4,9,E7,SW +CompanyRevenue,M4,60 +CompanySplits,M4,60 +M4 receives 30 +Payout,Charlie,30,1,100 + +CompanyOperates,M5,Charlie +CompanyRevenue,M5,50 +CompanySplits,M5,50 +M5 receives 25 +Payout,Charlie,25,1,100 + +CompanyOperates,M6,Bob +LaysTileAt,M6,58,B12,NW +CompanyRevenue,M6,60 +CompanySplits,M6,60 +M6 receives 30 +Payout,Bob,30,1,100 + +CompanyOperates,BY,Alice +LaysTileAt,BY,8,N14,NE +LaysTileAt,BY,201,O15,NW +CompanyRevenue,BY,190 +CompanyPaysOutFull,BY,190 +Payout,Charlie,19,1,10 +Payout,Bob,57,3,10 +Payout,Alice,95,5,10 +PRICE_MOVES_LOG,BY,92,C3,100,D3 +BuysTrain,BY,2+2,IPO,120 + +EndOfOperatingRound,3.1 +ORWorthIncrease,Alice,3.1,180 +ORWorthIncrease,Bob,3.1,191 +ORWorthIncrease,Charlie,3.1,132 +Has,M1,40 +Has,M2,75 +Has,M3,40 +Has,M4,60 +Has,M5,50 +Has,M6,60 +Has,BY,198 +Has,Alice,163 +Has,Bob,245 +Has,Charlie,197 +StartStockRound,4 +HasPriority,Charlie +BUY_SHARE_LOG,Charlie,10,SX,IPO,88 +BUY_SHARE_LOG,Alice,10,BY,IPO,92 +PriceIsPaidTo,92,BY +BUY_SHARE_LOG,Bob,10,SX,IPO,88 +BUY_SHARE_LOG,Charlie,10,SX,IPO,88 +FloatsWithCash,SX,440 +PASSES,Alice +BUY_SHARE_LOG,Bob,10,SX,IPO,88 +PriceIsPaidTo,88,SX +PASSES,Charlie +PASSES,Alice +PASSES,Bob + +END_SR,4 +PRICE_MOVES_LOG,BY,100,D3,108,D2 +SoldOut,BY,100,D3,108,D2 +Has,M1,40 +Has,M2,75 +Has,M3,40 +Has,M4,60 +Has,M5,50 +Has,M6,60 +Has,BY,290 +Has,SX,528 +Has,Alice,71 +Has,Bob,69 +Has,Charlie,21 +START_OR,4.1 +ReceivesFor,Alice,10,OBB +ReceivesFor,Bob,15,PfB +ReceivesFor,Charlie,20,LD +ReceivesFor,Bob,25,BB +ReceivesFor,Charlie,30,HB + +CompanyOperates,M1,Bob +LaysTileAt,M1,4,K3,NW +CompanyRevenue,M1,40 +CompanySplits,M1,40 +M1 receives 20 +Payout,Bob,20,1,100 + +CompanyOperates,M2,Alice +CompanyRevenue,M2,70 +CompanySplits,M2,70 +M2 receives 35 +Payout,Alice,35,1,100 + +CompanyOperates,M3,Bob +LaysTileAt,M3,57,F10,W +CompanyRevenue,M3,40 +CompanySplits,M3,40 +M3 receives 20 +Payout,Bob,20,1,100 + +CompanyOperates,M4,Charlie +LaysTileAtFor,M4,5,D8,W,50 +CompanyRevenue,M4,60 +CompanySplits,M4,60 +M4 receives 30 +Payout,Charlie,30,1,100 + +CompanyOperates,M5,Charlie +CompanyRevenue,M5,50 +CompanySplits,M5,50 +M5 receives 25 +Payout,Charlie,25,1,100 + +CompanyOperates,M6,Bob +LaysTileAt,M6,58,B14,SE +CompanyRevenue,M6,60 +CompanySplits,M6,60 +M6 receives 30 +Payout,Bob,30,1,100 + +CompanyOperates,BY,Alice +LaysTileAtFor,BY,9,J14,W,70 +LaysTileAt,BY,9,J12,W +CompanyRevenue,BY,200 +CompanyPaysOutFull,BY,200 +Payout,Bob,60,3,10 +Payout,Charlie,20,1,10 +Payout,Alice,120,6,10 +PRICE_MOVES_LOG,BY,108,D2,120,E2 + +CompanyOperates,SX,Charlie +LaysTileAt,SX,8,H18,SE +CompanyDoesNotPayDividend,SX +PRICE_MOVES_LOG,SX,88,C4,84,B4 +BuysTrain,SX,2+2,IPO,120 +PrivateCloses,LD +BuysTrain,SX,2+2,IPO,120 +All 2+2-trains are sold out, 3-trains now available +BuysTrain,SX,3,IPO,180 +FirstTrainBought,3 +StartOfPhase,3 + +EndOfOperatingRound,4.1 +ORWorthIncrease,Alice,4.1,237 +ORWorthIncrease,Bob,4.1,198 +ORWorthIncrease,Charlie,4.1,-69 +Has,M1,60 +Has,M2,110 +Has,M3,60 +Has,M4,40 +Has,M5,75 +Has,M6,90 +Has,BY,220 +Has,SX,108 +Has,Alice,236 +Has,Bob,239 +Has,Charlie,146 +StartStockRound,5 +HasPriority,Charlie +BUY_SHARE_LOG,Charlie,10,SX,IPO,88 +PriceIsPaidTo,88,SX +BUY_SHARE_LOG,Alice,10,SX,IPO,88 +PriceIsPaidTo,88,SX +BUY_SHARE_LOG,Bob,10,SX,IPO,88 +PriceIsPaidTo,88,SX +PASSES,Charlie +BUY_SHARE_LOG,Alice,10,SX,IPO,88 +PriceIsPaidTo,88,SX +SharesReleased,All,BA +PASSES,Bob +PASSES,Charlie +PASSES,Alice + +END_SR,5 +PRICE_MOVES_LOG,BY,120,E2,132,E1 +SoldOut,BY,120,E2,132,E1 +PRICE_MOVES_LOG,SX,84,B4,86,B3 +SoldOut,SX,84,B4,86,B3 +Has,M1,60 +Has,M2,110 +Has,M3,60 +Has,M4,40 +Has,M5,75 +Has,M6,90 +Has,BY,220 +Has,SX,460 +Has,Alice,60 +Has,Bob,151 +Has,Charlie,58 +START_OR,5.1 +ReceivesFor,Alice,10,OBB +ReceivesFor,Bob,15,PfB +ReceivesFor,Bob,25,BB +ReceivesFor,Charlie,30,HB + +CompanyOperates,M1,Bob +LaysTileAt,M1,207,H2,E +CompanyRevenue,M1,50 +CompanySplits,M1,50 +M1 receives 25 +Payout,Bob,25,1,100 + +CompanyOperates,M2,Alice +LaysTileAt,M2,209,E19,SW +CompanyRevenue,M2,80 +CompanySplits,M2,80 +M2 receives 40 +Payout,Alice,40,1,100 +BuysTrain,M2,2+2,BY,150 + +CompanyOperates,M3,Bob +LaysTileAt,M3,205,F14,SE +CompanyRevenue,M3,50 +CompanySplits,M3,50 +M3 receives 25 +Payout,Bob,25,1,100 + +CompanyOperates,M4,Charlie +LaysTileAt,M4,14,G5,SW +CompanyRevenue,M4,80 +CompanySplits,M4,80 +M4 receives 40 +Payout,Charlie,40,1,100 + +CompanyOperates,M5,Charlie +LaysTileAt,M5,208,H20,W +CompanyRevenue,M5,80 +CompanySplits,M5,80 +M5 receives 40 +Payout,Charlie,40,1,100 +BuysTrain,M5,2+2,SX,115 + +CompanyOperates,M6,Bob +LaysTileAt,M6,12,A11,W +CompanyRevenue,M6,70 +CompanySplits,M6,70 +M6 receives 35 +Payout,Bob,35,1,100 + +CompanyOperates,BY,Alice +LaysTileAt,BY,9,J10,W +LAYS_TOKEN_ON,BY,J8,120 +CompanyRevenue,BY,240 +CompanyPaysOutFull,BY,240 +Payout,Bob,72,3,10 +Payout,Alice,144,6,10 +Payout,Charlie,24,1,10 +PRICE_MOVES_LOG,BY,132,E1,148,F1 +BuysTrain,BY,3,IPO,180 + +CompanyOperates,SX,Charlie +LaysTileAt,SX,13,H16,W +LAYS_TOKEN_ON,SX,E19,60 +CompanyRevenue,SX,190 +CompanyPaysOutFull,SX,190 +Payout,Alice,38,2,10 +Payout,Bob,57,3,10 +Payout,Charlie,95,5,10 +PRICE_MOVES_LOG,SX,86,B3,92,C3 +BuysTrain,SX,3,IPO,180 +BuysTrain,SX,3,IPO,180 +All 3-trains are sold out, 3+3-trains now available + +EndOfOperatingRound,5.1 +ORWorthIncrease,Alice,5.1,340 +ORWorthIncrease,Bob,5.1,320 +ORWorthIncrease,Charlie,5.1,275 +Has,M1,85 +Has,M2,0 +Has,M3,85 +Has,M4,80 +Has,M5,0 +Has,M6,125 +Has,BY,70 +Has,SX,155 +Has,Alice,292 +Has,Bob,405 +Has,Charlie,287 +START_OR,5.2 +ReceivesFor,Alice,10,OBB +ReceivesFor,Bob,15,PfB +ReceivesFor,Bob,25,BB +ReceivesFor,Charlie,30,HB + +CompanyOperates,M1,Bob +LaysTileAtFor,M1,211,G3,E,50 +CompanyRevenue,M1,70 +CompanySplits,M1,70 +M1 receives 35 +Payout,Bob,35,1,100 + +CompanyOperates,M2,Alice +LaysTileAt,M2,23,D18,NW +CompanyRevenue,M2,180 +CompanySplits,M2,180 +M2 receives 90 +Payout,Alice,90,1,100 + +CompanyOperates,M3,Bob +LaysTileAt,M3,8,F8,E +CompanyRevenue,M3,50 +CompanySplits,M3,50 +M3 receives 25 +Payout,Bob,25,1,100 + +CompanyOperates,M4,Charlie +LaysTileAt,M4,8,G7,W +CompanyRevenue,M4,110 +CompanySplits,M4,110 +M4 receives 55 +Payout,Charlie,55,1,100 + +CompanyOperates,M5,Charlie +LaysTileAt,M5,8,C17,SE +CompanyRevenue,M5,180 +CompanySplits,M5,180 +M5 receives 90 +Payout,Charlie,90,1,100 + +CompanyOperates,M6,Bob +LaysTileAt,M6,8,C15,NW +CompanyRevenue,M6,70 +CompanySplits,M6,70 +M6 receives 35 +Payout,Bob,35,1,100 + +CompanyOperates,BY,Alice +LaysTileAtFor,BY,214,J6,SE,50 +CompanyRevenue,BY,330 +CompanyPaysOutFull,BY,330 +Payout,Alice,198,6,10 +Payout,Bob,99,3,10 +Payout,Charlie,33,1,10 +PRICE_MOVES_LOG,BY,148,F1,166,G1 + +CompanyOperates,SX,Charlie +LaysTileAt,SX,23,H18,E +LAYS_TOKEN_ON,SX,H20,40 +CompanyRevenue,SX,370 +CompanyPaysOutFull,SX,370 +Payout,Alice,74,2,10 +Payout,Bob,111,3,10 +Payout,Charlie,185,5,10 +PRICE_MOVES_LOG,SX,92,C3,100,D3 + +EndOfOperatingRound,5.2 +ORWorthIncrease,Alice,5.2,496 +ORWorthIncrease,Bob,5.2,423 +ORWorthIncrease,Charlie,5.2,451 +Has,M1,70 +Has,M2,90 +Has,M3,110 +Has,M4,135 +Has,M5,90 +Has,M6,160 +Has,BY,20 +Has,SX,115 +Has,Alice,664 +Has,Bob,750 +Has,Charlie,680 +StartStockRound,6 +HasPriority,Bob +START_COMPANY_LOG,Bob,BA,84,168,2,20,BANK +SharesReleased,4 10%,PR +BUY_SHARE_LOG,Charlie,10,BA,IPO,84 +BUY_SHARE_LOG,Alice,10,BA,IPO,84 +BUY_SHARE_LOG,Bob,10,BA,IPO,84 +FloatsWithCash,BA,420 +SharesReleased,All,WT +BUY_SHARE_LOG,Charlie,10,BA,IPO,84 +PriceIsPaidTo,84,BA +START_COMPANY_LOG,Alice,WT,84,168,2,20,BANK +BUY_SHARE_LOG,Bob,10,BA,IPO,84 +PriceIsPaidTo,84,BA +BUY_SHARE_LOG,Charlie,10,BA,IPO,84 +PriceIsPaidTo,84,BA +BUY_SHARE_LOG,Alice,10,WT,IPO,84 +BUY_SHARE_LOG,Bob,20,BA,IPO,168 +PriceIsPaidTo,168,BA +BUY_SHARE_LOG,Charlie,10,WT,IPO,84 +BUY_SHARE_LOG,Alice,10,WT,IPO,84 +FloatsWithCash,WT,420 +SharesReleased,All,HE +BUY_SHARE_LOG,Bob,10,WT,IPO,84 +PriceIsPaidTo,84,WT +START_COMPANY_LOG,Charlie,HE,84,168,2,20,BANK +BUY_SHARE_LOG,Alice,10,HE,IPO,84 +BUY_SHARE_LOG,Bob,10,HE,IPO,84 +BUY_SHARE_LOG,Charlie,10,HE,IPO,84 +FloatsWithCash,HE,420 +BUY_SHARE_LOG,Alice,10,HE,IPO,84 +PriceIsPaidTo,84,HE +PASSES,Bob +BUY_SHARE_LOG,Charlie,10,HE,IPO,84 +PriceIsPaidTo,84,HE +PASSES,Alice +PASSES,Bob +PASSES,Charlie + +END_SR,6 +PRICE_STAYS_LOG,BY,166,G1 +SoldOutNoRaise,BY,166,G1 +PRICE_MOVES_LOG,SX,100,D3,108,D2 +SoldOut,SX,100,D3,108,D2 +PRICE_MOVES_LOG,BA,84,B4,86,B3 +SoldOut,BA,84,B4,86,B3 +Has,M1,70 +Has,M2,90 +Has,M3,110 +Has,M4,135 +Has,M5,90 +Has,M6,160 +Has,BY,20 +Has,SX,115 +Has,BA,840 +Has,WT,504 +Has,HE,588 +Has,Alice,76 +Has,Bob,78 +Has,Charlie,8 +START_OR,6.1 +ReceivesFor,Alice,10,OBB +ReceivesFor,Bob,15,PfB +ReceivesFor,Bob,25,BB +ReceivesFor,Charlie,30,HB + +CompanyOperates,M1,Bob +LaysTileAt,M1,9,I5,SE +CompanyRevenue,M1,70 +CompanySplits,M1,70 +M1 receives 35 +Payout,Bob,35,1,100 + +CompanyOperates,M2,Alice +CompanyRevenue,M2,180 +CompanySplits,M2,180 +M2 receives 90 +Payout,Alice,90,1,100 + +CompanyOperates,M3,Bob +LaysTileAt,M3,206,F10,SE +CompanyRevenue,M3,50 +CompanySplits,M3,50 +M3 receives 25 +Payout,Bob,25,1,100 + +CompanyOperates,M4,Charlie +LaysTileAt,M4,15,D8,NE +CompanyRevenue,M4,110 +CompanySplits,M4,110 +M4 receives 55 +Payout,Charlie,55,1,100 + +CompanyOperates,M5,Charlie +CompanyRevenue,M5,180 +CompanySplits,M5,180 +M5 receives 90 +Payout,Charlie,90,1,100 + +CompanyOperates,M6,Bob +CompanyRevenue,M6,70 +CompanySplits,M6,70 +M6 receives 35 +Payout,Bob,35,1,100 + +CompanyOperates,BY,Alice +LaysTileAt,BY,8,K5,NE +CompanyRevenue,BY,330 +CompanyPaysOutFull,BY,330 +Payout,Alice,198,6,10 +Payout,Bob,99,3,10 +Payout,Charlie,33,1,10 +PRICE_MOVES_LOG,BY,166,G1,186,H1 + +CompanyOperates,SX,Charlie +CompanyRevenue,SX,370 +CompanyPaysOutFull,SX,370 +Payout,Alice,74,2,10 +Payout,Bob,111,3,10 +Payout,Charlie,185,5,10 +PRICE_MOVES_LOG,SX,108,D2,120,E2 + +CompanyOperates,BA,Bob +LaysTileAt,BA,210,L6,E +CompanyDoesNotPayDividend,BA +PRICE_MOVES_LOG,BA,86,B3,82,A3 +BuysTrain,BA,3+3,IPO,270 +FirstTrainBought,3+3 +BuysTrain,BA,3+3,IPO,270 +BuysTrain,BA,3+3,IPO,270 +All 3+3-trains are sold out, 4-trains now available + +CompanyOperates,WT,Alice +LaysTileAt,WT,57,M9,W +CompanyDoesNotPayDividend,WT +PRICE_MOVES_LOG,WT,84,B4,78,A4 +BuysTrain,WT,4,IPO,360 +FirstTrainBought,4 +StartOfPhase,4 +CompanyDiscardsTrain,SX,2+2 +StartFormationRound,PR +StartingPlayer,Alice + +EndOfFormationRound,PR,OperatingRound 6.1 + +CompanyOperates,HE,Charlie +LaysTileAtFor,HE,9,K7,SW,50 +CompanyDoesNotPayDividend,HE +PRICE_MOVES_LOG,HE,84,B4,78,A4 +BuysTrain,HE,4,IPO,360 + +EndOfOperatingRound,6.1 +ORWorthIncrease,Alice,6.1,476 +ORWorthIncrease,Bob,6.1,405 +ORWorthIncrease,Charlie,6.1,431 +Has,M1,105 +Has,M2,180 +Has,M3,135 +Has,M4,190 +Has,M5,180 +Has,M6,195 +Has,BY,20 +Has,SX,115 +Has,BA,30 +Has,WT,144 +Has,HE,178 +Has,Alice,448 +Has,Bob,423 +Has,Charlie,401 +StartFormationRound,PR +StartingPlayer,Alice + +EndOfFormationRoundNoInterrupt,PR +START_OR,6.2 +ReceivesFor,Alice,10,OBB +ReceivesFor,Bob,15,PfB +ReceivesFor,Bob,25,BB +ReceivesFor,Charlie,30,HB + +CompanyOperates,M1,Bob +LaysTileAt,M1,8,D10,W +CompanyDoesNotPayDividend,M1 +BuysTrain,M1,3+3,BA,105 + +CompanyOperates,M2,Alice +LaysTileAt,M2,203,B12,W +CompanyRevenue,M2,100 +CompanySplits,M2,100 +M2 receives 50 +Payout,Alice,50,1,100 + +CompanyOperates,M3,Bob +LaysTileAt,M3,9,F16,W +CompanyDoesNotPayDividend,M3 + +CompanyOperates,M4,Charlie +CompanyDoesNotPayDividend,M4 +BuysTrain,M4,3,SX,190 + +CompanyOperates,M5,Charlie +CompanyRevenue,M5,100 +CompanySplits,M5,100 +M5 receives 50 +Payout,Charlie,50,1,100 + +CompanyOperates,M6,Bob +CompanyDoesNotPayDividend,M6 +BuysTrain,M6,3+3,BA,195 + +CompanyOperates,BY,Alice +LaysTileAt,BY,23,F20,NW +CompanyRevenue,BY,180 +CompanyPaysOutFull,BY,180 +Payout,Alice,108,6,10 +Payout,Bob,54,3,10 +Payout,Charlie,18,1,10 +PRICE_MOVES_LOG,BY,186,H1,208,I1 +BuysTrain,BY,2+2,M2,1 + +CompanyOperates,SX,Charlie +CompanyRevenue,SX,220 +CompanyPaysOutFull,SX,220 +Payout,Alice,44,2,10 +Payout,Bob,66,3,10 +Payout,Charlie,110,5,10 +PRICE_MOVES_LOG,SX,120,E2,134,F2 +BuysTrain,SX,2+2,M5,1 + +CompanyOperates,BA,Bob +CompanyRevenue,BA,120 +CompanyPaysOutFull,BA,120 +Payout,Alice,12,1,10 +Payout,Bob,72,6,10 +Payout,Charlie,36,3,10 +PRICE_MOVES_LOG,BA,82,A3,86,B3 +BuysTrain,BA,3+3,M1,1 + +CompanyOperates,WT,Alice +LaysTileAt,WT,9,M11,W +CompanyRevenue,WT,0 +CompanyDoesNotPayDividend,WT +PRICE_MOVES_LOG,WT,78,A4,72,A5 + +CompanyOperates,HE,Charlie +CompanyRevenue,HE,130 +CompanyPaysOutFull,HE,130 +Payout,Alice,26,2,10 +Payout,Bob,13,1,10 +Payout,Charlie,52,4,10 +PRICE_MOVES_LOG,HE,78,A4,84,B4 +BuysTrain,HE,3+3,M6,1 + +EndOfOperatingRound,6.2 +ORWorthIncrease,Alice,6.2,402 +ORWorthIncrease,Bob,6.2,377 +ORWorthIncrease,Charlie,6.2,418 +Has,M1,1 +Has,M2,231 +Has,M3,135 +Has,M4,0 +Has,M5,231 +Has,M6,1 +Has,BY,19 +Has,SX,304 +Has,BA,329 +Has,WT,144 +Has,HE,177 +Has,Alice,698 +Has,Bob,668 +Has,Charlie,697 +StartFormationRound,PR +StartingPlayer,Alice + +EndOfFormationRoundNoInterrupt,PR +StartStockRound,7 +HasPriority,Alice +BUY_SHARE_LOG,Alice,10,PR,IPO,154 +BUY_SHARE_LOG,Bob,10,PR,IPO,154 +BUY_SHARE_LOG,Charlie,10,PR,IPO,154 +BUY_SHARE_LOG,Alice,10,PR,IPO,154 +SELL_SHARE_LOG,Bob,10,BY,208 +PRICE_MOVES_LOG,BY,208,I1,188,I2 +BUY_SHARE_LOG,Charlie,10,HE,IPO,84 +PriceIsPaidTo,84,HE +BUY_SHARE_LOG,Alice,10,BY,Pool,188 +BUY_SHARE_LOG,Bob,20,HE,IPO,168 +PriceIsPaidTo,168,HE +BUY_SHARE_LOG,Charlie,10,WT,IPO,84 +PriceIsPaidTo,84,WT +BUY_SHARE_LOG,Alice,10,WT,IPO,84 +PriceIsPaidTo,84,WT +PASSES,Bob +PASSES,Charlie +PASSES,Alice + +END_SR,7 +PRICE_MOVES_LOG,BY,188,I2,208,I1 +SoldOut,BY,188,I2,208,I1 +PRICE_MOVES_LOG,SX,134,F2,148,F1 +SoldOut,SX,134,F2,148,F1 +SoldOutNoRaise,BA,86,B3 +PRICE_MOVES_LOG,HE,84,B4,86,B3 +SoldOut,HE,84,B4,86,B3 +Has,M1,1 +Has,M2,231 +Has,M3,135 +Has,M4,0 +Has,M5,231 +Has,M6,1 +Has,BY,19 +Has,SX,304 +Has,BA,329 +Has,WT,312 +Has,HE,429 +Has,Alice,118 +Has,Bob,554 +Has,Charlie,375 +StartFormationRound,PR +StartingPlayer,Alice + +EndOfFormationRoundNoInterrupt,PR +START_OR,7.1 +ReceivesFor,Alice,10,OBB +ReceivesFor,Bob,15,PfB +ReceivesFor,Bob,25,BB +ReceivesFor,Charlie,30,HB + +CompanyOperates,M1,Bob +CompanyDoesNotPayDividend,M1 + +CompanyOperates,M2,Alice +CompanyDoesNotPayDividend,M2 +BuysTrain,M2,2+2,BY,231 + +CompanyOperates,M3,Bob +CompanyDoesNotPayDividend,M3 +BuysTrain,M3,3+3,BA,135 + +CompanyOperates,M4,Charlie +CompanyRevenue,M4,90 +CompanySplits,M4,90 +M4 receives 45 +Payout,Charlie,45,1,100 + +CompanyOperates,M5,Charlie +CompanyDoesNotPayDividend,M5 +BuysTrain,M5,2+2,SX,231 + +CompanyOperates,M6,Bob +CompanyDoesNotPayDividend,M6 + +CompanyOperates,BY,Alice +CompanyRevenue,BY,190 +CompanyPaysOutFull,BY,190 +Payout,Alice,133,7,10 +Payout,Bob,38,2,10 +Payout,Charlie,19,1,10 +PRICE_MOVES_LOG,BY,208,I1,232,J1 + +CompanyOperates,SX,Charlie +CompanyRevenue,SX,220 +CompanyPaysOutFull,SX,220 +Payout,Alice,44,2,10 +Payout,Bob,66,3,10 +Payout,Charlie,110,5,10 +PRICE_MOVES_LOG,SX,148,F1,166,G1 +BuysTrain,SX,4,IPO,360 +All 4-trains are sold out, 4+4-trains now available + +CompanyOperates,BA,Bob +CompanyRevenue,BA,120 +CompanyPaysOutFull,BA,120 +Payout,Alice,12,1,10 +Payout,Bob,72,6,10 +Payout,Charlie,36,3,10 +PRICE_MOVES_LOG,BA,86,B3,92,C3 +BuysTrain,BA,4+4,IPO,440 +All 4+4-trains are sold out, 5-trains now available +FirstTrainBought,4+4 +StartOfPhase,4+4 +StartFormationRound,PR +START_MERGED_COMPANY,PR,154,154 +FloatsWithCash,PR,616 +MERGE_MINOR_LOG,Alice,M2,PR,0,0 +GetShareForMinor,Alice,10,PR,IPO,M2 +ExchangesBaseToken,PR,M2,E19/1 + +EndOfFormationRound,PR,OperatingRound 7.1 + +CompanyOperates,HE,Charlie +LaysTileAt,HE,8,L4,NW +LAYS_TOKEN_ON,HE,G5,60 +CompanyRevenue,HE,260 +CompanyPaysOutFull,HE,260 +Payout,Alice,52,2,10 +Payout,Bob,78,3,10 +Payout,Charlie,130,5,10 +PRICE_MOVES_LOG,HE,86,B3,92,C3 + +CompanyOperates,WT,Alice +LaysTileAt,WT,69,M7,SE +CompanyRevenue,WT,280 +CompanyWithholds,WT,280 +PRICE_MOVES_LOG,WT,72,A5,64,A6 + +EndOfOperatingRound,7.1 +ORWorthIncrease,Alice,7.1,587 +ORWorthIncrease,Bob,7.1,442 +ORWorthIncrease,Charlie,7.1,516 +Has,M1,1 +Has,M3,0 +Has,M4,45 +Has,M5,0 +Has,M6,1 +Has,BY,250 +Has,SX,175 +Has,BA,24 +Has,WT,592 +Has,HE,369 +Has,PR,616 +Has,Alice,369 +Has,Bob,848 +Has,Charlie,745 +StartFormationRound,PR + +EndOfFormationRoundNoInterrupt,PR +START_OR,7.2 +ReceivesFor,Alice,10,OBB +ReceivesFor,Bob,15,PfB +ReceivesFor,Bob,25,BB +ReceivesFor,Charlie,30,HB + +CompanyOperates,M1,Bob +CompanyDoesNotPayDividend,M1 +BuysTrain,M1,3+3,BA,1 + +CompanyOperates,M3,Bob +CompanyRevenue,M3,90 +CompanySplits,M3,90 +M3 receives 45 +Payout,Bob,45,1,100 + +CompanyOperates,M4,Charlie +CompanyRevenue,M4,90 +CompanySplits,M4,90 +M4 receives 45 +Payout,Charlie,45,1,100 + +CompanyOperates,M5,Charlie +CompanyDoesNotPayDividend,M5 + +CompanyOperates,M6,Bob +CompanyDoesNotPayDividend,M6 +BuysTrain,M6,3,SX,1 + +CompanyOperates,BY,Alice +CompanyRevenue,BY,110 +CompanyPaysOutFull,BY,110 +Payout,Alice,77,7,10 +Payout,Bob,22,2,10 +Payout,Charlie,11,1,10 +PRICE_MOVES_LOG,BY,232,J1,258,K1 + +CompanyOperates,SX,Charlie +CompanyRevenue,SX,240 +CompanyPaysOutFull,SX,240 +Payout,Alice,48,2,10 +Payout,Bob,72,3,10 +Payout,Charlie,120,5,10 +PRICE_MOVES_LOG,SX,166,G1,186,H1 + +CompanyOperates,PR,Alice +CompanyDoesNotPayDividend,PR +PRICE_MOVES_LOG,PR,154,I4,138,H4 +BuysTrain,PR,5,IPO,500 +FirstTrainBought,5 +StartOfPhase,5 +PrivateCloses,OBB +PrivateCloses,PfB +StartFormationRound,PR +MERGE_MINOR_LOG,Bob,BB,PR,no,no +GetShareForMinor,Bob,10,PR,IPO,BB +PrivateCloses,BB +MERGE_MINOR_LOG,Charlie,HB,PR,no,no +GetShareForMinor,Charlie,10,PR,IPO,HB +PrivateCloses,HB +MERGE_MINOR_LOG,Bob,M1,PR,0,1 +GetShareForMinor,Bob,5,PR,IPO,M1 +ExchangesBaseToken,PR,M1,H2/1 +MERGE_MINOR_LOG,Bob,M3,PR,45,1 +GetShareForMinor,Bob,5,PR,IPO,M3 +ExchangesBaseToken,PR,M3,F14/1 +MERGE_MINOR_LOG,Charlie,M4,PR,90,1 +GetShareForMinor,Charlie,10,PR,IPO,M4 +ExchangesBaseToken,PR,M4,G5/1 +MERGE_MINOR_LOG,Charlie,M5,PR,0,0 +GetShareForMinor,Charlie,5,PR,IPO,M5 +MERGE_MINOR_LOG,Bob,M6,PR,0,1 +GetShareForMinor,Bob,5,PR,IPO,M6 +ExchangesBaseToken,PR,M6,C11/1 +CompanyDiscardsTrain,PR,3 +CompanyDiscardsTrain,PR,3 + +EndOfFormationRound,PR,OperatingRound 7.2 +IS_NOW_PRES_OF,Bob,PR + +CompanyOperates,BA,Bob diff --git a/test/data/test/1835_PR_3rdTrain.report b/test/data/test/1835_PR_3rdTrain.report index aef617c..ad6dcaf 100644 --- a/test/data/test/1835_PR_3rdTrain.report +++ b/test/data/test/1835_PR_3rdTrain.report @@ -1,1103 +1,1103 @@ -GameIs,1835 -PlayerIs,1,Alice -PlayerIs,2,Bob -PlayerIs,3,Charlie -PlayerCash,600 -BankHas,10200 -StartOfPhase,2 -BankSizeIs,10200 -StartOfInitialRound -HasPriority,Alice -BuysItemFor,Alice,NF,100 -ALSO_GETS,Alice,CERT_NAME,BY,10 -BuysItemFor,Bob,M1,80 -FloatsWithCash,M1,80 -BuysItemFor,Charlie,LD,190 -ALSO_GETS,Charlie,PRES_CERT_NAME,SX,20 -BuysItemFor,Alice,M2,170 -FloatsWithCash,M2,170 -BuysItemFor,Bob,M3,80 -FloatsWithCash,M3,80 -BuysItemFor,Charlie,M4,160 -FloatsWithCash,M4,160 -BuysItemFor,Alice,PRES_CERT_NAME,BY,20,184 -BuysItemFor,Bob,BB,130 -BuysItemFor,Charlie,HB,160 -BuysItemFor,Alice,OBB,120 -ALSO_GETS,Alice,CERT_NAME,BY,10 -BuysItemFor,Bob,PfB,150 -ALSO_GETS,Bob,CERT_NAME,BY,10 -FloatsWithCash,BY,460 -BuysItemFor,Charlie,M5,80 -FloatsWithCash,M5,80 -CannotBuyAnything,Alice -BuysItemFor,Bob,M6,80 -FloatsWithCash,M6,80 -Has,M1,80 -Has,M2,170 -Has,M3,80 -Has,M4,160 -Has,M5,80 -Has,M6,80 -Has,BY,460 -Has,Alice,26 -Has,Bob,80 -Has,Charlie,10 -StartStockRound,1 -HasPriority,Charlie -PASSES,Charlie -PASSES,Alice -PASSES,Bob - -END_SR,1 -Has,M1,80 -Has,M2,170 -Has,M3,80 -Has,M4,160 -Has,M5,80 -Has,M6,80 -Has,BY,460 -Has,Alice,26 -Has,Bob,80 -Has,Charlie,10 -START_OR,1.1 -ReceivesFor,Alice,5,NF -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Charlie,20,LD -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,202,H2,W -CompanyDoesNotPayDividend,M1 -BuysTrain,M1,2,IPO,80 -FirstTrainBought,2 - -CompanyOperates,M2,Alice -LaysTileAt,M2,8,E17,NW -CompanyDoesNotPayDividend,M2 -BuysTrain,M2,2,IPO,80 - -CompanyOperates,M3,Bob -LaysTileAt,M3,6,F14,NW -CompanyDoesNotPayDividend,M3 -BuysTrain,M3,2,IPO,80 - -CompanyOperates,M4,Charlie -LaysTileAt,M4,57,G5,SW -CompanyDoesNotPayDividend,M4 -BuysTrain,M4,2,IPO,80 -BuysTrain,M4,2,IPO,80 - -CompanyOperates,M5,Charlie -LaysTileAt,M5,8,D18,NE -CompanyDoesNotPayDividend,M5 -BuysTrain,M5,2,IPO,80 - -CompanyOperates,M6,Bob -LaysTileAt,M6,9,B10,NW -CompanyDoesNotPayDividend,M6 -BuysTrain,M6,2,IPO,80 - -CompanyOperates,BY,Alice -LAYS_FREE_TOKEN_ON,BY,L14 -PrivateCloses,NF -LaysTileAtFor,BY,9,K15,SW,70 -LaysTileAt,BY,1,I17,SW -LaysTileAt,BY,58,M15,SW -CompanyDoesNotPayDividend,BY -PRICE_MOVES_LOG,BY,92,C3,86,B3 -BuysTrain,BY,2,IPO,80 -BuysTrain,BY,2,IPO,80 -All 2-trains are sold out, 2+2-trains now available -BuysTrain,BY,2+2,IPO,120 -FirstTrainBought,2+2 - -EndOfOperatingRound,1.1 -ORWorthIncrease,Alice,1.1,-109 -ORWorthIncrease,Bob,1.1,34 -ORWorthIncrease,Charlie,1.1,50 -Has,M1,0 -Has,M2,90 -Has,M3,0 -Has,M4,0 -Has,M5,0 -Has,M6,0 -Has,BY,110 -Has,Alice,41 -Has,Bob,120 -Has,Charlie,60 -StartStockRound,2 -HasPriority,Charlie -PASSES,Charlie -PASSES,Alice -BUY_SHARE_LOG,Bob,10,BY,IPO,92 -PriceIsPaidTo,92,BY -PASSES,Charlie -PASSES,Alice -PASSES,Bob - -END_SR,2 -Has,M1,0 -Has,M2,90 -Has,M3,0 -Has,M4,0 -Has,M5,0 -Has,M6,0 -Has,BY,202 -Has,Alice,41 -Has,Bob,28 -Has,Charlie,60 -START_OR,2.1 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Charlie,20,LD -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,69,H4,NW -CompanyRevenue,M1,40 -CompanySplits,M1,40 -M1 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M2,Alice -LaysTileAt,M2,8,D16,SE -CompanyRevenue,M2,0 -CompanyDoesNotPayDividend,M2 - -CompanyOperates,M3,Bob -LaysTileAt,M3,4,G15,NW -CompanyRevenue,M3,40 -CompanySplits,M3,40 -M3 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M4,Charlie -LaysTileAt,M4,4,F6,SW -CompanyRevenue,M4,60 -CompanySplits,M4,60 -M4 receives 30 -Payout,Charlie,30,1,100 - -CompanyOperates,M5,Charlie -LaysTileAt,M5,8,C19,E -CompanyRevenue,M5,50 -CompanySplits,M5,50 -M5 receives 25 -Payout,Charlie,25,1,100 - -CompanyOperates,M6,Bob -LaysTileAt,M6,6,A11,NW -CompanyRevenue,M6,60 -CompanySplits,M6,60 -M6 receives 30 -Payout,Bob,30,1,100 - -CompanyOperates,BY,Alice -LaysTileAt,BY,202,H20,W -LaysTileAt,BY,9,F20,NW -LAYS_TOKEN_ON,BY,H20,160 -CompanyRevenue,BY,160 -CompanyPaysOutFull,BY,160 -Payout,Bob,32,2,10 -Payout,Alice,64,4,10 -PRICE_MOVES_LOG,BY,86,B3,92,C3 - -EndOfOperatingRound,2.1 -ORWorthIncrease,Alice,2.1,98 -ORWorthIncrease,Bob,2.1,154 -ORWorthIncrease,Charlie,2.1,105 -Has,M1,20 -Has,M2,90 -Has,M3,20 -Has,M4,30 -Has,M5,25 -Has,M6,30 -Has,BY,42 -Has,Alice,115 -Has,Bob,170 -Has,Charlie,165 -StartStockRound,3 -HasPriority,Charlie -BUY_SHARE_LOG,Charlie,10,BY,IPO,92 -PriceIsPaidTo,92,BY -BUY_SHARE_LOG,Alice,10,BY,IPO,92 -PriceIsPaidTo,92,BY -BUY_SHARE_LOG,Bob,10,BY,IPO,92 -PriceIsPaidTo,92,BY -PASSES,Charlie -PASSES,Alice -PASSES,Bob - -END_SR,3 -Has,M1,20 -Has,M2,90 -Has,M3,20 -Has,M4,30 -Has,M5,25 -Has,M6,30 -Has,BY,318 -Has,Alice,23 -Has,Bob,78 -Has,Charlie,73 -START_OR,3.1 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Charlie,20,LD -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,9,J2,NW -CompanyRevenue,M1,40 -CompanySplits,M1,40 -M1 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M2,Alice -LaysTileAtFor,M2,8,D14,NW,50 -CompanyRevenue,M2,70 -CompanySplits,M2,70 -M2 receives 35 -Payout,Alice,35,1,100 - -CompanyOperates,M3,Bob -LaysTileAt,M3,6,H16,SE -CompanyRevenue,M3,40 -CompanySplits,M3,40 -M3 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M4,Charlie -LaysTileAt,M4,9,E7,SW -CompanyRevenue,M4,60 -CompanySplits,M4,60 -M4 receives 30 -Payout,Charlie,30,1,100 - -CompanyOperates,M5,Charlie -CompanyRevenue,M5,50 -CompanySplits,M5,50 -M5 receives 25 -Payout,Charlie,25,1,100 - -CompanyOperates,M6,Bob -LaysTileAt,M6,58,B12,NW -CompanyRevenue,M6,60 -CompanySplits,M6,60 -M6 receives 30 -Payout,Bob,30,1,100 - -CompanyOperates,BY,Alice -LaysTileAt,BY,8,N14,NE -LaysTileAt,BY,201,O15,NW -CompanyRevenue,BY,190 -CompanyPaysOutFull,BY,190 -Payout,Charlie,19,1,10 -Payout,Bob,57,3,10 -Payout,Alice,95,5,10 -PRICE_MOVES_LOG,BY,92,C3,100,D3 -BuysTrain,BY,2+2,IPO,120 - -EndOfOperatingRound,3.1 -ORWorthIncrease,Alice,3.1,180 -ORWorthIncrease,Bob,3.1,191 -ORWorthIncrease,Charlie,3.1,132 -Has,M1,40 -Has,M2,75 -Has,M3,40 -Has,M4,60 -Has,M5,50 -Has,M6,60 -Has,BY,198 -Has,Alice,163 -Has,Bob,245 -Has,Charlie,197 -StartStockRound,4 -HasPriority,Charlie -BUY_SHARE_LOG,Charlie,10,SX,IPO,88 -BUY_SHARE_LOG,Alice,10,BY,IPO,92 -PriceIsPaidTo,92,BY -BUY_SHARE_LOG,Bob,10,SX,IPO,88 -BUY_SHARE_LOG,Charlie,10,SX,IPO,88 -FloatsWithCash,SX,440 -PASSES,Alice -BUY_SHARE_LOG,Bob,10,SX,IPO,88 -PriceIsPaidTo,88,SX -PASSES,Charlie -PASSES,Alice -PASSES,Bob - -END_SR,4 -PRICE_MOVES_LOG,BY,100,D3,108,D2 -SoldOut,BY,100,D3,108,D2 -Has,M1,40 -Has,M2,75 -Has,M3,40 -Has,M4,60 -Has,M5,50 -Has,M6,60 -Has,BY,290 -Has,SX,528 -Has,Alice,71 -Has,Bob,69 -Has,Charlie,21 -START_OR,4.1 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Charlie,20,LD -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,4,K3,NW -CompanyRevenue,M1,40 -CompanySplits,M1,40 -M1 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M2,Alice -CompanyRevenue,M2,70 -CompanySplits,M2,70 -M2 receives 35 -Payout,Alice,35,1,100 - -CompanyOperates,M3,Bob -LaysTileAt,M3,57,F10,W -CompanyRevenue,M3,40 -CompanySplits,M3,40 -M3 receives 20 -Payout,Bob,20,1,100 - -CompanyOperates,M4,Charlie -LaysTileAtFor,M4,5,D8,W,50 -CompanyRevenue,M4,60 -CompanySplits,M4,60 -M4 receives 30 -Payout,Charlie,30,1,100 - -CompanyOperates,M5,Charlie -CompanyRevenue,M5,50 -CompanySplits,M5,50 -M5 receives 25 -Payout,Charlie,25,1,100 - -CompanyOperates,M6,Bob -LaysTileAt,M6,58,B14,SE -CompanyRevenue,M6,60 -CompanySplits,M6,60 -M6 receives 30 -Payout,Bob,30,1,100 - -CompanyOperates,BY,Alice -LaysTileAtFor,BY,9,J14,W,70 -LaysTileAt,BY,9,J12,W -CompanyRevenue,BY,200 -CompanyPaysOutFull,BY,200 -Payout,Bob,60,3,10 -Payout,Charlie,20,1,10 -Payout,Alice,120,6,10 -PRICE_MOVES_LOG,BY,108,D2,120,E2 - -CompanyOperates,SX,Charlie -LaysTileAt,SX,8,H18,SE -CompanyDoesNotPayDividend,SX -PRICE_MOVES_LOG,SX,88,C4,84,B4 -BuysTrain,SX,2+2,IPO,120 -PrivateCloses,LD -BuysTrain,SX,2+2,IPO,120 -All 2+2-trains are sold out, 3-trains now available -BuysTrain,SX,3,IPO,180 -FirstTrainBought,3 -StartOfPhase,3 - -EndOfOperatingRound,4.1 -ORWorthIncrease,Alice,4.1,237 -ORWorthIncrease,Bob,4.1,198 -ORWorthIncrease,Charlie,4.1,-69 -Has,M1,60 -Has,M2,110 -Has,M3,60 -Has,M4,40 -Has,M5,75 -Has,M6,90 -Has,BY,220 -Has,SX,108 -Has,Alice,236 -Has,Bob,239 -Has,Charlie,146 -StartStockRound,5 -HasPriority,Charlie -BUY_SHARE_LOG,Charlie,10,SX,IPO,88 -PriceIsPaidTo,88,SX -BUY_SHARE_LOG,Alice,10,SX,IPO,88 -PriceIsPaidTo,88,SX -BUY_SHARE_LOG,Bob,10,SX,IPO,88 -PriceIsPaidTo,88,SX -PASSES,Charlie -BUY_SHARE_LOG,Alice,10,SX,IPO,88 -PriceIsPaidTo,88,SX -SharesReleased,All,BA -PASSES,Bob -PASSES,Charlie -PASSES,Alice - -END_SR,5 -PRICE_MOVES_LOG,BY,120,E2,132,E1 -SoldOut,BY,120,E2,132,E1 -PRICE_MOVES_LOG,SX,84,B4,86,B3 -SoldOut,SX,84,B4,86,B3 -Has,M1,60 -Has,M2,110 -Has,M3,60 -Has,M4,40 -Has,M5,75 -Has,M6,90 -Has,BY,220 -Has,SX,460 -Has,Alice,60 -Has,Bob,151 -Has,Charlie,58 -START_OR,5.1 -ReceivesFor,Alice,10,OBB -ReceivesFor,Bob,15,PfB -ReceivesFor,Bob,25,BB -ReceivesFor,Charlie,30,HB - -CompanyOperates,M1,Bob -LaysTileAt,M1,207,H2,E -CompanyRevenue,M1,50 -CompanySplits,M1,50 -M1 receives 25 -Payout,Bob,25,1,100 - -CompanyOperates,M2,Alice -LaysTileAt,M2,209,E19,SW -CompanyRevenue,M2,80 -CompanySplits,M2,80 -M2 receives 40 -Payout,Alice,40,1,100 -BuysTrain,M2,2+2,BY,150 - -CompanyOperates,M3,Bob -LaysTileAt,M3,205,F14,SE -CompanyRevenue,M3,50 -CompanySplits,M3,50 -M3 receives 25 -Payout,Bob,25,1,100 - -CompanyOperates,M4,Charlie -LaysTileAt,M4,14,G5,SW -CompanyRevenue,M4,80 -CompanySplits,M4,80 -M4 receives 40 -Payout,Charlie,40,1,100 - -CompanyOperates,M5,Charlie -LaysTileAt,M5,208,H20,W -CompanyRevenue,M5,80 -CompanySplits,M5,80 -M5 receives 40 -Payout,Charlie,40,1,100 -BuysTrain,M5,2+2,SX,115 - -CompanyOperates,M6,Bob -LaysTileAt,M6,12,A11,W -CompanyRevenue,M6,70 -CompanySplits,M6,70 -M6 receives 35 -Payout,Bob,35,1,100 - -CompanyOperates,BY,Alice -LaysTileAt,BY,9,J10,W -LAYS_TOKEN_ON,BY,J8,120 -CompanyRevenue,BY,240 -CompanyPaysOutFull,BY,240 -Payout,Bob,72,3,10 -Payout,Alice,144,6,10 -Payout,Charlie,24,1,10 -PRICE_MOVES_LOG,BY,132,E1,148,F1 -BuysTrain,BY,3,IPO,180 - -CompanyOperates,SX,Charlie -LaysTileAt,SX,13,H16,W -LAYS_TOKEN_ON,SX,E19,60 -CompanyRevenue,SX,190 -CompanyPaysOutFull,SX,190 -Payout,Alice,38,2,10 -Payout,Bob,57,3,10 -Payout,Charlie,95,5,10 -PRICE_MOVES_LOG,SX,86,B3,92,C3 -BuysTrain,SX,3,IPO,180 -BuysTrain,SX,3,IPO,180 -All 3-trains are sold out, 3+3-trains now avai... [truncated message content] |
From: Erik V. <ev...@us...> - 2012-04-01 11:56:03
|
rails/game/PublicCompany.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit a9a425403147d11fba8559e7798dde93a850d9aa Author: Erik Vos <eri...@xs...> Date: Sun Apr 1 13:55:40 2012 +0200 1830: fixed wrong worth calculation for Prussian shares. For PR, the market price applies to 2 (5%) share units. This (unique) difeerence was overlooked in teh worth calculation. diff --git a/rails/game/PublicCompany.java b/rails/game/PublicCompany.java index 48c56ed..92c045e 100644 --- a/rails/game/PublicCompany.java +++ b/rails/game/PublicCompany.java @@ -792,7 +792,7 @@ public class PublicCompany extends Company implements PublicCompanyI { name + "_" + colour + "_ExtraTileTurns", turns)); } - + /** Reset turn objects */ public void initTurn() { @@ -1024,7 +1024,7 @@ public class PublicCompany extends Company implements PublicCompanyI { public boolean hasFloated() { return hasFloated.booleanValue(); } - + public ModelObject getFloatedModel() { return hasFloated; } @@ -1160,7 +1160,7 @@ public class PublicCompany extends Company implements PublicCompanyI { * @return */ public int getGameEndPrice() { - return getMarketPrice(); + return getMarketPrice()/getShareUnitsForSharePrice(); } /** @@ -1968,7 +1968,7 @@ public class PublicCompany extends Company implements PublicCompanyI { // New style int tileLays = phase.getTileLaysPerColour(getTypeName(), tileColour); - + if (tileLays <= 1) { extraTileLays = null; return tileLays; @@ -1979,8 +1979,8 @@ public class PublicCompany extends Company implements PublicCompanyI { if (turnsWithExtraTileLays != null) { extraTiles = turnsWithExtraTileLays.get(tileColour); } - - + + if (extraTiles != null) { if (extraTiles.intValue() == 0) { extraTiles = null; |
From: Stefan F. <ste...@us...> - 2012-04-01 11:30:35
|
LocalisedText.properties | 7 + buildRails.xml | 2 data/Properties.xml | 1 data/profiles/LIST_OF_PROFILES | 1 data/profiles/ftf.predefined | 4 data/profiles/pbem.predefined | 6 - data/profiles/root | 3 rails/common/ConfigManager.java | 13 ++ rails/common/ConfigProfile.java | 92 +++++++++++++++-- rails/game/GameManager.java | 12 +- rails/game/specific/_18EU/StockRound_18EU.java | 8 + rails/ui/swing/ConfigWindow.java | 131 +++++++++++++++++-------- rails/ui/swing/GameSetupWindow.java | 17 ++- rails/ui/swing/GameUIManager.java | 22 +++- rails/ui/swing/WindowSettings.java | 5 rails/ui/swing/elements/DockingFrame.java | 13 -- rails/util/GameFileIO.java | 5 17 files changed, 261 insertions(+), 81 deletions(-) New commits: commit c3f1f3169475d6fb04889bb75d223aab863bf432 Author: Stefan Frey <ste...@we...> Date: Sun Apr 1 13:27:50 2012 +0200 Added option to save.filename.suffix that it displays the current round. TODO: Add shortname method for rounds (to use SRx and ORy.z). diff --git a/LocalisedText.properties b/LocalisedText.properties index 1a5e29d..463e3ae 100644 --- a/LocalisedText.properties +++ b/LocalisedText.properties @@ -174,6 +174,7 @@ Config.infoText.gridPanel.tableBorders=Grid layouts are used for the Status Wind Config.infoText.map.displayCurrentRoutes=If enabled, optimal train routes are displayed for the company which is currently taking its turn. Config.infoText.map.highlightHexes=<html>If enabled, parts of the map are highlighted depending on the position of the mouse pointer:<ul><li><b>Private companies:</b> Point to the name of a private company in order to highlight the locations associated with it (e.g., its reserved hex).<ul><li>If you point to a set of private companies (in the player or company holding), the locations of all contained private companies are highlighted</ul><li><b>Minor & Public Companies:</b> Point to the name of the company in order to highlight the locations associated with it (home and destination).</ul></html> Config.infoText.or.window.dockablePanels=<html>This alters the window of the Operating Round. If enabled, allows for the following:<ul><li>Manually resize panels.<li>Manually adjust the layout of the panels within the window.<li>Detach / retach panel from / to window.</ul></html> +Config.infoText.save.filename.suffix="<html>A suffix to the filename. There are two values that create a dynamic suffix: 'NEXT_PLAYER' is replaced by the player having the next action, 'CURRENT_ROUND' by the current round name. Config.infoText.sound.backgroundMusic=The only music file type supported is mp3. Config.infoText.sound.backgroundMusic.stockRound=<html>Enter assignment of music files to phases.<ul><li>Separate the assignments by commas.<li>Each assignment has the syntax phaseName=complete file path<li>Default music is defined by omitting "phaseName=" in the assignment.</ul><strong>Examples:</strong><ul><li>Set default music: <br><code>c:\SR-default.mp3</code><li>Set phase-dependent music and a default (for trains above 6): <br><code>2=c:\SR-2.mp3,3=c:\SR-3.mp3,4=c:\SR-4.mp3,5=c:\SR-5.mp3,6=c:\SR-6.mp3,c:\SR-D.mp3</code></ul> </html> Config.infoText.sound.backgroundMusic.operatingRound=<html>Enter assignment of music files to phases.<ul><li>Separate the assignments by commas.<li>Each assignment has the syntax phaseName=complete file path<li>Default music is defined by omitting "phaseName=" in the assignment.</ul><strong>Examples:</strong><ul><li>Set default music: <br><code>c:\OR-default.mp3</code><li>Set phase-dependent music and a default (for trains above 6): <br><code>2=c:\OR-2.mp3,3=c:\OR-3.mp3,4=c:\OR-4.mp3,5=c:\OR-5.mp3,6=c:\OR-6.mp3,c:\OR-D.mp3</code></ul> </html> diff --git a/data/profiles/ftf.predefined b/data/profiles/ftf.predefined index 377a680..c784667 100644 --- a/data/profiles/ftf.predefined +++ b/data/profiles/ftf.predefined @@ -1,3 +1,4 @@ ### ftf profile ### optimized for face-to-face play +save.filename.suffix=CURRENT_ROUND save.recovery.active=yes diff --git a/data/profiles/pbem.predefined b/data/profiles/pbem.predefined index 6f96b68..2c72adf 100644 --- a/data/profiles/pbem.predefined +++ b/data/profiles/pbem.predefined @@ -1,3 +1,4 @@ ### pbem profile ### optimized for pbem play +save.filename.suffix=NEXT_PLAYER save.recovery.active=no diff --git a/data/profiles/root b/data/profiles/root index c77f040..9aef24e 100644 --- a/data/profiles/root +++ b/data/profiles/root @@ -11,7 +11,6 @@ local.player.names= save.directory= save.filename.date_time_pattern=yyyyMMdd_HHmm save.filename.date_time_zone=UTC -save.filename.suffix=NEXT_PLAYER save.filename.extension=rails ### Panel Font diff --git a/rails/ui/swing/GameUIManager.java b/rails/ui/swing/GameUIManager.java index 90d81c5..452ff61 100644 --- a/rails/ui/swing/GameUIManager.java +++ b/rails/ui/swing/GameUIManager.java @@ -56,6 +56,7 @@ public class GameUIManager implements DialogOwner { protected static final String DEFAULT_SAVE_PATTERN = "yyyyMMdd_HHmm"; public static final String DEFAULT_SAVE_EXTENSION = "rails"; protected static final String NEXT_PLAYER_SUFFIX = "NEXT_PLAYER"; + protected static final String CURRENT_ROUND_SUFFIX = "CURRENT_ROUND"; protected String saveDirectory; protected String savePattern; @@ -99,6 +100,7 @@ public class GameUIManager implements DialogOwner { private SplashWindow splashWindow = null; + public GameUIManager() { } @@ -158,10 +160,16 @@ public class GameUIManager implements DialogOwner { saveDateTimeFormat.setTimeZone(TimeZone.getTimeZone(timezone)); } saveSuffixSpec = Config.get("save.filename.suffix"); - if (Util.hasValue(saveSuffixSpec) && !saveSuffixSpec.equals(NEXT_PLAYER_SUFFIX)) { - saveSuffix = saveSuffixSpec; - } else { + if (!Util.hasValue(saveSuffixSpec) || saveSuffixSpec.equals(NEXT_PLAYER_SUFFIX)) { saveSuffix = getPlayers().get(0).getName(); + } else if (saveSuffixSpec.equals(CURRENT_ROUND_SUFFIX)) { + if (currentRound != null) { + saveSuffix = currentRound.getRoundName(); + } else { + saveSuffix = ""; + } + } else { // otherwise use specified suffix + saveSuffix = saveSuffixSpec; } log.debug("Initial save suffix: "+saveSuffix); } @@ -878,6 +886,12 @@ public class GameUIManager implements DialogOwner { String currentSuffix; if (NEXT_PLAYER_SUFFIX.equals(saveSuffixSpec)) { currentSuffix = getCurrentPlayer().getName().replaceAll("[^-\\w\\.]", "_"); + } else if (CURRENT_ROUND_SUFFIX.equals(saveSuffixSpec)) { + if (currentRound != null) { + currentSuffix = currentRound.getRoundName(); + } else { + currentSuffix = ""; + } } else { currentSuffix = saveSuffix; } commit cf66fe881924aefafe4561eb733e27affa63382d Author: Stefan Frey <ste...@we...> Date: Sun Apr 1 12:52:14 2012 +0200 Transfer existing options to children after deletion of a profile diff --git a/rails/common/ConfigProfile.java b/rails/common/ConfigProfile.java index 216735c..20eee1c 100644 --- a/rails/common/ConfigProfile.java +++ b/rails/common/ConfigProfile.java @@ -351,9 +351,13 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { if (result) { // and reassign and save children - for (ConfigProfile profile:getChildren()) { - profile.setParent(parent); - profile.store(); + for (ConfigProfile child:getChildren()) { + child.setParent(parent); + // and transfer (directly stored) properties + for (Object key:properties.keySet()) { + child.setProperty((String)key, (String)properties.get(key)); + } + child.store(); } } return result; commit 7f2a92ddd288d3416dd57c9810d808d593270776 Author: Stefan Frey <ste...@we...> Date: Sun Apr 1 12:26:08 2012 +0200 Added ftf profile (currently only using autosave) diff --git a/data/profiles/LIST_OF_PROFILES b/data/profiles/LIST_OF_PROFILES index d061833..eeeda12 100644 --- a/data/profiles/LIST_OF_PROFILES +++ b/data/profiles/LIST_OF_PROFILES @@ -2,5 +2,6 @@ ### available for user selection ### with extension .predefined pbem +ftf ORDocking prettyUI diff --git a/data/profiles/ftf.predefined b/data/profiles/ftf.predefined new file mode 100644 index 0000000..377a680 --- /dev/null +++ b/data/profiles/ftf.predefined @@ -0,0 +1,3 @@ +### ftf profile +### optimized for face-to-face play +save.recovery.active=yes diff --git a/data/profiles/pbem.predefined b/data/profiles/pbem.predefined index 122c1b7..6f96b68 100644 --- a/data/profiles/pbem.predefined +++ b/data/profiles/pbem.predefined @@ -1,2 +1,3 @@ -### Default profile currently is identical to root.profile -### so no change here +### pbem profile +### optimized for pbem play +save.recovery.active=no diff --git a/data/profiles/root b/data/profiles/root index 55ae8c1..c77f040 100644 --- a/data/profiles/root +++ b/data/profiles/root @@ -13,7 +13,6 @@ save.filename.date_time_pattern=yyyyMMdd_HHmm save.filename.date_time_zone=UTC save.filename.suffix=NEXT_PLAYER save.filename.extension=rails -save.recovery.active=no ### Panel Font font.ui.scale=1 commit 123c1b62e061db62ec336e859f87d205c32d3008 Author: Stefan Frey <ste...@we...> Date: Sun Apr 1 12:23:01 2012 +0200 Bugfix for Error reported by John Galt- Mar 31 2012 fixed by Martin Brumm diff --git a/rails/game/specific/_18EU/StockRound_18EU.java b/rails/game/specific/_18EU/StockRound_18EU.java index 5387e71..c511571 100644 --- a/rails/game/specific/_18EU/StockRound_18EU.java +++ b/rails/game/specific/_18EU/StockRound_18EU.java @@ -4,6 +4,7 @@ import java.util.*; import rails.common.DisplayBuffer; import rails.common.LocalText; +import rails.common.parser.ConfigurationException; import rails.game.*; import rails.game.action.*; import rails.game.move.AddToList; @@ -393,6 +394,13 @@ public class StockRound_18EU extends StockRound { } else if (selectedHomeCity != null) { homeHex = selectedHomeCity.getHolder(); homeCityNumber = selectedHomeCity.getNumber(); + //Bugfix for Error reported by John Galt- Mar 31 2012 ; Martin Brumm + //The maphex needs to have the homes map set with the company value. + try { + homeHex.addHome(company, homeCityNumber); + } catch (ConfigurationException e) { + log.error(e.getStackTrace()); + } } company.setHomeHex(homeHex); company.setHomeCityNumber(homeCityNumber); commit 0cf54cfce27ac3860d640c36561971c6b0b919af Author: Stefan Frey <ste...@we...> Date: Fri Mar 30 19:56:22 2012 +0200 fixed autosave configuration and autosave now uses central storage diff --git a/data/Properties.xml b/data/Properties.xml index 1e5c37e..341a2fe 100644 --- a/data/Properties.xml +++ b/data/Properties.xml @@ -17,7 +17,6 @@ <Property name="save.filename.suffix" type="STRING" /> <Property name="save.filename.extension" type="STRING" /> <Property name="save.recovery.active" type="BOOLEAN" /> - <Property name="save.recovery.filepath" type="FILE" /> </Section> <Section name="Font"> <Property name="font.ui.scale" type="PERCENT" diff --git a/data/profiles/root b/data/profiles/root index 3e08d4d..55ae8c1 100644 --- a/data/profiles/root +++ b/data/profiles/root @@ -14,7 +14,6 @@ save.filename.date_time_zone=UTC save.filename.suffix=NEXT_PLAYER save.filename.extension=rails save.recovery.active=no -save.recovery.filepath=18xx_autosave.rails ### Panel Font font.ui.scale=1 diff --git a/rails/game/GameManager.java b/rails/game/GameManager.java index 15915f0..a3cbbf7 100644 --- a/rails/game/GameManager.java +++ b/rails/game/GameManager.java @@ -19,6 +19,7 @@ import rails.game.special.SpecialPropertyI; import rails.game.special.SpecialTokenLay; import rails.game.state.*; import rails.util.GameFileIO; +import rails.util.SystemOS; import rails.util.Util; /** @@ -1113,10 +1114,13 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { protected void recoverySave() { if (Config.get("save.recovery.active", "yes").equalsIgnoreCase("no")) return; - String filePath = Config.get("save.recovery.filepath", "18xx_autosave.rails"); + // TODO: Fix those static strings defined here + File directory = SystemOS.get().getConfigurationFolder(GameFileIO.autosaveFolder, true); + String fileName = GameFileIO.autosaveFile; + // create temporary new save file File tempFile = null; - tempFile = new File(filePath + ".tmp"); + tempFile = new File(directory, fileName + ".tmp"); if (!save(tempFile, recoverySaveWarning, "RecoverySaveFailed")) { recoverySaveWarning = false; return; @@ -1128,11 +1132,11 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { try { log.debug("Created temporary recovery file, path = " + tempFile.getPath()); // check if previous save file exists - recoveryFile = new File(filePath); + recoveryFile = new File(directory, fileName); log.debug("Potential recovery filePath = " + recoveryFile.getPath()); if (recoveryFile.exists()) { log.debug("Potential recovery filePath = " + recoveryFile.getPath()); - File backupFile = new File(filePath + ".bak"); + File backupFile = new File(directory, fileName + ".bak"); //delete backup file if existing if (backupFile.exists()) backupFile.delete(); //old recovery file becomes new backup file diff --git a/rails/ui/swing/ConfigWindow.java b/rails/ui/swing/ConfigWindow.java index 180d8ef..d312d2b 100644 --- a/rails/ui/swing/ConfigWindow.java +++ b/rails/ui/swing/ConfigWindow.java @@ -441,7 +441,13 @@ class ConfigWindow extends JFrame { deleteButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent arg0) { + // store active Profile for deletion (see below) + String activeProfile = cm.getActiveProfile(); if (cm.deleteActiveProfile()) { + // delete item from selection in GameSetupWindow + if (parent instanceof GameSetupWindow) { + ((GameSetupWindow) parent).configureBox.removeItem(activeProfile); + } changeProfile(cm.getActiveProfile()); } } @@ -520,6 +526,10 @@ class ConfigWindow extends JFrame { result = saveProfile(newProfile); // only change if save was possible if (result) { + // add new item to selection in GameSetupWindow + if (parent instanceof GameSetupWindow) { + ((GameSetupWindow) parent).configureBox.addItem(newProfile); + } changeProfile(newProfile); } } diff --git a/rails/ui/swing/GameSetupWindow.java b/rails/ui/swing/GameSetupWindow.java index efbefa0..b5ac85a 100644 --- a/rails/ui/swing/GameSetupWindow.java +++ b/rails/ui/swing/GameSetupWindow.java @@ -14,6 +14,8 @@ import rails.common.*; import rails.common.parser.*; import rails.game.*; import rails.sound.SoundManager; +import rails.util.GameFileIO; +import rails.util.SystemOS; import rails.util.Util; /** @@ -333,8 +335,14 @@ public class GameSetupWindow extends JDialog implements ActionListener { return; } } else if (arg0.getSource().equals(recoveryButton)) { - String filePath = Config.get("save.recovery.filepath", "18xx_autosave.rails"); - loadAndStartGame(filePath, null); + new Thread() { + @Override + public void run() { + String filePath = SystemOS.get().getConfigurationFolder(GameFileIO.autosaveFolder, true).getAbsolutePath() + + File.separator + GameFileIO.autosaveFile; + loadAndStartGame(filePath, null); + } + }.start(); } else if (arg0.getSource().equals(infoButton)) { GameInfo gameInfo = this.getSelectedGameInfo(); JOptionPane.showMessageDialog(this, diff --git a/rails/util/GameFileIO.java b/rails/util/GameFileIO.java index ec682df..16f1991 100644 --- a/rails/util/GameFileIO.java +++ b/rails/util/GameFileIO.java @@ -33,6 +33,11 @@ public class GameFileIO { // fields for data save private boolean initSave = false; + + // static data for autosave + public static final String autosaveFolder = "autosave"; + public static final String autosaveFile = "18xx_autosave.rails"; + public String getGameDataAsText() { return gameData.metaDataAsText() + gameData.gameOptionsAsText() + gameData.playerNamesAsText(); commit 052dd8bfce727baaa1116d7f5efb16ef39a871e1 Author: Stefan Frey <ste...@we...> Date: Fri Mar 30 19:20:20 2012 +0200 fixed issues with the configuration system diff --git a/LocalisedText.properties b/LocalisedText.properties index 059e471..1a5e29d 100644 --- a/LocalisedText.properties +++ b/LocalisedText.properties @@ -78,7 +78,9 @@ COMPANY_DETAILS=Company details CONFIG=Configuration CONFIG_APPLY_MESSAGE=<html>Current changes (will be) applied.<br>Be aware that some changes to be active require <br> UI redraws or a restart of Rails.</html> CONFIG_APPLY_TITLE=Apply confirmation -CONFIG_USER_PROFILE=Active user profile = {0} +CONFIG_CLOSE_MESSAGE=<html> Closing the configuration window does not save nor applies the changed settings. <br> Use buttons 'Save' or 'SaveAs' instead.</html> +CONFIG_CLOSE_TITLE=Close Configuration +CONFIG_USER_PROFILE=Active user profile = {0}, based on = {1} CONFIG_PREDEFINED_PROFILE=Active predefined profile = {0} CONFIG_INFO_TITLE=Info text for {0} CONFIF_LOAD_ERROR_MESSAGE=An error occurred during load of the file {0}.\nProfile was not loaded. @@ -285,6 +287,7 @@ CorrectionModeActivate={1} activated by {0} CorrectionModeDeactivate={1} deactivated by {0} CREDITS=Credits DeclineToBid=Decline to Bid +DELETE=Delete DestinationReachedByToken={0} gains {1} by laying a token on its destination {2} DestinationReached={0} has reached its destination hex {1} DestinationsReached=Destinations reached @@ -595,6 +598,7 @@ REPORT_MOVE_FORWARD=> REPORT_PLAY_FROM_HERE=Play from here REPORT_LEAVE_TIMEWARP=Leave history REPORT_TIMEWARP_ACTIVE=<html><center><font color="red"> Game history active <br> (Other windows disabled) </font></center></html> +RESET=Reset REVENUE=Revenue RevenueBonus=Bonus(es) = {0} RevenueCalculation=support for revenue calculation diff --git a/rails/common/ConfigManager.java b/rails/common/ConfigManager.java index e328aad..61a3644 100644 --- a/rails/common/ConfigManager.java +++ b/rails/common/ConfigManager.java @@ -205,6 +205,10 @@ public class ConfigManager implements ConfigurableComponentI { return activeProfile.getName(); } + public String getActiveParent() { + return activeProfile.getParent().getName(); + } + public boolean IsActiveUserProfile() { return activeProfile.getType() == ConfigProfile.Type.USER; } @@ -272,6 +276,15 @@ public class ConfigManager implements ConfigurableComponentI { return saveProfile(applyInitMethods); } + public boolean deleteActiveProfile() { + if (activeProfile.delete()) { + activeProfile = activeProfile.getParent(); + return true; + } else { + return false; + } + } + String getRecent(String key) { // get value from active profile (this escalates) String value = recentData.getProperty(key); diff --git a/rails/common/ConfigProfile.java b/rails/common/ConfigProfile.java index c6bcb7d..216735c 100644 --- a/rails/common/ConfigProfile.java +++ b/rails/common/ConfigProfile.java @@ -2,8 +2,10 @@ package rails.common; import java.io.File; import java.io.FilenameFilter; +import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Properties; @@ -151,7 +153,7 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { } boolean isFinal() { - if (!loaded && type == Type.USER) return true; + ensureLoad(); if (Util.hasValue(properties.getProperty(FINAL_KEY))) { return Util.parseBoolean(properties.getProperty(FINAL_KEY)); @@ -160,6 +162,7 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { } ConfigProfile setParent(ConfigProfile parent) { + ensureLoad(); this.parent = parent; properties.setProperty(PARENT_KEY, parent.getName()); return this; @@ -170,10 +173,12 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { } ConfigProfile getParent() { + ensureLoad(); return parent; } String getProperty(String key) { + ensureLoad(); if (this == root || properties.containsKey(key)) { return properties.getProperty(key); } else { @@ -182,6 +187,7 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { } void setProperty(String key, String value) { + ensureLoad(); if (!parent.getProperty(key).equals(value)) { properties.setProperty(key, value); } else { @@ -191,15 +197,14 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { void makeActive(){ - // check if is already loaded - if (!isLoaded()) { - load(); - } + ensureLoad(); // and store it to recent Config.storeRecent(CLI_AND_RECENT_OPTION, getName()); } ConfigProfile deriveUserProfile(String name) { + ensureLoad(); + ConfigProfile newProfile = new ConfigProfile(Type.USER, name); ConfigProfile reference; @@ -221,6 +226,12 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { return newProfile; } + + private void ensureLoad() { + if (loaded == false) { + load(); + } + } boolean load() { // loaded is set independent of success @@ -282,16 +293,71 @@ public final class ConfigProfile implements Comparable<ConfigProfile> { return Util.loadPropertiesFromResource(properties, filePath); } - boolean store() { - if (type != Type.USER) return false; - loaded = true; + private File getFile() { File folder = SystemOS.get().getConfigurationFolder(PROFILE_FOLDER, true); if (folder == null) { - return false; + return null; } else { - File profile = new File(folder, name + PROFILE_EXTENSION); - return Util.storeProperties(properties, profile); + return new File(folder, name + PROFILE_EXTENSION); + } + } + + /** + * stores profile + * @return true if save was successful + */ + boolean store() { + if (type != Type.USER) return false; + + File file = getFile(); + if (file != null) { + return Util.storeProperties(properties, file); + } else { + return false; + } + } + + private List<ConfigProfile> getChildren() { + List<ConfigProfile> children = new ArrayList<ConfigProfile>(); + for (ConfigProfile profile:profiles.values()) { + if (profile.getParent() == this) { + children.add(profile); + } + } + return children; + } + + /** + * delete profile (including deleting the saved file and removing from the map of profiles) + * @return true if deletion was successful + */ + boolean delete() { + // cannot delete parents + if (type != Type.USER) return false; + + // delete profile file + boolean result; + File file = getFile(); + if (file != null) { + if (file.delete()) { + profiles.remove(this.name); + result = true; + } else { + result = false; + } + } else { + result = false; } + + if (result) { + // and reassign and save children + for (ConfigProfile profile:getChildren()) { + profile.setParent(parent); + profile.store(); + } + } + return result; + } private int compare(ConfigProfile a, ConfigProfile b) { diff --git a/rails/ui/swing/ConfigWindow.java b/rails/ui/swing/ConfigWindow.java index 7d0d061..180d8ef 100644 --- a/rails/ui/swing/ConfigWindow.java +++ b/rails/ui/swing/ConfigWindow.java @@ -25,19 +25,19 @@ class ConfigWindow extends JFrame { //(e.g. specifying file names >2000px) private static final int MAX_FIELD_WIDTH = 200; + private Window parent; + private JPanel profilePanel; private JTabbedPane configPane; private JPanel buttonPanel; - private boolean fromStatusWindow; - private ConfigManager cm; - ConfigWindow(boolean fromStatusWindow) { + ConfigWindow(Window parent) { cm = ConfigManager.getInstance(); - // store for handling of close - this.fromStatusWindow = fromStatusWindow; + // store for various handling issues + this.parent = parent; // JFrame properties setTitle(LocalText.getText("CONFIG_WINDOW_TITLE")); @@ -60,6 +60,8 @@ class ConfigWindow extends JFrame { addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { + JOptionPane.showMessageDialog(ConfigWindow.this, LocalText.getText("CONFIG_CLOSE_MESSAGE"), LocalText.getText("CONFIG_CLOSE_TITLE") + , JOptionPane.INFORMATION_MESSAGE); closeConfig(false); } }); @@ -86,7 +88,7 @@ class ConfigWindow extends JFrame { String activeProfile = cm.getActiveProfile(); String profileText; if (cm.IsActiveUserProfile()) { - profileText = LocalText.getText("CONFIG_USER_PROFILE", activeProfile); + profileText = LocalText.getText("CONFIG_USER_PROFILE", activeProfile, cm.getActiveParent()); } else { profileText = LocalText.getText("CONFIG_PREDEFINED_PROFILE", activeProfile); } @@ -399,44 +401,62 @@ class ConfigWindow extends JFrame { private void setupButtonPanel() { buttonPanel.removeAll(); - // apply button + // save button for user profiles if (cm.IsActiveUserProfile()) { - JButton applyButton = new JButton(LocalText.getText("APPLY")); - applyButton.addActionListener( + JButton saveButton = new JButton(LocalText.getText("SAVE")); + saveButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent arg0) { ConfigWindow.this.saveConfig(); } } ); - buttonPanel.add(applyButton); + buttonPanel.add(saveButton); } // save (as) button - JButton saveButton = new JButton(LocalText.getText("SAVE_AND_APPLY")); - saveButton.addActionListener( + JButton saveAsButton = new JButton(LocalText.getText("SAVEAS")); + saveAsButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent arg0) { ConfigWindow.this.saveAsConfig(); } } ); - buttonPanel.add(saveButton); + buttonPanel.add(saveAsButton); - JButton cancelButton = new JButton(LocalText.getText("CANCEL")); - cancelButton.addActionListener( + JButton resetButton = new JButton(LocalText.getText("RESET")); + resetButton.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent arg0) { - ConfigWindow.this.closeConfig(true); + // reset button: revert to activeProfile + changeProfile(cm.getActiveProfile()); } } ); - buttonPanel.add(cancelButton); + buttonPanel.add(resetButton); + + if (cm.IsActiveUserProfile()) { + JButton deleteButton = new JButton(LocalText.getText("DELETE")); + deleteButton.addActionListener( + new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + if (cm.deleteActiveProfile()) { + changeProfile(cm.getActiveProfile()); + } + } + } + ); + buttonPanel.add(deleteButton); + } } private void changeProfile(String profileName) { cm.changeProfile(profileName); + if (parent instanceof GameSetupWindow) { + ((GameSetupWindow) parent).configureBox.setSelectedItem(profileName); + } repaintLater(); } @@ -449,48 +469,73 @@ class ConfigWindow extends JFrame { }); } - private boolean saveConfig() { - if (cm.saveProfile(fromStatusWindow)) { + private boolean saveProfile(String newProfile) { + + // check for parent if initMethods have to be called + boolean initMethods; + if (parent instanceof StatusWindow) { + initMethods = true; + } else { + initMethods = false; + } + + // save depending (either as newProfile or as existing) + boolean result; + if (newProfile == null) { + result = cm.saveProfile(initMethods); + } else { + result = cm.saveNewProfile(newProfile, initMethods); + } + + if (result) { JOptionPane.showMessageDialog(ConfigWindow.this, LocalText.getText("CONFIG_SAVE_CONFIRM_MESSAGE", cm.getActiveProfile()), - LocalText.getText("CONFIG_SAVE_TITLE"), JOptionPane.INFORMATION_MESSAGE); - return true; + LocalText.getText("CONFIG_SAVE_TITLE"), JOptionPane.INFORMATION_MESSAGE); } else { JOptionPane.showMessageDialog(ConfigWindow.this, LocalText.getText("CONFIG_SAVE_ERROR_MESSAGE", cm.getActiveProfile()), LocalText.getText("CONFIG_SAVE_TITLE"), JOptionPane.ERROR_MESSAGE); - return false; } + + return result; + } + + private boolean saveConfig() { + return saveProfile(null); } private boolean saveAsConfig() { - // get Names + // get all profile Names List<String> allProfileNames = cm.getProfiles(); + + // select profile name String newProfile = null; do { newProfile = JOptionPane.showInputDialog(ConfigWindow.this, LocalText.getText("CONFIG_NEW_MESSAGE"), LocalText.getText("CONFIG_NEW_TITLE"), JOptionPane.QUESTION_MESSAGE); - } while (allProfileNames.contains(newProfile)); + } while (newProfile != null && allProfileNames.contains(newProfile)); - boolean result = false; - if (newProfile != null) { - if (cm.saveNewProfile(newProfile, fromStatusWindow)) { - JOptionPane.showMessageDialog(ConfigWindow.this, LocalText.getText("CONFIG_SAVE_CONFIRM_MESSAGE", cm.getActiveProfile()), - LocalText.getText("CONFIG_SAVE_TITLE"), JOptionPane.INFORMATION_MESSAGE); - } else { - JOptionPane.showMessageDialog(ConfigWindow.this, LocalText.getText("CONFIG_SAVE_ERROR_MESSAGE", cm.getActiveProfile()), - LocalText.getText("CONFIG_SAVE_TITLE"), JOptionPane.ERROR_MESSAGE); - result = false; + boolean result; + if (newProfile == null || newProfile.equals("")) { + result = false; + } else { + result = saveProfile(newProfile); + // only change if save was possible + if (result) { + changeProfile(newProfile); } - changeProfile(newProfile); - } + } return result; } private void closeConfig(boolean cancel) { - if (cancel) cm.changeProfile(cm.getActiveProfile()); + if (cancel) { + cm.changeProfile(cm.getActiveProfile()); + init(false); + } this.setVisible(false); - if (fromStatusWindow) { + + if (parent instanceof StatusWindow) { StatusWindow.uncheckMenuItemBox(StatusWindow.CONFIG_CMD); - } + } } } diff --git a/rails/ui/swing/GameSetupWindow.java b/rails/ui/swing/GameSetupWindow.java index d948ff4..efbefa0 100644 --- a/rails/ui/swing/GameSetupWindow.java +++ b/rails/ui/swing/GameSetupWindow.java @@ -112,6 +112,9 @@ public class GameSetupWindow extends JDialog implements ActionListener { configureBox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent arg0) { cm.changeProfile((String)configureBox.getSelectedItem()); + if (configWindow != null) { + configWindow.init(false); + } } } ); @@ -266,7 +269,7 @@ public class GameSetupWindow extends JDialog implements ActionListener { } else if (arg0.getSource().equals(configureButton)) { // start configureWindow if (configWindow == null) { - configWindow = new ConfigWindow(false); + configWindow = new ConfigWindow(this); configWindow.init(true); configWindow.setVisible(true); } else { diff --git a/rails/ui/swing/GameUIManager.java b/rails/ui/swing/GameUIManager.java index a43f683..90d81c5 100644 --- a/rails/ui/swing/GameUIManager.java +++ b/rails/ui/swing/GameUIManager.java @@ -238,7 +238,7 @@ public class GameUIManager implements DialogOwner { // define configWindow splashWindow.notifyOfStep(SplashWindow.STEP_CONFIG_WINDOW); - configWindow = new ConfigWindow(true); + configWindow = new ConfigWindow(statusWindow); configWindow.init(true); // notify sound manager of game initialization commit 46e605bfbb7560be0184b66ddf68a83b3463e13c Author: Stefan Frey <ste...@we...> Date: Fri Mar 30 14:42:07 2012 +0200 uses system configuration folders for windowSettings and DockingLayout diff --git a/rails/ui/swing/WindowSettings.java b/rails/ui/swing/WindowSettings.java index d6ed816..03d0409 100644 --- a/rails/ui/swing/WindowSettings.java +++ b/rails/ui/swing/WindowSettings.java @@ -9,6 +9,7 @@ import javax.swing.JFrame; import org.apache.log4j.Logger; import rails.common.Config; +import rails.util.SystemOS; public class WindowSettings { @@ -18,13 +19,13 @@ public class WindowSettings { private boolean defaultUsed = false; private static final String settingsfilename = "settings_xxxx.rails_ini"; + private static final String settingsFolder = "windowSettings"; protected static Logger log = Logger.getLogger(WindowSettings.class.getPackage().getName()); public WindowSettings (String gameName) { - String directory = System.getProperty("settings.directory"); - if (directory == null) directory = Config.get("save.directory"); + File directory = SystemOS.get().getConfigurationFolder(settingsFolder, true); defaultpath = directory + File.separator + settingsfilename; filepath = defaultpath.replace("xxxx", gameName); } diff --git a/rails/ui/swing/elements/DockingFrame.java b/rails/ui/swing/elements/DockingFrame.java index 7ec0f2b..59d7858 100644 --- a/rails/ui/swing/elements/DockingFrame.java +++ b/rails/ui/swing/elements/DockingFrame.java @@ -19,6 +19,7 @@ import javax.swing.SwingUtilities; import rails.common.Config; import rails.common.LocalText; import rails.ui.swing.SplashWindow; +import rails.util.SystemOS; import bibliothek.gui.DockController; import bibliothek.gui.DockStation; @@ -217,17 +218,7 @@ public abstract class DockingFrame extends JFrame { * get layout directory (and ensure that it is available) */ private File getLayoutDirectory() { - try { - File layoutDirectory = new File(Config.get("save.directory"),layoutDirectoryName); - if (!layoutDirectory.isDirectory()) { - layoutDirectory.mkdirs(); - } - return layoutDirectory; - } - catch (Exception e) { - //return no valid file if anything goes wrong - return null; - } + return SystemOS.get().getConfigurationFolder(layoutDirectoryName, true); } private File getLayoutFile() { commit 5a2c5196bd5c6f65aeb48baac96569a3c45190ec Author: Stefan Frey <ste...@we...> Date: Fri Mar 30 14:18:13 2012 +0200 fixed typo in manifest definition diff --git a/buildRails.xml b/buildRails.xml index a2decc3..158fc15 100644 --- a/buildRails.xml +++ b/buildRails.xml @@ -137,7 +137,7 @@ ./lib/batik-1.7/lib/batik-anim.jar ./lib/df_1.1.0/dockingFramesCommon.jar ./lib/df_1.1.0/dockingFramesCore.jar - -/lib/commons-io-2.1/commons-io-2.1.jar"/> + ./lib/commons-io-2.1/commons-io-2.1.jar"/> </manifest> </jar> <delete dir="jar"/> |
From: Erik V. <ev...@us...> - 2012-03-29 21:03:10
|
data/18Kaas/Game.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit e199cdcfdd38b401165002e959fd69be07812df1 Author: Erik Vos <eri...@xs...> Date: Thu Mar 29 23:02:29 2012 +0200 18Kaas: completed configuration of unlimited D-trains. Was only included in GamesList.xml, not in 18Kaas/Game.xml. diff --git a/data/18Kaas/Game.xml b/data/18Kaas/Game.xml index 75a7542..a5b8b68 100644 --- a/data/18Kaas/Game.xml +++ b/data/18Kaas/Game.xml @@ -11,6 +11,7 @@ <GameOption name="WithOptional6Train" type="toggle" default="no"/> <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> <GameOption name="SeparateSalesAtSamePrice" type="toggle" default="yes"/> + <GameOption name="UnlimitedTopTrains" parm="D" type="toggle" default="no"/> <GameParameters> <PlayerShareLimit percentage="60"/> <BankPoolLimit percentage="50"/> @@ -66,8 +67,11 @@ </IfOption> </TrainType> <TrainType name="D" majorStops="99" cost="1100" quantity="6"> - <NewPhase phaseName="D"/> + <NewPhase phaseName="D"/> <Exchange cost="800"/> + <IfOption name="UnlimitedTopTrains" value="yes"> + <Attributes quantity="-1"/> + </IfOption> </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> |
From: Dr. M. B. <neu...@us...> - 2012-03-29 10:07:12
|
rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) New commits: commit aba6478ef2f1b05bc6d2751130fbfd84ca285383 Author: Martin <dr....@t-...> Date: Thu Mar 29 12:06:45 2012 +0200 Changed possible BuildingRights to A+B+C and B+C+d for BCR diff --git a/rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java b/rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java index 7683295..ef523bc 100644 --- a/rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java +++ b/rails/ui/swing/gamespecific/_1880/StartRoundWindow_1880.java @@ -3,15 +3,10 @@ */ package rails.ui.swing.gamespecific._1880; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; + import javax.swing.JDialog; -import rails.game.Bank; import rails.game.StockMarketI; -import rails.game.StockSpaceI; import rails.ui.swing.StartRoundWindow; import rails.common.LocalText; import rails.game.action.PossibleAction; @@ -36,7 +31,7 @@ public class StartRoundWindow_1880 extends StartRoundWindow { protected JDialog currentDialog = null; protected PossibleAction currentDialogAction = null; protected int[] startPrices = null; - String[] bRights = {"A","B","C","D","A+B","A+B+C","B+C","B+C+D","C+D"}; + String[] bRights = {"A+B+C", "B+C+D"}; private static final long serialVersionUID = 1L; /** @@ -73,7 +68,6 @@ public class StartRoundWindow_1880 extends StartRoundWindow { if (activeItem.hasSharePriceToSet()) { String compName = activeItem.getCompanyToSetPriceFor(); - StockMarketI stockMarket = getGameUIManager().getGameManager().getStockMarket(); // Get a sorted prices List // TODO: should be included in BuyStartItem |