You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(46) |
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(51) |
Feb
(10) |
Mar
|
Apr
|
May
(14) |
Jun
|
Jul
(13) |
Aug
(30) |
Sep
(83) |
Oct
(56) |
Nov
(148) |
Dec
(107) |
2010 |
Jan
(260) |
Feb
(164) |
Mar
(183) |
Apr
(99) |
May
(160) |
Jun
(40) |
Jul
(33) |
Aug
(48) |
Sep
(22) |
Oct
(24) |
Nov
(1) |
Dec
(12) |
2011 |
Jan
(6) |
Feb
(15) |
Mar
(13) |
Apr
(37) |
May
(27) |
Jun
(29) |
Jul
(33) |
Aug
(20) |
Sep
(17) |
Oct
(20) |
Nov
(33) |
Dec
(17) |
2012 |
Jan
(39) |
Feb
(38) |
Mar
(20) |
Apr
(21) |
May
(17) |
Jun
(22) |
Jul
(16) |
Aug
(3) |
Sep
(9) |
Oct
(10) |
Nov
|
Dec
|
From: Erik V. <ev...@us...> - 2011-08-01 15:43:01
|
data/1830/Game.xml | 10 ++-------- data/1851/Game.xml | 7 ++----- data/1889/Game.xml | 10 ++-------- data/18AL/Game.xml | 5 +---- data/18GA/Game.xml | 5 +---- data/18Kaas/Game.xml | 5 +---- data/18VA/Game.xml | 2 +- 7 files changed, 10 insertions(+), 34 deletions(-) New commits: commit f34e7b0a07e66e1c6c3d5e9e2eb113b97d4ed835 Merge: 1048c31 0f7b51b Author: Erik Vos <eri...@xs...> Date: Mon Aug 1 17:42:32 2011 +0200 Merge branch 'master' of ssh://evos:lsv...@ra.../gitroot/rails/rails commit 1048c314a9c30def5245767f473f2826bea153f5 Author: Erik Vos <eri...@xs...> Date: Mon Aug 1 17:39:59 2011 +0200 All train types now have a default 'quantity' diff --git a/data/1830/Game.xml b/data/1830/Game.xml index 6ef5513..f885604 100644 --- a/data/1830/Game.xml +++ b/data/1830/Game.xml @@ -171,14 +171,11 @@ <Attributes quantity="4"/> </IfOption> </TrainType> - <TrainType name="6" majorStops="6" cost="630"> + <TrainType name="6" majorStops="6" cost="630" quantity="2"> <NewPhase phaseName="6"/> <IfOption name="WithOptional6Train" value="yes"> <Attributes quantity="3"/> </IfOption> - <IfOption name="WithOptional6Train" value="no"> - <Attributes quantity="2"/> - </IfOption> <IfOption name="Variant" value="Coalfields,Reading"> <Attributes quantity="3" releasedTrain="7,D"/> </IfOption> @@ -196,7 +193,7 @@ <TrainType name="7" majorStops="7" cost="830" quantity="-1"/> </IfOption> <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading,Simple"> - <TrainType name="D" majorStops="99"> + <TrainType name="D" majorStops="99" quantity="6"> <NewPhase phaseName="D"/> <IfOption name="Variant" value="Basegame,Pere Marquette,Simple"> <Attributes cost="1100"/> @@ -209,9 +206,6 @@ <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> </IfOption> - <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes quantity="6"/> - </IfOption> <Exchange cost="800"/> </TrainType> </IfOption> diff --git a/data/1851/Game.xml b/data/1851/Game.xml index 574f68f..bba23f2 100644 --- a/data/1851/Game.xml +++ b/data/1851/Game.xml @@ -70,14 +70,11 @@ <TrainType name="6" majorStops="6" cost="600" quantity="2"> <NewPhase phaseName="6"/> </TrainType> - <TrainType name="8" majorStops="8" cost="800"> + <TrainType name="8" majorStops="8" cost="800" quantity="4"> <NewPhase phaseName="8"/> - <IfOption name="UnlimitedTopTrains" value="yes"> + <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> </IfOption> - <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes quantity="4"/> - </IfOption> </TrainType> <TrainBuyingRules> <FaceValueIfDifferentPresidents/> diff --git a/data/1889/Game.xml b/data/1889/Game.xml index 5fddf24..19a5014 100644 --- a/data/1889/Game.xml +++ b/data/1889/Game.xml @@ -92,23 +92,17 @@ <TrainType name="5" majorStops="5" cost="450" quantity="3"> <NewPhase phaseName="5"/> </TrainType> - <TrainType name="6" majorStops="6" cost="630"> + <TrainType name="6" majorStops="6" cost="630" quantity="2"> <NewPhase phaseName="6"/> <IfOption name="WithOptional6Train" value="yes"> <Attributes quantity="3"/> </IfOption> - <IfOption name="WithOptional6Train" value="no"> - <Attributes quantity="2"/> - </IfOption> </TrainType> - <TrainType name="D" majorStops="99" cost="1100"> + <TrainType name="D" majorStops="99" cost="1100" quantity="6"> <NewPhase phaseName="D"/> <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> </IfOption> - <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes quantity="6"/> - </IfOption> <Exchange cost="800"/> </TrainType> </Component> diff --git a/data/18AL/Game.xml b/data/18AL/Game.xml index 9c59f20..ecef46d 100644 --- a/data/18AL/Game.xml +++ b/data/18AL/Game.xml @@ -74,14 +74,11 @@ <TrainType name="7" majorStops="7" cost="700" quantity="1"> <NewPhase phaseName="7"/> </TrainType> - <TrainType name="4D" majorStops="4" cost="800"> + <TrainType name="4D" majorStops="4" cost="800" quantity="5"> <NewPhase phaseName="4D"/> <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> </IfOption> - <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes quantity="5"/> - </IfOption> <Reach countTowns="no"/> <Score scoreCities="double"/> <Exchange cost="800"/> diff --git a/data/18GA/Game.xml b/data/18GA/Game.xml index 926f5f1..e1c5c9b 100644 --- a/data/18GA/Game.xml +++ b/data/18GA/Game.xml @@ -77,14 +77,11 @@ <TrainType name="6" majorStops="6" cost="630" quantity="2"> <NewPhase phaseName="6"/> </TrainType> - <TrainType name="8" majorStops="8" cost="800"> + <TrainType name="8" majorStops="8" cost="800" quantity="5"> <NewPhase phaseName="8"/> <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> </IfOption> - <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes quantity="5"/> - </IfOption> </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> diff --git a/data/18Kaas/Game.xml b/data/18Kaas/Game.xml index ecd583f..0aa433f 100644 --- a/data/18Kaas/Game.xml +++ b/data/18Kaas/Game.xml @@ -59,14 +59,11 @@ <TrainType name="5" majorStops="5" cost="450" quantity="3"> <NewPhase phaseName="5"/> </TrainType> - <TrainType name="6" majorStops="6" cost="630"> + <TrainType name="6" majorStops="6" cost="630" quantity="2"> <NewPhase phaseName="6"/> <IfOption name="WithOptional6Train" value="yes"> <Attributes quantity="3"/> </IfOption> - <IfOption name="WithOptional6Train" value="no"> - <Attributes quantity="2"/> - </IfOption> </TrainType> <TrainType name="D" majorStops="99" cost="1100" quantity="6"> <NewPhase phaseName="D"/> diff --git a/data/18VA/Game.xml b/data/18VA/Game.xml index 1b0c89f..0d66c61 100644 --- a/data/18VA/Game.xml +++ b/data/18VA/Game.xml @@ -74,7 +74,7 @@ <TrainType name="5" majorStops="5" cost="500" quantity="3"> <NewPhase phaseName="5"/> </TrainType> - <TrainType name="6" majorStops="6" cost="600"> + <TrainType name="6" majorStops="6" cost="600" quantity="2"> <NewPhase phaseName="6"/> </TrainType> <TrainType name="4D" majorStops="99" cost="800" quantity="10"> |
From: Stefan F. <ste...@us...> - 2011-08-01 05:24:35
|
dev/null |binary rails/util/ListAndFixSavedFiles.java | 3 test/data/1851/pbem/1851_A_SR6.report | 625 --------------- test/data/1851/pbem/1851_A_SR6.txt | 5 test/data/1856/finished/1856_A_OR5_b.report | 812 ------------------- test/data/1856/finished/1856_A_OR5_b.txt | 6 test/data/1856/pbem/1856_A_SR4.report | 429 ---------- test/data/1856/pbem/1856_A_SR4.txt | 4 test/data/1889/pbem/1889_A_OR6.report | 625 --------------- test/data/1889/pbem/1889_A_OR6.txt | 5 test/data/1889/test/1889_A_OR6.report | 431 ---------- test/data/1889/test/1889_A_OR6.txt | 3 test/data/1889/test/1889_B_OR4_b.report | 693 ---------------- test/data/1889/test/1889_B_OR4_b.txt | 2 test/data/18AL/bug/18AL_20100303_2323Brian.report | 651 --------------- test/data/18AL/finished/18AL_A_OR6_e..txt | 5 test/data/18AL/finished/18AL_A_OR6_e.report | 909 ---------------------- test/data/real/1830_A.rails |binary test/data/real/1856_A.rails |binary test/data/real/1889_A.rails |binary test/data/real/1889_B.rails.corrupt |binary test/data/real/1889_C.rails |binary test/data/real/18AL_A.rails |binary test/data/real/18EU_A.rails |binary test/data/template.txt | 4 25 files changed, 3 insertions(+), 5209 deletions(-) New commits: commit 0f7b51b21d0354c33fec5fc3492a247841d57c97 Merge: 2551fe0 db9eb87 Author: Stefan Frey <ste...@we...> Date: Mon Aug 1 07:13:24 2011 +0200 Merge branch 'master' of git://rails.git.sourceforge.net/gitroot/rails/rails commit 2551fe03ec3d2f8002007a81f17c8ab92f09f0de Author: Stefan Frey <ste...@we...> Date: Mon Aug 1 07:13:00 2011 +0200 Added game reports Signal 1889_B as corrupt diff --git a/test/data/real/1889_B.rails b/test/data/real/1889_B.rails deleted file mode 100644 index c118a18..0000000 Binary files a/test/data/real/1889_B.rails and /dev/null differ diff --git a/test/data/real/1889_B.rails.corrupt b/test/data/real/1889_B.rails.corrupt new file mode 100644 index 0000000..c118a18 Binary files /dev/null and b/test/data/real/1889_B.rails.corrupt differ commit 06e945ffcb464f98b57f40464d137720158e7482 Author: Stefan Frey <ste...@we...> Date: Mon Aug 1 06:54:48 2011 +0200 Added further test games diff --git a/test/data/real/1830_A.rails b/test/data/real/1830_A.rails new file mode 100644 index 0000000..af64f9c Binary files /dev/null and b/test/data/real/1830_A.rails differ diff --git a/test/data/real/1856_A.rails b/test/data/real/1856_A.rails new file mode 100644 index 0000000..e07337d Binary files /dev/null and b/test/data/real/1856_A.rails differ diff --git a/test/data/real/1889_B.rails b/test/data/real/1889_B.rails new file mode 100644 index 0000000..c118a18 Binary files /dev/null and b/test/data/real/1889_B.rails differ diff --git a/test/data/real/1889_C.rails b/test/data/real/1889_C.rails new file mode 100644 index 0000000..0ca98e6 Binary files /dev/null and b/test/data/real/1889_C.rails differ commit a103f32f0a171669719bc79c035ff39b4abaee44 Author: Stefan Frey <ste...@we...> Date: Fri Jul 29 14:32:54 2011 +0200 Added further test games diff --git a/test/data/real/1889_A.rails b/test/data/real/1889_A.rails new file mode 100644 index 0000000..24cabfd Binary files /dev/null and b/test/data/real/1889_A.rails differ diff --git a/test/data/real/1889_A_OR6.rails b/test/data/real/1889_A_OR6.rails deleted file mode 100644 index 24cabfd..0000000 Binary files a/test/data/real/1889_A_OR6.rails and /dev/null differ diff --git a/test/data/real/18AL_A.rails b/test/data/real/18AL_A.rails new file mode 100644 index 0000000..3b8b414 Binary files /dev/null and b/test/data/real/18AL_A.rails differ diff --git a/test/data/real/18AL_A_OR6_e.rails b/test/data/real/18AL_A_OR6_e.rails deleted file mode 100644 index 3b8b414..0000000 Binary files a/test/data/real/18AL_A_OR6_e.rails and /dev/null differ diff --git a/test/data/real/18EU_A.rails b/test/data/real/18EU_A.rails new file mode 100644 index 0000000..74bd1d4 Binary files /dev/null and b/test/data/real/18EU_A.rails differ commit 8f3065774b2cce4df3227d85390c934fd138e504 Author: Stefan Frey <ste...@we...> Date: Thu Jul 28 16:29:25 2011 +0200 Fixed non-clearing report header diff --git a/rails/util/ListAndFixSavedFiles.java b/rails/util/ListAndFixSavedFiles.java index ad2c73b..11a6938 100644 --- a/rails/util/ListAndFixSavedFiles.java +++ b/rails/util/ListAndFixSavedFiles.java @@ -161,6 +161,9 @@ implements ActionListener, KeyListener { filepath = selectedFile.getPath(); saveDirectory = selectedFile.getParent(); + // clear header text + headerText = new StringBuffer(); + // use GameLoader object to load game fileIO = new GameFileIO(); commit c14b9dcd8176d3a682935bc10d24eaaa78d45108 Author: Stefan Frey <ste...@we...> Date: Thu Jul 28 16:24:27 2011 +0200 Changed and updated test games diff --git a/test/data/1851/pbem/1851_A_SR6.rails b/test/data/1851/pbem/1851_A_SR6.rails deleted file mode 100644 index 14b864b..0000000 Binary files a/test/data/1851/pbem/1851_A_SR6.rails and /dev/null differ diff --git a/test/data/1851/pbem/1851_A_SR6.report b/test/data/1851/pbem/1851_A_SR6.report deleted file mode 100644 index 6815ffb..0000000 --- a/test/data/1851/pbem/1851_A_SR6.report +++ /dev/null @@ -1,625 +0,0 @@ -GameIs,1851 -PlayerIs,1,Chris Brooks -PlayerIs,2,Matt Riley -PlayerIs,3,Mike Deans -PlayerIs,4,Chris Shaffer -PlayerIs,5,JD Huntington -PlayerCash,$400 -BankHas,$6040 -StartOfPhase,2 -BankSizeIs,$6040 -StartOfInitialRound -HasPriority,Chris Brooks -BuysItemFor,Chris Brooks,ET&WNC,$80 -BuysItemFor,Matt Riley,L&O,$200 -ALSO_GETS,Matt Riley,PRES_CERT_NAME,L&N,20 -BuysItemFor,Mike Deans,CNO&TP,$240 -ALSO_GETS,Mike Deans,CERT_NAME,L&N,10 -BuysItemFor,Chris Shaffer,M&C,$50 -BuysItemFor,JD Huntington,O&W,$210 -ALSO_GETS,JD Huntington,CERT_NAME,L&N,10 ---- -Has,Chris Brooks,$320 -Has,Matt Riley,$200 -Has,Mike Deans,$160 -Has,Chris Shaffer,$350 -Has,JD Huntington,$190 -StartStockRound,1 -HasPriority,Chris Brooks ---- -PASSES,Chris Brooks -PASSES,Matt Riley -BUY_SHARE_LOG,Mike Deans,10,L&N,IPO,$100 -PRICE_MOVES_LOG,L&N,$100,E3,$110,E2 -FloatsWithCash,L&N,$400 -START_COMPANY_LOG,Chris Shaffer,TC,$70,$140,2,20,BANK -BUY_SHARE_LOG,JD Huntington,10,L&N,L&N,$110 ---- -BUY_SHARE_LOG,Chris Brooks,10,TC,IPO,$70 -BUY_SHARE_LOG,Matt Riley,10,L&N,L&N,$110 -PASSES,Mike Deans -BUY_SHARE_LOG,Chris Shaffer,10,TC,IPO,$70 -BUY_SHARE_LOG,JD Huntington,10,TC,IPO,$70 -PRICE_MOVES_LOG,TC,$70,C5,$75,C4 -FloatsWithCash,TC,$250 ---- -BUY_SHARE_LOG,Chris Brooks,10,TC,TC,$75 -BUY_SHARE_LOG,Matt Riley,10,TC,TC,$75 -PASSES,Mike Deans -BUY_SHARE_LOG,Chris Shaffer,10,TC,TC,$75 -PASSES,JD Huntington ---- -BUY_SHARE_LOG,Chris Brooks,10,TC,TC,$75 -PASSES,Matt Riley -PASSES,Mike Deans -PASSES,Chris Shaffer -PASSES,JD Huntington ---- -BUY_SHARE_LOG,Chris Brooks,10,TC,TC,$75 -PASSES,Matt Riley -PASSES,Mike Deans -PASSES,Chris Shaffer -PASSES,JD Huntington ---- -PASSES,Chris Brooks -END_SR,1 -PRICE_MOVES_LOG,TC,$75,C4,$82,C3 -SoldOut,TC,$75,C4,$82,C3 ---- -Has,L&N,$620 -Has,TC,$625 -Has,Chris Brooks,$25 -Has,Matt Riley,$15 -Has,Mike Deans,$60 -Has,Chris Shaffer,$65 -Has,JD Huntington,$10 -START_OR,1.1 ---- -ReceivesFor,Matt Riley,$5,L&O -ReceivesFor,Chris Shaffer,$10,M&C -ReceivesFor,Chris Brooks,$15,ET&WNC -ReceivesFor,JD Huntington,$20,O&W -ReceivesFor,Mike Deans,$25,CNO&TP -CompanyOperates,L&N,Matt Riley -LaysTileAt,L&N,9,C15,SW -CompanyDoesNotPayDividend,L&N -PRICE_MOVES_LOG,L&N,$110,E2,$100,D2 -BuysTrain,L&N,2,IPO,$100 -FirstTrainBought,2 -BuysTrain,L&N,2,IPO,$100 -CompanyOperates,TC,Chris Shaffer -LaysTileAtFor,TC,202,F12,E,$40 -CompanyDoesNotPayDividend,TC -PRICE_MOVES_LOG,TC,$82,C3,$75,B3 -BuysTrain,TC,2,IPO,$100 -EndOfOperatingRound,1.1 ---- -Has,L&N,$420 -Has,TC,$485 -Has,Chris Brooks,$40 -Has,Matt Riley,$20 -Has,Mike Deans,$85 -Has,Chris Shaffer,$75 -Has,JD Huntington,$30 -StartStockRound,2 -HasPriority,Matt Riley ---- -PASSES,Matt Riley -PASSES,Mike Deans -PASSES,Chris Shaffer -PASSES,JD Huntington -PASSES,Chris Brooks -END_SR,2 -PRICE_MOVES_LOG,TC,$75,B3,$82,B2 -SoldOut,TC,$75,B3,$82,B2 ---- -Has,L&N,$420 -Has,TC,$485 -Has,Chris Brooks,$40 -Has,Matt Riley,$20 -Has,Mike Deans,$85 -Has,Chris Shaffer,$75 -Has,JD Huntington,$30 -START_OR,2.1 ---- -ReceivesFor,Matt Riley,$5,L&O -ReceivesFor,Chris Shaffer,$10,M&C -ReceivesFor,Chris Brooks,$15,ET&WNC -ReceivesFor,JD Huntington,$20,O&W -ReceivesFor,Mike Deans,$25,CNO&TP -CompanyOperates,L&N,Matt Riley -LaysTileAt,L&N,57,D14,SW -LAYS_FREE_TOKEN_ON,L&N,D14 -CompanyRevenue,L&N,$80 -CompanyPaysOutFull,L&N,$80 -Payout,Matt Riley,$24,3,10 -Payout,Mike Deans,$16,2,10 -Payout,JD Huntington,$16,2,10 -Payout,L&N,$24,3,10 -CompanyOperates,TC,Chris Shaffer -LaysTileAt,TC,9,E13,SW -CompanyRevenue,TC,$50 -CompanyPaysOutFull,TC,$50 -Payout,Matt Riley,$5,1,10 -Payout,JD Huntington,$5,1,10 -Payout,Chris Brooks,$20,4,10 -Payout,Chris Shaffer,$20,4,10 -BuysTrain,TC,2,IPO,$100 -BuysTrain,TC,2,IPO,$100 -All 2-trains are sold out, 3-trains now available -BuysTrain,TC,3,IPO,$200 -FirstTrainBought,3 -StartOfPhase,3 -EndOfOperatingRound,2.1 ---- -Has,L&N,$444 -Has,TC,$85 -Has,Chris Brooks,$75 -Has,Matt Riley,$54 -Has,Mike Deans,$126 -Has,Chris Shaffer,$105 -Has,JD Huntington,$71 -StartStockRound,3 -HasPriority,Matt Riley ---- -PASSES,Matt Riley -BUY_SHARE_LOG,Mike Deans,10,L&N,L&N,$100 -SELL_SHARES_LOG,Chris Shaffer,4,10,40,TC,$328 -IS_NOW_PRES_OF,Chris Brooks,TC -PRICE_MOVES_LOG,TC,$82,B2,$60,B6 -START_COMPANY_LOG,Chris Shaffer,GM&O,$82,$164,2,20,BANK -BUY_SHARE_LOG,JD Huntington,10,TC,Pool,$60 -BUY_SHARE_LOG,Chris Brooks,10,TC,Pool,$60 ---- -PASSES,Matt Riley -PASSES,Mike Deans -BUY_SHARE_LOG,Chris Shaffer,10,GM&O,IPO,$82 -Autopasses,JD Huntington -PASSES,Chris Brooks ---- -PASSES,Matt Riley -SELL_SHARE_LOG,Mike Deans,10,L&N,$100 -PRICE_MOVES_LOG,L&N,$100,D2,$90,D3 -BUY_SHARE_LOG,Mike Deans,10,TC,Pool,$60 -BUY_SHARE_LOG,Chris Shaffer,10,GM&O,IPO,$82 -Autopasses,JD Huntington -PASSES,Chris Brooks ---- -PASSES,Matt Riley -BUY_SHARE_LOG,Mike Deans,10,TC,Pool,$60 -BUY_SHARE_LOG,Chris Shaffer,10,GM&O,IPO,$82 -PRICE_MOVES_LOG,GM&O,$82,D4,$90,D3 -FloatsWithCash,GM&O,$310 -Autopasses,JD Huntington -PASSES,Chris Brooks ---- -PASSES,Matt Riley -Autopasses,Mike Deans -PASSES,Chris Shaffer -END_SR,3 -PRICE_MOVES_LOG,TC,$60,B6,$65,B5 -SoldOut,TC,$60,B6,$65,B5 ---- -Has,GM&O,$310 -Has,L&N,$544 -Has,TC,$85 -Has,Chris Brooks,$15 -Has,Matt Riley,$54 -Has,Mike Deans,$6 -Has,Chris Shaffer,$23 -Has,JD Huntington,$11 -START_OR,3.1 ---- -ReceivesFor,Matt Riley,$5,L&O -ReceivesFor,Chris Shaffer,$10,M&C -ReceivesFor,Chris Brooks,$15,ET&WNC -ReceivesFor,JD Huntington,$20,O&W -ReceivesFor,Mike Deans,$25,CNO&TP -CompanyOperates,L&N,Matt Riley -LaysTileAt,L&N,511,B16,W -CompanyRevenue,L&N,$110 -CompanyPaysOutFull,L&N,$110 -Payout,Matt Riley,$33,3,10 -Payout,Mike Deans,$22,2,10 -Payout,JD Huntington,$22,2,10 -Payout,L&N,$22,2,10 -PRICE_MOVES_LOG,L&N,$90,D3,$100,E3 -BuysTrain,L&N,3,IPO,$200 -CompanyOperates,GM&O,Chris Shaffer -LaysTileAt,GM&O,57,G7,NW -LaysTileAt,GM&O,5,F6,W -LAYS_FREE_TOKEN_ON,GM&O,F6 -CompanyDoesNotPayDividend,GM&O -PRICE_MOVES_LOG,GM&O,$90,D3,$82,C3 -BuysTrain,GM&O,3,IPO,$200 -CompanyOperates,TC,Chris Brooks -LaysTileAtFor,TC,6,B18,E,$40 -LaysTileAt,TC,8,A19,SW -LAYS_FREE_TOKEN_ON,TC,B18 -CompanyRevenue,TC,$190 -CompanyPaysOutFull,TC,$190 -Payout,Matt Riley,$19,1,10 -Payout,Mike Deans,$38,2,10 -Payout,JD Huntington,$38,2,10 -Payout,Chris Brooks,$95,5,10 -PRICE_MOVES_LOG,TC,$65,B5,$70,C5 -EndOfOperatingRound,3.1 ---- -Has,GM&O,$110 -Has,L&N,$366 -Has,TC,$45 -Has,Chris Brooks,$125 -Has,Matt Riley,$111 -Has,Mike Deans,$91 -Has,Chris Shaffer,$33 -Has,JD Huntington,$91 -START_OR,3.2 ---- -ReceivesFor,Matt Riley,$5,L&O -ReceivesFor,Chris Shaffer,$10,M&C -ReceivesFor,Chris Brooks,$15,ET&WNC -ReceivesFor,JD Huntington,$20,O&W -ReceivesFor,Mike Deans,$25,CNO&TP -CompanyOperates,L&N,Matt Riley -LaysTileAt,L&N,619,B18,SW -CompanyRevenue,L&N,$220 -CompanyPaysOutFull,L&N,$220 -Payout,Mike Deans,$44,2,10 -Payout,Matt Riley,$66,3,10 -Payout,JD Huntington,$44,2,10 -Payout,L&N,$44,2,10 -PRICE_MOVES_LOG,L&N,$100,E3,$110,F3 -CompanyOperates,GM&O,Chris Shaffer -LaysTileAt,GM&O,9,G5,SW -LaysTileAtFor,GM&O,202,H4,E,$60 -LAYS_FREE_TOKEN_ON,GM&O,H4 -CompanyRevenue,GM&O,$70 -CompanyPaysOutFull,GM&O,$70 -Payout,Chris Shaffer,$35,5,10 -Payout,GM&O,$35,5,10 -CompanyOperates,TC,Chris Brooks -LaysTileAt,TC,14,D14,SW -LAYS_FREE_TOKEN_ON,TC,D14 -CompanyRevenue,TC,$270 -CompanyPaysOutFull,TC,$270 -Payout,Matt Riley,$27,1,10 -Payout,Mike Deans,$54,2,10 -Payout,JD Huntington,$54,2,10 -Payout,Chris Brooks,$135,5,10 -PRICE_MOVES_LOG,TC,$70,C5,$75,D5 -EndOfOperatingRound,3.2 ---- -Has,GM&O,$85 -Has,L&N,$410 -Has,TC,$45 -Has,Chris Brooks,$275 -Has,Matt Riley,$209 -Has,Mike Deans,$214 -Has,Chris Shaffer,$78 -Has,JD Huntington,$209 -StartStockRound,4 -HasPriority,JD Huntington ---- -SELL_SHARE_LOG,JD Huntington,10,L&N,$110 -PRICE_MOVES_LOG,L&N,$110,F3,$100,F4 -SELL_SHARES_LOG,JD Huntington,2,10,20,TC,$150 -PRICE_MOVES_LOG,TC,$75,D5,$65,D7 -START_COMPANY_LOG,JD Huntington,Dixie,$90,$180,2,20,BANK -BUY_SHARE_LOG,Chris Brooks,10,TC,Pool,$65 -BUY_SHARE_LOG,Matt Riley,10,L&N,Pool,$100 -BUY_SHARE_LOG,Mike Deans,10,L&N,Pool,$100 -BUY_SHARE_LOG,Chris Shaffer,10,TC,Pool,$65 ---- -BUY_SHARE_LOG,JD Huntington,10,Dixie,IPO,$90 -BUY_SHARE_LOG,Chris Brooks,10,Dixie,IPO,$90 -BUY_SHARE_LOG,Matt Riley,10,GM&O,GM&O,$82 -BUY_SHARE_LOG,Mike Deans,10,L&N,L&N,$100 -PASSES,Chris Shaffer ---- -BUY_SHARE_LOG,JD Huntington,10,Dixie,IPO,$90 -PRICE_MOVES_LOG,Dixie,$90,E4,$100,E3 -FloatsWithCash,Dixie,$350 -BUY_SHARE_LOG,Chris Brooks,10,Dixie,Dixie,$100 -PASSES,Matt Riley -SELL_SHARES_LOG,Mike Deans,2,10,20,TC,$130 -PRICE_STAYS_LOG,TC,$65,D7 -BUY_SHARE_LOG,Mike Deans,10,L&N,L&N,$100 -IS_NOW_PRES_OF,Mike Deans,L&N -PASSES,Chris Shaffer ---- -BUY_SHARE_LOG,JD Huntington,10,Dixie,Dixie,$100 -Autopasses,Chris Brooks -PASSES,Matt Riley -PASSES,Mike Deans -PASSES,Chris Shaffer ---- -PASSES,JD Huntington -END_SR,4 -PRICE_MOVES_LOG,L&N,$100,F4,$110,F3 -SoldOut,L&N,$100,F4,$110,F3 ---- -Has,GM&O,$167 -Has,L&N,$610 -Has,Dixie,$550 -Has,TC,$45 -Has,Chris Brooks,$20 -Has,Matt Riley,$27 -Has,Mike Deans,$44 -Has,Chris Shaffer,$13 -Has,JD Huntington,$9 -START_OR,4.1 ---- -ReceivesFor,Matt Riley,$5,L&O -ReceivesFor,Chris Shaffer,$10,M&C -ReceivesFor,Chris Brooks,$15,ET&WNC -ReceivesFor,JD Huntington,$20,O&W -ReceivesFor,Mike Deans,$25,CNO&TP -CompanyOperates,L&N,Mike Deans -LaysTileAt,L&N,511,F12,SW -LAYS_FREE_TOKEN_ON,L&N,F12 -CompanyRevenue,L&N,$250 -CompanyPaysOutFull,L&N,$250 -Payout,Mike Deans,$125,5,10 -Payout,JD Huntington,$25,1,10 -Payout,Matt Riley,$100,4,10 -PRICE_MOVES_LOG,L&N,$110,F3,$122,G3 -BuysTrain,L&N,3,IPO,$200 -All 3-trains are sold out, 4-trains now available -CompanyOperates,Dixie,JD Huntington -LaysTileAtFor,Dixie,202,H16,NW,$40 -LaysTileAtFor,Dixie,9,I17,NW,$60 -CompanyDoesNotPayDividend,Dixie -PRICE_MOVES_LOG,Dixie,$100,E3,$90,D3 -BuysTrain,Dixie,4,IPO,$300 -FirstTrainBought,4 -StartOfPhase,4 -TrainsRusted,2 -CompanyOperates,GM&O,Chris Shaffer -LaysTileAt,GM&O,9,H8,NW -LaysTileAt,GM&O,8,I9,NW -CompanyRevenue,GM&O,$80 -CompanyPaysOutFull,GM&O,$80 -Payout,Matt Riley,$8,1,10 -Payout,Chris Shaffer,$40,5,10 -Payout,GM&O,$32,4,10 -CompanyOperates,TC,Chris Brooks -LaysTileAt,TC,7,D16,SW -LaysTileAt,TC,8,E15,NE -CompanyRevenue,TC,$120 -CompanyWithholds,TC,$120 -PRICE_MOVES_LOG,TC,$65,D7,$60,C7 -EndOfOperatingRound,4.1 ---- -Has,GM&O,$199 -Has,L&N,$410 -Has,Dixie,$150 -Has,TC,$165 -Has,Chris Brooks,$35 -Has,Matt Riley,$140 -Has,Mike Deans,$194 -Has,Chris Shaffer,$63 -Has,JD Huntington,$54 -START_OR,4.2 ---- -ReceivesFor,Matt Riley,$5,L&O -ReceivesFor,Chris Shaffer,$10,M&C -ReceivesFor,Chris Brooks,$15,ET&WNC -ReceivesFor,JD Huntington,$20,O&W -ReceivesFor,Mike Deans,$25,CNO&TP -CompanyOperates,L&N,Mike Deans -LaysTileAt,L&N,9,G13,NW -LaysTileAt,L&N,8,H14,NW -CompanyRevenue,L&N,$230 -CompanyPaysOutFull,L&N,$230 -Payout,Mike Deans,$115,5,10 -Payout,Matt Riley,$92,4,10 -Payout,JD Huntington,$23,1,10 -PRICE_MOVES_LOG,L&N,$122,G3,$135,H3 -BuysTrain,L&N,4,IPO,$300 -CompanyOperates,Dixie,JD Huntington -LaysTileAt,Dixie,511,H16,SW -CompanyRevenue,Dixie,$120 -CompanyPaysOutFull,Dixie,$120 -Payout,JD Huntington,$60,5,10 -Payout,Chris Brooks,$24,2,10 -Payout,Dixie,$36,3,10 -PRICE_MOVES_LOG,Dixie,$90,D3,$100,E3 -CompanyOperates,GM&O,Chris Shaffer -LaysTileAt,GM&O,511,H4,SW -CompanyRevenue,GM&O,$90 -CompanyPaysOutFull,GM&O,$90 -Payout,Matt Riley,$9,1,10 -Payout,Chris Shaffer,$45,5,10 -Payout,GM&O,$36,4,10 -PRICE_MOVES_LOG,GM&O,$82,C3,$90,D3 -CompanyOperates,TC,Chris Brooks -LaysTileAt,TC,57,F16,NW -LaysTileAt,TC,8,G17,SW -CompanyRevenue,TC,$120 -CompanyWithholds,TC,$120 -PRICE_MOVES_LOG,TC,$60,C7,$50,B7 -EndOfOperatingRound,4.2 ---- -Has,GM&O,$235 -Has,L&N,$110 -Has,Dixie,$186 -Has,TC,$285 -Has,Chris Brooks,$74 -Has,Matt Riley,$246 -Has,Mike Deans,$334 -Has,Chris Shaffer,$118 -Has,JD Huntington,$157 -StartStockRound,5 -HasPriority,Chris Brooks ---- -PASSES,Chris Brooks -BUY_SHARE_LOG,Matt Riley,10,Dixie,Dixie,$100 -BUY_SHARE_LOG,Mike Deans,10,Dixie,Dixie,$100 -BUY_SHARE_LOG,Chris Shaffer,10,GM&O,GM&O,$90 -BUY_SHARE_LOG,JD Huntington,10,Dixie,Dixie,$100 ---- -Autopasses,Chris Brooks -BUY_SHARE_LOG,Matt Riley,10,GM&O,GM&O,$90 -PASSES,Mike Deans -PASSES,Chris Shaffer -PASSES,JD Huntington ---- -Autopasses,Chris Brooks -BUY_SHARE_LOG,Matt Riley,10,TC,Pool,$50 -PASSES,Mike Deans -PASSES,Chris Shaffer -PASSES,JD Huntington ---- -Autopasses,Chris Brooks -PASSES,Matt Riley -END_SR,5 -PRICE_MOVES_LOG,L&N,$135,H3,$150,H2 -SoldOut,L&N,$135,H3,$150,H2 -PRICE_MOVES_LOG,Dixie,$100,E3,$110,E2 -SoldOut,Dixie,$100,E3,$110,E2 ---- -Has,GM&O,$415 -Has,L&N,$110 -Has,Dixie,$486 -Has,TC,$285 -Has,Chris Brooks,$74 -Has,Matt Riley,$6 -Has,Mike Deans,$234 -Has,Chris Shaffer,$28 -Has,JD Huntington,$57 -START_OR,5.1 ---- -ReceivesFor,Matt Riley,$5,L&O -ReceivesFor,Chris Shaffer,$10,M&C -ReceivesFor,Chris Brooks,$15,ET&WNC -ReceivesFor,JD Huntington,$20,O&W -ReceivesFor,Mike Deans,$25,CNO&TP -CompanyOperates,L&N,Mike Deans -LaysTileAt,L&N,7,A15,E -LaysTileAtFor,L&N,8,A17,W,$40 -LAYS_FREE_TOKEN_ON,L&N,H16 -CompanyRevenue,L&N,$400 -CompanySplits,L&N,$400 -L&N receives $200 -Payout,Mike Deans,$100,5,10 -Payout,Matt Riley,$80,4,10 -Payout,JD Huntington,$20,1,10 -PRICE_MOVES_LOG,L&N,$150,H2,$165,I2 -CompanyOperates,Dixie,JD Huntington -LaysTileAt,Dixie,25,H14,E -CompanyRevenue,Dixie,$130 -CompanySplits,Dixie,$130 -Dixie receives $60 -Payout,Mike Deans,$7,1,10 -Payout,Matt Riley,$7,1,10 -Payout,JD Huntington,$42,6,10 -Payout,Chris Brooks,$14,2,10 -CompanyOperates,GM&O,Chris Shaffer -LaysTileAt,GM&O,8,I11,SE -LaysTileAtFor,GM&O,5,I13,W,$40 -LAYS_FREE_TOKEN_ON,GM&O,I13 -CompanyRevenue,GM&O,$100 -CompanyPaysOutFull,GM&O,$100 -Payout,Matt Riley,$20,2,10 -Payout,Chris Shaffer,$60,6,10 -Payout,GM&O,$20,2,10 -PRICE_MOVES_LOG,GM&O,$90,D3,$100,E3 -CompanyOperates,TC,Chris Brooks -LaysTileAt,TC,7,F10,E -LaysTileAt,TC,9,G11,NW -CompanyRevenue,TC,$120 -CompanySplits,TC,$120 -TC receives $60 -Payout,Matt Riley,$12,2,10 -Payout,Chris Shaffer,$6,1,10 -Payout,Chris Brooks,$36,6,10 -PRICE_MOVES_LOG,TC,$50,B7,$60,C7 -BuysTrain,TC,4,IPO,$300 -All 4-trains are sold out, 5-trains now available -EndOfOperatingRound,5.1 ---- -Has,GM&O,$395 -Has,L&N,$270 -Has,Dixie,$546 -Has,TC,$45 -Has,Chris Brooks,$139 -Has,Matt Riley,$130 -Has,Mike Deans,$366 -Has,Chris Shaffer,$104 -Has,JD Huntington,$139 -START_OR,5.2 ---- -ReceivesFor,Matt Riley,$5,L&O -ReceivesFor,Chris Shaffer,$10,M&C -ReceivesFor,Chris Brooks,$15,ET&WNC -ReceivesFor,JD Huntington,$20,O&W -ReceivesFor,Mike Deans,$25,CNO&TP -CompanyOperates,L&N,Mike Deans -LaysTileAt,L&N,8,C19,SW -LaysTileAtFor,L&N,8,D18,NE,$60 -CompanyRevenue,L&N,$400 -CompanySplits,L&N,$400 -L&N receives $200 -Payout,Mike Deans,$100,5,10 -Payout,Matt Riley,$80,4,10 -Payout,JD Huntington,$20,1,10 -PRICE_MOVES_LOG,L&N,$165,I2,$180,J2 -CompanyOperates,Dixie,JD Huntington -LaysTileAt,Dixie,14,I13,NW -LAYS_FREE_TOKEN_ON,Dixie,I13 -CompanyRevenue,Dixie,$140 -CompanyPaysOutFull,Dixie,$140 -Payout,Mike Deans,$14,1,10 -Payout,Matt Riley,$14,1,10 -Payout,JD Huntington,$84,6,10 -Payout,Chris Brooks,$28,2,10 -PRICE_MOVES_LOG,Dixie,$110,E2,$122,F2 -BuysTrain,Dixie,5,IPO,$500 -FirstTrainBought,5 -StartOfPhase,5 -PrivateCloses,L&O -PrivateCloses,M&C -PrivateCloses,ET&WNC -PrivateCloses,O&W -PrivateCloses,CNO&TP -CompanyDiscardsTrain,L&N,3 -CompanyOperates,GM&O,Chris Shaffer -LaysTileAt,GM&O,15,F6,NE -CompanyRevenue,GM&O,$110 -CompanyPaysOutFull,GM&O,$110 -Payout,Matt Riley,$22,2,10 -Payout,Chris Shaffer,$66,6,10 -Payout,GM&O,$22,2,10 -PRICE_MOVES_LOG,GM&O,$100,E3,$110,F3 -CompanyOperates,TC,Chris Brooks -LaysTileAt,TC,619,F16,NE -CompanyRevenue,TC,$280 -CompanyPaysOutFull,TC,$280 -Payout,Matt Riley,$56,2,10 -Payout,Chris Shaffer,$28,1,10 -Payout,Chris Brooks,$168,6,10 -PRICE_MOVES_LOG,TC,$60,C7,$65,D7 -EndOfOperatingRound,5.2 ---- -Has,GM&O,$417 -Has,L&N,$410 -Has,Dixie,$46 -Has,TC,$45 -Has,Chris Brooks,$350 -Has,Matt Riley,$307 -Has,Mike Deans,$505 -Has,Chris Shaffer,$208 -Has,JD Huntington,$263 -StartStockRound,6 -HasPriority,Mike Deans ---- -START_COMPANY_LOG,Mike Deans,SR,$100,$200,2,20,BANK -BUY_SHARE_LOG,Chris Shaffer,10,SR,IPO,$100 -BUY_SHARE_LOG,JD Huntington,10,SR,IPO,$100 -START_COMPANY_LOG,Chris Brooks,IC,$82,$164,2,20,BANK -BUY_SHARE_LOG,Matt Riley,10,SR,IPO,$100 -PRICE_MOVES_LOG,SR,$100,E3,$110,E2 -FloatsWithCash,SR,$400 ---- -BUY_SHARE_LOG,Mike Deans,10,SR,SR,$110 -BUY_SHARE_LOG,Chris Shaffer,10,TC,Pool,$65 diff --git a/test/data/1851/pbem/1851_A_SR6.txt b/test/data/1851/pbem/1851_A_SR6.txt deleted file mode 100644 index bfc9759..0000000 --- a/test/data/1851/pbem/1851_A_SR6.txt +++ /dev/null @@ -1,5 +0,0 @@ -Author: Chris Schaffer -5 players -in progress -State: SR 6 -Date: 2010/03/23 diff --git a/test/data/1856/finished/1856_A_OR5_b.rails b/test/data/1856/finished/1856_A_OR5_b.rails deleted file mode 100644 index e038e77..0000000 Binary files a/test/data/1856/finished/1856_A_OR5_b.rails and /dev/null differ diff --git a/test/data/1856/finished/1856_A_OR5_b.report b/test/data/1856/finished/1856_A_OR5_b.report deleted file mode 100644 index b465924..0000000 --- a/test/data/1856/finished/1856_A_OR5_b.report +++ /dev/null @@ -1,812 +0,0 @@ -GameIs,1856 -PlayerIs,1,Matt -PlayerIs,2,Chris -PlayerIs,3,Brian -PlayerIs,4,Wesaq -PlayerCash,$375 -BankHas,$10500 -StartOfPhase,1 -BankSizeIs,$10500 -StartOfInitialRound -HasPriority,Matt ---- -BID_ITEM_LOG,Matt,$105,Tunn,$270 -BID_ITEM_LOG,Chris,$75,Ship,$300 -BID_ITEM_LOG,Brian,$105,Brdg,$270 -BID_ITEM_LOG,Wesaq,$45,W&SR,$330 ---- -BID_ITEM_LOG,Matt,$80,Ship,$190 -BuysItemFor,Chris,Flos,$20 -BuysItemFor,Wesaq,W&SR,$45 -BuysItemFor,Brian,TCC,$50 -TO_AUCTION,Ship -PASSES,Chris -BuysItemFor,Matt,Ship,$80 -BuysItemFor,Brian,Brdg,$105 -BuysItemFor,Matt,Tunn,$105 ---- -Has,Matt,$190 -Has,Chris,$355 -Has,Brian,$220 -Has,Wesaq,$330 -StartStockRound,1 -HasPriority,Wesaq ---- -START_COMPANY_LOG,Wesaq,GT,$75,$150,2,20,GT -Floats,GT -START_COMPANY_LOG,Matt,LPS,$65,$130,2,20,LPS -Floats,LPS -START_COMPANY_LOG,Chris,GW,$100,$200,2,20,GW -Floats,GW -START_COMPANY_LOG,Brian,CPR,$70,$140,2,20,CPR -Floats,CPR ---- -BUY_SHARE_LOG,Wesaq,10,GT,IPO,$75 -PriceIsPaidTo,$75,GT -PASSES,Matt -BUY_SHARE_LOG,Chris,10,GW,IPO,$100 -PriceIsPaidTo,$100,GW -BUY_SHARE_LOG,Brian,10,CPR,IPO,$70 -PriceIsPaidTo,$70,CPR ---- -BUY_SHARE_LOG,Wesaq,10,GT,IPO,$75 -PriceIsPaidTo,$75,GT -PASSES,Matt -PASSES,Chris -PASSES,Brian ---- -PASSES,Wesaq -END_SR,1 ---- -Has,GT,$300 -Has,LPS,$130 -Has,CPR,$210 -Has,GW,$300 -Has,Matt,$60 -Has,Chris,$55 -Has,Brian,$10 -Has,Wesaq,$30 -START_OR,1.1 ---- -ReceivesFor,Chris,$5,Flos -ReceivesFor,Wesaq,$10,W&SR -ReceivesFor,Brian,$10,TCC -ReceivesFor,Matt,$15,Ship -ReceivesFor,Brian,$20,Brdg -ReceivesFor,Matt,$20,Tunn -CompanyOperates,GW,Chris -LaysTileAt,GW,5,F17,NE -CompanyDoesNotPayDividend,GW -PRICE_MOVES_LOG,GW,$100,E1,$90,D1 -BuysTrain,GW,2,IPO,$100 -FirstTrainBought,2 -CompanyOperates,GT,Wesaq -LaysTileAt,GT,5,P9,N -CompanyDoesNotPayDividend,GT -PRICE_MOVES_LOG,GT,$75,E4,$70,D4 -BuysTrain,GT,2,IPO,$100 -CompanyOperates,CPR,Brian -LaysTileAtFor,CPR,6,N3,NE,$40 -CompanyDoesNotPayDividend,CPR -PRICE_MOVES_LOG,CPR,$70,E5,$65,D5 -CompanyTakesLoan,CPR,$100,$90 -BuysTrain,CPR,2,IPO,$100 -BuysTrain,CPR,2,IPO,$100 -CompanyOperates,LPS,Matt -LaysTileAt,LPS,6,C14,N -CompanyDoesNotPayDividend,LPS -PRICE_MOVES_LOG,LPS,$65,E6,$60,D6 -BuysTrain,LPS,2,IPO,$100 -CompanyTakesLoan,LPS,$100,$90 -EndOfOperatingRound,1.1 ---- -Has,GT,$200 -Has,LPS,$120 -Has,CPR,$60 -Has,GW,$200 -Has,Matt,$95 -Has,Chris,$60 -Has,Brian,$40 -Has,Wesaq,$40 -StartStockRound,2 -HasPriority,Matt ---- -BUY_SHARE_LOG,Matt,10,CPR,IPO,$70 -PriceIsPaidTo,$70,CPR -Autopasses,Chris -Autopasses,Brian -Autopasses,Wesaq ---- -PASSES,Matt -END_SR,2 ---- -Has,GT,$200 -Has,LPS,$120 -Has,CPR,$130 -Has,GW,$200 -Has,Matt,$25 -Has,Chris,$60 -Has,Brian,$40 -Has,Wesaq,$40 -START_OR,2.1 ---- -ReceivesFor,Chris,$5,Flos -ReceivesFor,Wesaq,$10,W&SR -ReceivesFor,Brian,$10,TCC -ReceivesFor,Matt,$15,Ship -ReceivesFor,Brian,$20,Brdg -ReceivesFor,Matt,$20,Tunn -CompanyOperates,GW,Chris -LaysTileAt,GW,8,E16,SE -CompanyRevenue,GW,$50 -CompanyPaysOutFull,GW,$50 -Payout,Chris,$15,3,10 -PRICE_MOVES_LOG,GW,$90,D1,$100,E1 -BuysTrain,GW,2,IPO,$100 -All 2-trains are sold out, 3-trains now available -CompanyOperates,GT,Wesaq -LaysTileAt,GT,9,O10,SW -LAYS_TOKEN_ON,GT,N11,$40 -CompanyRevenue,GT,$60 -CompanyPaysOutFull,GT,$60 -Payout,Wesaq,$24,4,10 -PRICE_MOVES_LOG,GT,$70,D4,$75,E4 -CompanyTakesLoan,GT,$100,$90 -CompanyOperates,CPR,Brian -LaysTileAt,CPR,58,M6,N -LAYS_TOKEN_ON,CPR,N3,$40 -CompanyTakesLoan,CPR,$100,$100 -CompanyRevenue,CPR,$90 -CompanyMustPayLoanInterest,CPR,$20 -InterestPaidFromTreasury,CPR,$20 -CompanyPaysOutFull,CPR,$90 -Payout,Matt,$9,1,10 -Payout,Brian,$27,3,10 -PRICE_MOVES_LOG,CPR,$65,D5,$70,E5 -CompanyOperates,LPS,Matt -LaysTileAt,LPS,9,C16,S -CompanyTakesLoan,LPS,$100,$100 -CompanyRevenue,LPS,$50 -CompanyMustPayLoanInterest,LPS,$20 -InterestPaidFromTreasury,LPS,$20 -CompanyWithholds,LPS,$50 -PRICE_MOVES_LOG,LPS,$60,D6,$55,C6 -BuysTrain,LPS,3,IPO,$225 -FirstTrainBought,3 -StartOfPhase,2 -EndOfOperatingRound,2.1 ---- -Has,GT,$250 -Has,LPS,$25 -Has,CPR,$170 -Has,GW,$100 -Has,Matt,$69 -Has,Chris,$80 -Has,Brian,$97 -Has,Wesaq,$74 -StartStockRound,3 -HasPriority,Chris ---- -BUY_SHARE_LOG,Chris,10,CPR,IPO,$70 -PriceIsPaidTo,$70,CPR -BUY_SHARE_LOG,Brian,10,CPR,IPO,$70 -HoldMoneyInEscrow,$70,$70,CPR -SELL_SHARES_LOG,Wesaq,2,10,20,GT,$150 -PRICE_MOVES_LOG,GT,$75,E4,$65,E6 -START_COMPANY_LOG,Wesaq,TGB,$70,$140,2,20,TGB -BUY_SHARE_LOG,Matt,10,LPS,IPO,$65 -PriceIsPaidTo,$65,LPS ---- -Autopasses,Chris -Autopasses,Brian -BUY_SHARE_LOG,Wesaq,10,TGB,IPO,$70 -PriceIsPaidTo,$70,TGB -Floats,TGB -PASSES,Matt ---- -Autopasses,Chris -Autopasses,Brian -PASSES,Wesaq -END_SR,3 ---- -Has,GT,$250 -Has,LPS,$90 -Has,CPR,$240 -Has,TGB,$210 -Has,GW,$100 -Has,Matt,$4 -Has,Chris,$10 -Has,Brian,$27 -Has,Wesaq,$14 -START_OR,3.1 ---- -ReceivesFor,Chris,$5,Flos -ReceivesFor,Wesaq,$10,W&SR -ReceivesFor,Brian,$10,TCC -ReceivesFor,Matt,$15,Ship -ReceivesFor,Brian,$20,Brdg -ReceivesFor,Matt,$20,Tunn -CompanyOperates,GW,Chris -LaysTileAt,GW,57,D17,SW -LAYS_TOKEN_ON,GW,F17,$40 -CompanyRevenue,GW,$90 -CompanyWithholds,GW,$90 -PRICE_MOVES_LOG,GW,$100,E1,$90,D1 -CompanyTakesLoan,GW,$100,$90 -BuysPrivateFromFor,GW,Flos,Chris,$40 -CompanyOperates,CPR,Brian -CompanyTakesLoan,CPR,$100,$100 -LaysTileAt,CPR,121,M4,SW -CompanyRevenue,CPR,$110 -CompanyMustPayLoanInterest,CPR,$30 -InterestPaidFromTreasury,CPR,$30 -CompanyPaysOutFull,CPR,$110 -Payout,Brian,$44,4,10 -Payout,Matt,$11,1,10 -Payout,Chris,$11,1,10 -PRICE_MOVES_LOG,CPR,$70,E5,$75,F5 -BuysTrain,CPR,3,IPO,$225 -CompanyOperates,TGB,Wesaq -LaysTileAt,TGB,57,K8,SE -CompanyTakesLoan,TGB,$100,$100 -BuysPrivateFromFor,TGB,W&SR,Wesaq,$80 -LAYS_FREE_TOKEN_ON,TGB,I12 -InterestPaidFromTreasury,TGB,$10 -CompanyDoesNotPayDividend,TGB -PRICE_MOVES_LOG,TGB,$70,E5,$65,D5 -BuysTrain,TGB,3,IPO,$225 -PrivateCloses,W&SR -CompanyOperates,GT,Wesaq -LaysTileAt,GT,9,O8,NW -CompanyRevenue,GT,$60 -CompanyMustPayLoanInterest,GT,$10 -InterestPaidFromTreasury,GT,$10 -CompanyPaysOutFull,GT,$60 -Payout,Wesaq,$12,2,10 -Payout,GT,$12,2,10 -PRICE_MOVES_LOG,GT,$65,E6,$70,F6 -CompanyTakesLoan,GT,$100,$90 -BuysTrain,GT,3,IPO,$225 -CompanyOperates,LPS,Matt -LaysTileAt,LPS,7,C18,N -CompanyTakesLoan,LPS,$100,$100 -BuysPrivateFromFor,LPS,Ship,Matt,$140 -LaysBonusTokenOn,LPS,Port,$20,C14 -PrivateCloses,Ship -DestinationReached,LPS,F17 -CompanyRevenue,LPS,$150 -CompanyMustPayLoanInterest,LPS,$30 -InterestPaidFromTreasury,LPS,$30 -CompanyPaysOutFull,LPS,$150 -Payout,Matt,$45,3,10 -PRICE_MOVES_LOG,LPS,$55,C6,$60,D6 -EndOfOperatingRound,3.1 ---- -Has,GT,$117 -Has,LPS,$20 -Has,CPR,$85 -Has,TGB,$0 -Has,GW,$200 -Has,Matt,$235 -Has,Chris,$66 -Has,Brian,$101 -Has,Wesaq,$111 -START_OR,3.2 ---- -ReceivesFor,GW,$5,Flos -ReceivesFor,Brian,$10,TCC -ReceivesFor,Brian,$20,Brdg -ReceivesFor,Matt,$20,Tunn -CompanyOperates,GW,Chris -LaysTileAt,GW,26,C18,SW -CompanyRevenue,GW,$90 -CompanyMustPayLoanInterest,GW,$10 -InterestPaidFromTreasury,GW,$10 -CompanyPaysOutFull,GW,$90 -Payout,Chris,$27,3,10 -PRICE_MOVES_LOG,GW,$90,D1,$100,E1 -CompanyTakesLoan,GW,$100,$90 -BuysTrain,GW,3,IPO,$225 -All 3-trains are sold out, 4-trains now available -CompanyOperates,CPR,Brian -LaysTileAt,CPR,9,L3,NW -CompanyTakesLoan,CPR,$100,$100 -CompanyRevenue,CPR,$190 -CompanyMustPayLoanInterest,CPR,$40 -InterestPaidFromTreasury,CPR,$40 -CompanyPaysOutFull,CPR,$190 -Payout,Matt,$19,1,10 -Payout,Brian,$76,4,10 -Payout,Chris,$19,1,10 -PRICE_MOVES_LOG,CPR,$75,F5,$80,G5 -BuysPrivateFromFor,CPR,TCC,Brian,$100 -CompanyOperates,GT,Wesaq -LaysTileAt,GT,9,N7,NW -CompanyRevenue,GT,$130 -CompanyMustPayLoanInterest,GT,$20 -InterestPaidFromTreasury,GT,$20 -CompanyPaysOutFull,GT,$130 -Payout,Wesaq,$26,2,10 -Payout,GT,$26,2,10 -PRICE_MOVES_LOG,GT,$70,F6,$75,G6 -CompanyOperates,TGB,Wesaq -LaysTileAt,TGB,58,L9,NW -CompanyRevenue,TGB,$30 -CompanyMustPayLoanInterest,TGB,$10 -InterestPaidFromRevenue,TGB,$10,$10 -CompanyPaysOutFull,TGB,$20 -Payout,Wesaq,$6,3,10 -PRICE_MOVES_LOG,TGB,$65,D5,$70,E5 -CompanyTakesLoan,TGB,$100,$90 -CompanyOperates,LPS,Matt -LaysTileAt,LPS,15,C14,SE -CompanyRevenue,LPS,$170 -CompanyMustPayLoanInterest,LPS,$30 -InterestPartlyPaidFromTreasury,LPS,$20,$30 -InterestPaidFromRevenue,LPS,$10,$30 -CompanyWithholds,LPS,$160 -PRICE_MOVES_LOG,LPS,$60,D6,$55,C6 -BuysPrivateFromFor,LPS,Tunn,Matt,$160 -AcquiresBonus,LPS,Tunnel,$10,B13 -EndOfOperatingRound,3.2 ---- -Has,GT,$123 -Has,LPS,$0 -Has,CPR,$45 -Has,TGB,$90 -Has,GW,$60 -Has,Matt,$434 -Has,Chris,$112 -Has,Brian,$307 -Has,Wesaq,$143 -StartStockRound,4 -HasPriority,Matt ---- -START_COMPANY_LOG,Matt,CA,$90,$180,2,20,CA -BUY_SHARE_LOG,Chris,10,LPS,IPO,$65 -PriceIsPaidTo,$65,LPS -START_COMPANY_LOG,Brian,CV,$100,$200,2,20,CV -BUY_SHARE_LOG,Wesaq,10,TGB,IPO,$70 -PriceIsPaidTo,$70,TGB ---- -BUY_SHARE_LOG,Matt,10,LPS,IPO,$65 -PriceIsPaidTo,$65,LPS -SELL_SHARE_LOG,Chris,10,LPS,$55 -PRICE_MOVES_LOG,LPS,$55,C6,$50,C7 -SELL_SHARE_LOG,Chris,10,CPR,$80 -PRICE_MOVES_LOG,CPR,$80,G5,$75,G6 -START_COMPANY_LOG,Chris,BBG,$90,$180,2,20,BBG -BUY_SHARE_LOG,Brian,10,CV,IPO,$100 -PriceIsPaidTo,$100,CV -BUY_SHARE_LOG,Wesaq,10,TGB,IPO,$70 -PriceIsPaidTo,$70,TGB ---- -SELL_SHARE_LOG,Matt,10,CPR,$75 -PRICE_MOVES_LOG,CPR,$75,G6,$70,G7 -BUY_SHARE_LOG,Matt,10,LPS,IPO,$65 -PriceIsPaidTo,$65,LPS -Autopasses,Chris -SELL_SHARES_LOG,Brian,2,10,20,CPR,$140 -PRICE_STAYS_LOG,CPR,$70,G7 -BUY_SHARE_LOG,Brian,10,CV,IPO,$100 -PriceIsPaidTo,$100,CV -Floats,CV -SELL_SHARES_LOG,Wesaq,3,10,30,TGB,$210 -PRICE_MOVES_LOG,TGB,$70,E5,$55,E8 -BUY_SHARE_LOG,Wesaq,10,GT,IPO,$75 -PriceIsPaidTo,$75,GT ---- -BUY_SHARE_LOG,Matt,10,TGB,Pool,$55 -Autopasses,Chris -Autopasses,Brian -BUY_SHARE_LOG,Wesaq,10,CA,IPO,$90 -PriceIsPaidTo,$90,CA ---- -BUY_SHARE_LOG,Matt,10,TGB,Pool,$55 -Autopasses,Chris -Autopasses,Brian -SELL_SHARES_LOG,Wesaq,2,10,20,TGB,$110 -IS_NOW_PRES_OF,Matt,TGB -PRICE_MOVES_LOG,TGB,$55,E8,$45,E10 -BUY_SHARE_LOG,Wesaq,10,CA,IPO,$90 -PriceIsPaidTo,$90,CA -Floats,CA ---- -BUY_SHARE_LOG,Matt,10,LPS,Pool,$50 -Autopasses,Chris -Autopasses,Brian -SELL_SHARE_LOG,Wesaq,10,GT,$75 -PRICE_MOVES_LOG,GT,$75,G6,$70,G7 -BUY_SHARE_LOG,Wesaq,10,CA,IPO,$90 -PriceIsPaidTo,$90,CA -IS_NOW_PRES_OF,Wesaq,CA ---- -PASSES,Matt -Autopasses,Chris -Autopasses,Brian -PASSES,Wesaq -END_SR,4 ---- -Has,GT,$198 -Has,LPS,$195 -Has,CV,$400 -Has,CPR,$45 -Has,CA,$450 -Has,TGB,$230 -Has,GW,$60 -Has,Matt,$39 -Has,Chris,$2 -Has,Brian,$47 -Has,Wesaq,$53 -START_OR,4.1 ---- -ReceivesFor,GW,$5,Flos -ReceivesFor,CPR,$10,TCC -ReceivesFor,Brian,$20,Brdg -ReceivesFor,LPS,$20,Tunn -CompanyOperates,GW,Chris -LaysTileAt,GW,57,B19,SW -DestinationReached,GW,A20 -CompanyTakesLoan,GW,$100,$100 -LAYS_TOKEN_ON,GW,B19,$100 -CompanyRevenue,GW,$160 -CompanyMustPayLoanInterest,GW,$30 -InterestPaidFromTreasury,GW,$30 -CompanyWithholds,GW,$160 -PRICE_MOVES_LOG,GW,$100,E1,$90,D1 -CompanyOperates,CV,Brian -LaysTileAt,CV,9,M12,SW -CompanyDoesNotPayDividend,CV -PRICE_MOVES_LOG,CV,$100,E1,$90,D1 -CompanyTakesLoan,CV,$100,$90 -BuysTrain,CV,4,IPO,$350 -FirstTrainBought,4 -StartOfPhase,3 -TrainsRusted,2 -CompanyOperates,CA,Wesaq -LaysTileAt,CA,15,F17,NW -LAYS_TOKEN_ON,CA,F17,$40 -CompanyDoesNotPayDividend,CA -PRICE_MOVES_LOG,CA,$90,E2,$80,D2 -BuysTrain,CA,4,IPO,$350 -CompanyOperates,CPR,Brian -LaysTileAt,CPR,15,N3,SW -DestinationReached,CPR,N11 -ReleasedFromEscrow,CPR,$70 -CompanyRevenue,CPR,$100 -CompanyMustPayLoanInterest,CPR,$40 -InterestPaidFromTreasury,CPR,$40 -CompanyWithholds,CPR,$100 -PRICE_MOVES_LOG,CPR,$70,G7,$65,F7 -CompanyRepaysLoans,CPR,$185,$200,2,$100 -CompanyRepaysLoansWithPresCash,CPR,$15,$200,2,$100,Brian -CompanyOperates,GT,Wesaq -LaysTileAt,GT,24,N7,SE -CompanyRevenue,GT,$70 -CompanyMustPayLoanInterest,GT,$20 -InterestPaidFromTreasury,GT,$20 -CompanyPaysOutFull,GT,$70 -Payout,Wesaq,$14,2,10 -Payout,GT,$21,3,10 -PRICE_MOVES_LOG,GT,$70,G7,$75,G6 -CompanyOperates,LPS,Matt -LaysTileAt,LPS,15,D17,SW -CompanyRevenue,LPS,$120 -CompanyMustPayLoanInterest,LPS,$30 -InterestPaidFromTreasury,LPS,$30 -CompanyWithholds,LPS,$120 -PRICE_MOVES_LOG,LPS,$50,C7,$45,B7 -CompanyTakesLoan,LPS,$100,$90 -BuysTrain,LPS,4,IPO,$350 -CompanyOperates,TGB,Matt -LaysTileAt,TGB,9,M8,SW -CompanyRevenue,TGB,$50 -CompanyMustPayLoanInterest,TGB,$20 -InterestPaidFromTreasury,TGB,$20 -CompanyPaysOutFull,TGB,$50 -Payout,Matt,$10,2,10 -Payout,TGB,$15,3,10 -PRICE_MOVES_LOG,TGB,$45,E10,$50,E9 -EndOfOperatingRound,4.1 ---- -Has,GT,$199 -Has,LPS,$45 -Has,CV,$140 -Has,CPR,$0 -Has,CA,$60 -Has,TGB,$225 -Has,GW,$195 -Has,Matt,$49 -Has,Chris,$2 -Has,Brian,$52 -Has,Wesaq,$67 -START_OR,4.2 ---- -ReceivesFor,GW,$5,Flos -ReceivesFor,CPR,$10,TCC -ReceivesFor,Brian,$20,Brdg -ReceivesFor,LPS,$20,Tunn -CompanyOperates,GW,Chris -LaysTileAt,GW,8,G14,SE -CompanyRevenue,GW,$90 -CompanyMustPayLoanInterest,GW,$30 -InterestPaidFromTreasury,GW,$30 -CompanyWithholds,GW,$90 -PRICE_MOVES_LOG,GW,$90,D1,$80,C1 -CompanyOperates,CV,Brian -LaysTileAt,CV,57,L13,SW -CompanyRevenue,CV,$60 -CompanyMustPayLoanInterest,CV,$10 -InterestPaidFromTreasury,CV,$10 -CompanyPaysOutFull,CV,$60 -Payout,Brian,$24,4,10 -PRICE_MOVES_LOG,CV,$90,D1,$100,E1 -CompanyTakesLoan,CV,$100,$90 -CompanyOperates,CA,Wesaq -DestinationReached,GT,K8 -LaysTileAt,CA,9,G16,SW -CompanyRevenue,CA,$120 -CompanyPaysOutFull,CA,$120 -Payout,Wesaq,$36,3,10 -Payout,Matt,$24,2,10 -PRICE_MOVES_LOG,CA,$80,D2,$90,E2 -CompanyOperates,GT,Wesaq -LaysTileAt,GT,120,N11,NE -CompanyRevenue,GT,$90 -CompanyMustPayLoanInterest,GT,$20 -InterestPaidFromTreasury,GT,$20 -CompanyWithholds,GT,$90 -PRICE_MOVES_LOG,GT,$75,G6,$70,F6 -CompanyOperates,CPR,Brian -CompanyRevenue,CPR,$100 -CompanyMustPayLoanInterest,CPR,$20 -InterestPartlyPaidFromTreasury,CPR,$10,$20 -InterestPaidFromRevenue,CPR,$10,$20 -CompanyPaysOutFull,CPR,$90 -Payout,Brian,$18,2,10 -Payout,CPR,$36,4,10 -PRICE_MOVES_LOG,CPR,$65,F7,$70,G7 -BuysTrain,CPR,4,CV,$1 -CompanyOperates,TGB,Matt -LaysTileAt,TGB,14,K8,SW -CompanyRevenue,TGB,$60 -CompanyMustPayLoanInterest,TGB,$20 -InterestPaidFromTreasury,TGB,$20 -CompanyPaysOutFull,TGB,$60 -Payout,Matt,$12,2,10 -Payout,TGB,$18,3,10 -PRICE_MOVES_LOG,TGB,$50,E9,$55,E8 -BuysBonusTokenFrom,TGB,Tunnel,$10,LPS,$50 -CompanyOperates,LPS,Matt -LaysTileAt,LPS,7,B15,N -CompanyRevenue,LPS,$240 -CompanyMustPayLoanInterest,LPS,$40 -InterestPaidFromTreasury,LPS,$40 -CompanyPaysOutFull,LPS,$240 -Payout,Matt,$144,6,10 -PRICE_MOVES_LOG,LPS,$45,B7,$50,C7 -EndOfOperatingRound,4.2 ---- -Has,GT,$269 -Has,LPS,$75 -Has,CV,$221 -Has,CPR,$35 -Has,CA,$60 -Has,TGB,$173 -Has,GW,$260 -Has,Matt,$229 -Has,Chris,$2 -Has,Brian,$114 -Has,Wesaq,$103 -StartStockRound,5 -HasPriority,Matt ---- -BUY_SHARE_LOG,Matt,10,CA,IPO,$90 -HoldMoneyInEscrow,$90,$90,CA -Autopasses,Chris -BUY_SHARE_LOG,Brian,10,CV,IPO,$100 -PriceIsPaidTo,$100,CV -SELL_SHARES_LOG,Brian,3,10,30,CV,$300 -PRICE_MOVES_LOG,CV,$100,E1,$75,E4 -BUY_SHARE_LOG,Wesaq,10,CA,IPO,$90 -HoldMoneyInEscrow,$90,$180,CA ---- -BUY_SHARE_LOG,Matt,10,CA,IPO,$90 -HoldMoneyInEscrow,$90,$270,CA -Autopasses,Chris -BUY_SHARE_LOG,Brian,10,CPR,IPO,$70 -PriceIsPaidTo,$70,CPR -Autopasses,Wesaq ---- -SELL_SHARE_LOG,Matt,10,LPS,$50 -PRICE_MOVES_LOG,LPS,$50,C7,$45,C8 -BUY_SHARE_LOG,Matt,10,CA,IPO,$90 -HoldMoneyInEscrow,$90,$360,CA -IS_NOW_PRES_OF,Matt,CA -PASSES,Chris -BUY_SHARE_LOG,Brian,10,LPS,Pool,$45 -Autopasses,Wesaq ---- -PASSES,Matt -PASSES,Chris -BUY_SHARE_LOG,Brian,10,GT,Pool,$70 -SELL_SHARE_LOG,Brian,10,LPS,$45 -PRICE_MOVES_LOG,LPS,$45,C8,$40,C9 -SELL_SHARES_LOG,Wesaq,4,10,40,CA,$360 -PRICE_MOVES_LOG,CA,$90,E2,$65,E6 -BUY_SHARE_LOG,Wesaq,10,LPS,Pool,$40 ---- -PASSES,Matt -Autopasses,Chris -BUY_SHARE_LOG,Brian,10,BBG,IPO,$90 -PriceIsPaidTo,$90,BBG -SELL_SHARE_LOG,Brian,10,GT,$70 -PRICE_MOVES_LOG,GT,$70,F6,$65,F7 -BUY_SHARE_LOG,Wesaq,10,CV,Pool,$75 ---- -PASSES,Matt -PASSES,Chris -BUY_SHARE_LOG,Brian,10,BBG,IPO,$90 -PriceIsPaidTo,$90,BBG -Floats,BBG -PASSES,Wesaq ---- -PASSES,Matt -PASSES,Chris -SELL_SHARES_LOG,Brian,2,10,20,BBG,$180 -PRICE_MOVES_LOG,BBG,$90,E2,$75,E4 -BUY_SHARE_LOG,Brian,10,CPR,IPO,$70 -PriceIsPaidTo,$70,CPR -BUY_SHARE_LOG,Wesaq,10,CPR,Pool,$70 ---- -PASSES,Matt -PASSES,Chris -BUY_SHARE_LOG,Brian,10,CPR,IPO,$70 -PriceIsPaidTo,$70,CPR -BUY_SHARE_LOG,Wesaq,10,CPR,Pool,$70 ---- -PASSES,Matt -PASSES,Chris -BUY_SHARE_LOG,Brian,10,CPR,IPO,$70 -PriceIsPaidTo,$70,CPR -BUY_SHARE_LOG,Wesaq,10,CPR,Pool,$70 ---- -PASSES,Matt -PASSES,Chris -PASSES,Brian -SELL_SHARE_LOG,Wesaq,10,CV,$75 -PRICE_MOVES_LOG,CV,$75,E4,$70,E5 ---- -PASSES,Matt -Autopasses,Chris -PASSES,Brian -PASSES,Wesaq -END_SR,5 ---- -Has,GT,$269 -Has,BBG,$360 -Has,LPS,$75 -Has,CV,$321 -Has,CPR,$315 -Has,CA,$60 -Has,TGB,$173 -Has,GW,$260 -Has,Matt,$9 -Has,Chris,$2 -Has,Brian,$34 -Has,Wesaq,$123 -START_OR,5.1 ---- -ReceivesFor,GW,$5,Flos -ReceivesFor,CPR,$10,TCC -ReceivesFor,Brian,$20,Brdg -ReceivesFor,LPS,$20,Tunn -CompanyOperates,GW,Chris -LaysTileAt,GW,57,H15,NW -CompanyRevenue,GW,$90 -CompanyMustPayLoanInterest,GW,$30 -InterestPaidFromTreasury,GW,$30 -CompanyPaysOutFull,GW,$90 -Payout,Chris,$27,3,10 -PRICE_MOVES_LOG,GW,$80,C1,$90,D1 -CompanyRepaysLoans,GW,$100,$100,1,$100 -CompanyOperates,BBG,Chris -LaysTileAt,BBG,57,J15,SW -CompanyDoesNotPayDividend,BBG -PRICE_MOVES_LOG,BBG,$75,E4,$70,D4 -BuysTrain,BBG,3,GW,$320 -CompanyOperates,CPR,Brian -LaysTileAt,CPR,14,P9,SW -LAYS_TOKEN_ON,CPR,N11,$100 -CompanyTakesLoan,CPR,$100,$100 -BuysPrivateFromFor,CPR,Brdg,Brian,$200 -AcquiresBonus,CPR,Bridge,$10,P17,P19 -CompanyRevenue,CPR,$230 -CompanyMustPayLoanInterest,CPR,$30 -InterestPaidFromTreasury,CPR,$30 -CompanyPaysOutFull,CPR,$230 -Payout,Brian,$138,6,10 -Payout,Wesaq,$69,3,10 -Payout,CPR,$23,1,10 -PRICE_MOVES_LOG,CPR,$70,G7,$75,G6 -CompanyOperates,CV,Brian -LaysTileAt,CV,14,L13,S -InterestPaidFromTreasury,CV,$20 -CompanyDoesNotPayDividend,CV -PRICE_MOVES_LOG,CV,$70,E5,$65,D5 -BuysTrain,CV,4,IPO,$350 -All 4-trains are sold out, 5-trains now available -CompanyOperates,GT,Wesaq -LAYS_TOKEN_ON,GT,M4,$100 -CompanyRevenue,GT,$110 -CompanyMustPayLoanInterest,GT,$20 -InterestPaidFromTreasury,GT,$20 -CompanyPaysOutFull,GT,$110 -Payout,Wesaq,$22,2,10 -Payout,GT,$33,3,10 -PRICE_MOVES_LOG,GT,$65,F7,$70,G7 -CompanyOperates,CA,Matt -LaysTileAt,CA,121,F15,SW -CompanyRevenue,CA,$140 -CompanyPaysOutFull,CA,$140 -Payout,Matt,$70,5,10 -Payout,CA,$56,4,10 -PRICE_MOVES_LOG,CA,$65,E6,$70,F6 -BuysBonusTokenFrom,CA,Tunnel,$10,LPS,$50 -CompanyOperates,TGB,Matt -LaysTileAt,TGB,9,J7,NW -CompanyRevenue,TGB,$70 -CompanyMustPayLoanInterest,TGB,$20 -InterestPaidFromTreasury,TGB,$20 -CompanyPaysOutFull,TGB,$70 -Payout,Matt,$14,2,10 -Payout,TGB,$21,3,10 -PRICE_MOVES_LOG,TGB,$55,E8,$60,F8 -CompanyRepaysLoans,TGB,$100,$100,1,$100 -CompanyOperates,LPS,Matt -LaysTileAt,LPS,8,D15,S -CompanyRevenue,LPS,$270 -CompanyMustPayLoanInterest,LPS,$40 -InterestPaidFromTreasury,LPS,$40 -CompanyPaysOutFull,LPS,$270 -Payout,Matt,$135,5,10 -Payout,Wesaq,$27,1,10 -PRICE_MOVES_LOG,LPS,$40,C9,$45,D9 -CompanyRepaysLoans,LPS,$100,$100,1,$100 -EndOfOperatingRound,5.1 ---- -Has,GT,$182 -Has,BBG,$40 -Has,LPS,$5 -Has,CV,$0 -Has,CPR,$118 -Has,CA,$66 -Has,TGB,$74 -Has,GW,$455 -Has,Matt,$228 -Has,Chris,$29 -Has,Brian,$343 -Has,Wesaq,$241 -START_OR,5.2 ---- -ReceivesFor,GW,$5,Flos -ReceivesFor,CPR,$10,TCC -ReceivesFor,CPR,$20,Brdg -ReceivesFor,LPS,$20,Tunn -CompanyOperates,GW,Chris -LaysTileAt,GW,8,I16,NW -InterestPaidFromTreasury,GW,$20 -CompanyDoesNotPayDividend,GW -PRICE_MOVES_LOG,GW,$90,D1,$80,C1 -PlayerMustSellShares,Chris,$81 -SELL_SHARES_LOG,Chris,1,10,10,GW,$80 -PRICE_MOVES_LOG,GW,$80,C1,$75,C2 -PlayerIsBankrupt,Chris -GameOver ---- -EoGWinnerMatt! -EoGFinalRanking : -1. $753 Matt -2. $703 Brian -3. $491 Wesaq -4. $359 Chris diff --git a/test/data/1856/finished/1856_A_OR5_b.txt b/test/data/1856/finished/1856_A_OR5_b.txt deleted file mode 100644 index 574aa04..0000000 --- a/test/data/1856/finished/1856_A_OR5_b.txt +++ /dev/null @@ -1,6 +0,0 @@ -Author: Justin Rebelo -4 players -Player Bankruptcy -Ends: OR5_2 -Date: 2010/03/19 - diff --git a/test/data/1856/pbem/1856_A_SR4.rails b/test/data/1856/pbem/1856_A_SR4.rails deleted file mode 100644 index 5cc1bcc..0000000 Binary files a/test/data/1856/pbem/1856_A_SR4.rails and /dev/null differ diff --git a/test/data/1856/pbem/1856_A_SR4.report b/test/data/1856/pbem/1856_A_SR4.report deleted file mode 100644 index c556329..0000000 --- a/test/data/1856/pbem/1856_A_SR4.report +++ /dev/null @@ -1,429 +0,0 @@ -GameIs,1856 -PlayerIs,1,Jim -PlayerIs,2,Chris -PlayerIs,3,Jon -PlayerCash,$500 -BankHas,$10500 -StartOfPhase,1 -BankSizeIs,$10500 -StartOfInitialRound -HasPriority,Jim ---- -BID_ITEM_LOG,Jim,$75,Ship,$425 -BID_ITEM_LOG,Chris,$80,Ship,$420 -BID_ITEM_LOG,Jon,$105,Brdg,$395 ---- -BuysItemFor,Jim,Flos,$20 -BuysItemFor,Chris,W&SR,$40 -PASSES,Jon ---- -BID_ITEM_LOG,Jim,$105,Tunn,$300 -BuysItemFor,Chris,TCC,$50 -TO_AUCTION,Ship -PASSES,Jim -BuysItemFor,Chris,Ship,$80 -BuysItemFor,Jon,Brdg,$105 -BuysItemFor,Jim,Tunn,$105 ---- -Has,Jim,$375 -Has,Chris,$330 -Has,Jon,$395 -StartStockRound,1 -HasPriority,Jon ---- -START_COMPANY_LOG,Jon,WR,$90,$180,2,20,WR -Floats,WR -START_COMPANY_LOG,Jim,LPS,$75,$150,2,20,LPS -Floats,LPS -START_COMPANY_LOG,Chris,GW,$65,$130,2,20,GW -Floats,GW ---- -BUY_SHARE_LOG,Jon,10,WR,IPO,$90 -PriceIsPaidTo,$90,WR -BUY_SHARE_LOG,Jim,10,LPS,IPO,$75 -PriceIsPaidTo,$75,LPS -BUY_SHARE_LOG,Chris,10,GW,IPO,$65 -PriceIsPaidTo,$65,GW ---- -BUY_SHARE_LOG,Jon,10,WR,IPO,$90 -PriceIsPaidTo,$90,WR -BUY_SHARE_LOG,Jim,10,LPS,IPO,$75 -PriceIsPaidTo,$75,LPS -BUY_SHARE_LOG,Chris,10,GW,IPO,$65 -PriceIsPaidTo,$65,GW ---- -PASSES,Jon -BUY_SHARE_LOG,Jim,10,LPS,IPO,$75 -PriceIsPaidTo,$75,LPS -BUY_SHARE_LOG,Chris,10,GW,IPO,$65 -PriceIsPaidTo,$65,GW ---- -Autopasses,Jon -PASSES,Jim -PASSES,Chris -END_SR,1 ---- -Has,LPS,$375 -Has,WR,$360 -Has,GW,$325 -Has,Jim,$0 -Has,Chris,$5 -Has,Jon,$35 -START_OR,1.1 ---- -ReceivesFor,Jim,$5,Flos -ReceivesFor,Chris,$10,W&SR -ReceivesFor,Chris,$10,TCC -ReceivesFor,Chris,$15,Ship -ReceivesFor,Jon,$20,Brdg -ReceivesFor,Jim,$20,Tunn -CompanyOperates,WR,Jon -LaysTileAt,WR,5,O16,SW -CompanyDoesNotPayDividend,WR -PRICE_MOVES_LOG,WR,$90,E2,$80,D2 -BuysTrain,WR,2,IPO,$100 -FirstTrainBought,2 -BuysTrain,WR,2,IPO,$100 -BuysTrain,WR,2,IPO,$100 -CompanyOperates,LPS,Jim -LaysTileAt,LPS,5,C14,N -CompanyDoesNotPayDividend,LPS -PRICE_MOVES_LOG,LPS,$75,E4,$70,D4 -BuysTrain,LPS,2,IPO,$100 -BuysTrain,LPS,2,IPO,$100 -CompanyTakesLoan,LPS,$100,$90 -CompanyOperates,GW,Chris -LaysTileAt,GW,6,F17,NE -CompanyTakesLoan,GW,$100,$100 -InterestPaidFromTreasury,GW,$10 -CompanyDoesNotPayDividend,GW -PRICE_MOVES_LOG,GW,$65,E6,$60,D6 -BuysTrain,GW,2,IPO,$100 -All 2-trains are sold out, 3-trains now available -BuysTrain,GW,3,IPO,$225 -FirstTrainBought,3 -StartOfPhase,2 -BuysPrivateFromFor,GW,Ship,Chris,$90 -EndOfOperatingRound,1.1 ---- -Has,LPS,$265 -Has,WR,$60 -Has,GW,$0 -Has,Jim,$25 -Has,Chris,$130 -Has,Jon,$55 -StartStockRound,2 -HasPriority,Jon ---- -Autopasses,Jon -PASSES,Jim -BUY_SHARE_LOG,Chris,10,GW,IPO,$65 -HoldMoneyInEscrow,$65,$65,GW ---- -Autopasses,Jon -PASSES,Jim -PASSES,Chris -END_SR,2 ---- -Has,LPS,$265 -Has,WR,$60 -Has,GW,$0 -Has,Jim,$25 -Has,Chris,$65 -Has,Jon,$55 -START_OR,2.1 ---- -ReceivesFor,Jim,$5,Flos -ReceivesFor,Chris,$10,W&SR -ReceivesFor,Chris,$10,TCC -ReceivesFor,GW,$15,Ship -ReceivesFor,Jon,$20,Brdg -ReceivesFor,Jim,$20,Tunn -CompanyOperates,WR,Jon -CompanyTakesLoan,WR,$100,$100 -LaysTileAt,WR,6,O18,S -LAYS_TOKEN_ON,WR,O18,$40 -BuysPrivateFromFor,WR,Brdg,Jon,$120 -AcquiresBonus,WR,Bridge,$10,P17,P19 -CompanyRevenue,WR,$160 -CompanyMustPayLoanInterest,WR,$10 -InterestPaidFromRevenue,WR,$10,$10 -CompanyPaysOutFull,WR,$150 -Payout,Jon,$60,4,10 -PRICE_MOVES_LOG,WR,$80,D2,$90,E2 -CompanyOperates,LPS,Jim -BuysPrivateFromFor,LPS,Tunn,Jim,$200 -AcquiresBonus,LPS,Tunnel,$10,B13 -LaysTileAt,LPS,7,B15,N -CompanyRevenue,LPS,$120 -CompanyMustPayLoanInterest,LPS,$10 -InterestPaidFromTreasury,LPS,$10 -CompanyPaysOutFull,LPS,$120 -Payout,Jim,$60,5,10 -PRICE_MOVES_LOG,LPS,$70,D4,$75,E4 -CompanyTakesLoan,LPS,$100,$90 -CompanyOperates,GW,Chris -LaysTileAt,GW,56,E18,N -LaysBonusTokenOn,GW,Port,$20,F17 -PrivateCloses,Ship -CompanyTakesLoan,GW,$100,$100 -LAYS_TOKEN_ON,GW,F17,$40 -CompanyRevenue,GW,$120 -CompanyMustPayLoanInterest,GW,$20 -InterestPaidFromTreasury,GW,$20 -CompanyPaysOutFull,GW,$120 -Payout,Chris,$72,6,10 -PRICE_MOVES_LOG,GW,$60,D6,$65,E6 -EndOfOperatingRound,2.1 ---- -Has,LPS,$145 -Has,WR,$0 -Has,GW,$55 -Has,Jim,$310 -Has,Chris,$157 -Has,Jon,$255 -START_OR,2.2 ---- -ReceivesFor,Jim,$5,Flos -ReceivesFor,Chris,$10,W&SR -ReceivesFor,Chris,$10,TCC -ReceivesFor,WR,$20,Brdg -ReceivesFor,LPS,$20,Tunn -CompanyOperates,WR,Jon -LaysTileAt,WR,15,O18,NW -CompanyTakesLoan,WR,$100,$100 -CompanyRevenue,WR,$200 -CompanyMustPayLoanInterest,WR,$20 -InterestPaidFromTreasury,WR,$20 -CompanyPaysOutFull,WR,$200 -Payout,Jon,$80,4,10 -PRICE_MOVES_LOG,WR,$90,E2,$100,F2 -CompanyOperates,LPS,Jim -LaysTileAt,LPS,15,C14,SE -CompanyRevenue,LPS,$140 -CompanyMustPayLoanInterest,LPS,$20 -InterestPaidFromTreasury,LPS,$20 -CompanyPaysOutFull,LPS,$140 -Payout,Jim,$70,5,10 -PRICE_MOVES_LOG,LPS,$75,E4,$80,F4 -CompanyTakesLoan,LPS,$100,$90 -BuysTrain,LPS,3,IPO,$225 -CompanyOperates,GW,Chris -LaysTileAt,GW,6,D17,NW -CompanyRevenue,GW,$140 -CompanyMustPayLoanInterest,GW,$20 -InterestPaidFromTreasury,GW,$20 -CompanyPaysOutFull,GW,$140 -Payout,Chris,$84,6,10 -PRICE_MOVES_LOG,GW,$65,E6,$70,F6 -CompanyTakesLoan,GW,$100,$90 -BuysPrivateFromFor,GW,TCC,Chris,$100 -EndOfOperatingRound,2.2 ---- -Has,LPS,$10 -Has,WR,$100 -Has,GW,$25 -Has,Jim,$385 -Has,Chris,$361 -Has,Jon,$335 -StartStockRound,3 -HasPriority,Jon ---- -BUY_SHARE_LOG,Jon,10,WR,IPO,$90 -PriceIsPaidTo,$90,WR -START_COMPANY_LOG,Jim,CA,$75,$150,2,20,CA -SELL_SHARE_LOG,Chris,10,GW,$70 -PRICE_MOVES_LOG,GW,$70,F6,$65,F7 -START_COMPANY_LOG,Chris,CPR,$100,$200,2,20,CPR ---- -BUY_SHARE_LOG,Jon,10,GW,Pool,$65 -BUY_SHARE_LOG,Jim,10,CA,IPO,$75 -PriceIsPaidTo,$75,CA -Floats,CA -BUY_SHARE_LOG,Chris,10,CPR,IPO,$100 -PriceIsPaidTo,$100,CPR -Floats,CPR ---- -BUY_SHARE_LOG,Jon,10,LPS,IPO,$75 -HoldMoneyInEscrow,$75,$75,LPS -BUY_SHARE_LOG,Jim,10,CA,IPO,$75 -PriceIsPaidTo,$75,CA -BUY_SHARE_LOG,Chris,10,CPR,IPO,$100 -PriceIsPaidTo,$100,CPR ---- -BUY_SHARE_LOG,Jon,10,WR,IPO,$90 -HoldMoneyInEscrow,$90,$90,WR -BUY_SHARE_LOG,Jim,10,CA,IPO,$75 -PriceIsPaidTo,$75,CA -PASSES,Chris ---- -PASSES,Jon -Autopasses,Jim -END_SR,3 ---- -Has,LPS,$10 -Has,WR,$190 -Has,CPR,$400 -Has,CA,$375 -Has,GW,$25 -Has,Jim,$10 -Has,Chris,$31 -Has,Jon,$15 -START_OR,3.1 ---- -ReceivesFor,Jim,$5,Flos -ReceivesFor,Chris,$10,W&SR -ReceivesFor,GW,$10,TCC -ReceivesFor,WR,$20,Brdg -ReceivesFor,LPS,$20,Tunn -CompanyOperates,WR,Jon -LaysTileAt,WR,59,N17,SW -CompanyTakesLoan,WR,$100,$100 -CompanyRevenue,WR,$210 -CompanyMustPayLoanInterest,WR,$30 -InterestPaidFromTreasury,WR,$30 -CompanyPaysOutFull,WR,$210 -Payout,Jon,$126,6,10 -PRICE_MOVES_LOG,WR,$100,F2,$110,G2 -BuysTrain,WR,3,IPO,$225 -CompanyOperates,CPR,Chris -LaysTileAt,CPR,4,M6,S -CompanyDoesNotPayDividend,CPR -PRICE_MOVES_LOG,CPR,$100,E1,$90,D1 -BuysTrain,CPR,3,IPO,$225 -CompanyTakesLoan,CPR,$100,$90 -CompanyOperates,LPS,Jim -LaysTileAt,LPS,8,C16,N -CompanyTakesLoan,LPS,$100,$100 -CompanyRevenue,LPS,$140 -CompanyMustPayLoanInterest,LPS,$40 -InterestPaidFromTreasury,LPS,$40 -CompanyWithholds,LPS,$140 -PRICE_MOVES_LOG,LPS,$80,F4,$75,E4 -BuysTrain,LPS,3,IPO,$225 -All 3-trains are sold out, 4-trains now available -CompanyOperates,CA,Jim -LaysTileAt,CA,14,D17,SW -DestinationReached,LPS,F17 -ReleasedFromEscrow,LPS,$75 -CompanyDoesNotPayDividend,CA -PRICE_MOVES_LOG,CA,$75,E4,$70,D4 -BuysTrain,CA,4,IPO,$350 -FirstTrainBought,4 -StartOfPhase,3 -TrainsRusted,2 -CompanyTakesLoan,CA,$100,$90 -BuysTrain,CA,3,LPS,$40 -CompanyOperates,GW,Chris -LaysTileAt,GW,9,C18,SW -CompanyTakesLoan,GW,$100,$100 -LAYS_TOKEN_ON,GW,D17,$100 -CompanyRevenue,GW,$90 -CompanyMustPayLoanInterest,GW,$40 -InterestPartlyPaidFromTreasury,GW,$30,$40 -InterestPaidFromRevenue,GW,$10,$40 -CompanyPaysOutFull,GW,$80 -Payout,Jon,$8,1,10 -Payout,Chris,$40,5,10 -PRICE_MOVES_LOG,GW,$65,F7,$70,G7 -EndOfOperatingRound,3.1 ---- -Has,LPS,$120 -Has,WR,$55 -Has,CPR,$265 -Has,CA,$75 -Has,GW,$5 -Has,Jim,$15 -Has,Chris,$81 -Has,Jon,$149 -START_OR,3.2 ---- -ReceivesFor,Jim,$5,Flos -ReceivesFor,Chris,$10,W&SR -ReceivesFor,GW,$10,TCC -ReceivesFor,WR,$20,Brdg -ReceivesFor,LPS,$20,Tunn -CompanyOperates,WR,Jon -LaysTileAt,WR,15,O16,SE -CompanyTakesLoan,WR,$100,$100 -CompanyRevenue,WR,$110 -CompanyMustPayLoanInterest,WR,$40 -InterestPaidFromTreasury,WR,$40 -CompanyPaysOutFull,WR,$110 -Payout,Jon,$66,6,10 -PRICE_MOVES_LOG,WR,$110,G2,$125,H2 -CompanyOperates,CPR,Chris -LaysTileAt,CPR,8,M8,N -CompanyTakesLoan,CPR,$100,$100 -BuysPrivateFromFor,CPR,W&SR,Chris,$80 -CompanyRevenue,CPR,$40 -CompanyMustPayLoanInterest,CPR,$20 -InterestPaidFromTreasury,CPR,$20 -CompanyPaysOutFull,CPR,$40 -Payout,Chris,$16,4,10 -PRICE_MOVES_LOG,CPR,$90,D1,$100,E1 -CompanyOperates,LPS,Jim -LaysTileAt,LPS,9,D15,NW -CompanyRevenue,LPS,$100 -CompanyMustPayLoanInterest,LPS,$40 -InterestPaidFromTreasury,LPS,$40 -CompanyPaysOutFull,LPS,$100 -Payout,Jon,$10,1,10 -Payout,Jim,$50,5,10 -PRICE_MOVES_LOG,LPS,$75,E4,$80,F4 -BuysPrivateFromFor,LPS,Flos,Jim,$40 -CompanyOperates,GW,Chris -LaysTileAt,GW,57,B19,SW -DestinationReached,GW,A20 -ReleasedFromEscrow,GW,$65 -CompanyTakesLoan,GW,$100,$100 -CompanyRevenue,GW,$90 -CompanyMustPayLoanInterest,GW,$50 -InterestPaidFromTreasury,GW,$50 -CompanyPaysOutFull,GW,$90 -Payout,Jon,$9,1,10 -Payout,Chris,$45,5,10 -PRICE_MOVES_LOG,GW,$70,G7,$75,G6 -CompanyOperates,CA,Jim -LaysTileAt,CA,7,E16,SW -BuysBonusTokenFrom,CA,Tunnel,$10,LPS,$50 -CompanyRevenue,CA,$220 -CompanyMustPayLoanInterest,CA,$10 -InterestPaidFromTreasury,CA,$10 -CompanyPaysOutFull,CA,$220 -Payout,Jim,$110,5,10 -PRICE_MOVES_LOG,CA,$70,D4,$75,E4 -EndOfOperatingRound,3.2 ---- -Has,LPS,$110 -Has,WR,$135 -Has,CPR,$265 -Has,CA,$15 -Has,GW,$130 -Has,Jim,$220 -Has,Chris,$232 -Has,Jon,$234 -StartStockRound,4 -HasPriority,Chris ---- -BUY_SHARE_LOG,Chris,10,GW,IPO,$65 -PriceIsPaidTo,$65,GW -SELL_SHARE_LOG,Chris,10,GW,$75 -PRICE_MOVES_LOG,GW,$75,G6,$70,G7 -SELL_SHARE_LOG,Jon,10,GW,$70 -PRICE_STAYS_LOG,GW,$70,G7 -SELL_SHARE_LOG,Jon,10,WR,$125 -PRICE_MOVES_LOG,WR,$125,H2,$110,H3 -SELL_SHARE_LOG,Jon,10,LPS,$80 -PRICE_MOVES_LOG,LPS,$80,F4,$75,F5 -START_COMPANY_LOG,Jon,THB,$100,$200,2,20,THB -BUY_SHARE_LOG,Jim,10,CA,IPO,$75 -HoldMoneyInEscrow,$75,$75,CA ---- -BUY_SHARE_LOG,Chris,10,CPR,IPO,$100 -PriceIsPaidTo,$100,CPR -BUY_SHARE_LOG,Jon,10,THB,IPO,$100 -PriceIsPaidTo,$100,THB -BUY_SHARE_LOG,Jim,10,LPS,IPO,$75 -PriceIsPaidTo,$75,LPS ---- diff --git a/test/data/1856/pbem/1856_A_SR4.txt b/test/data/1856/pbem/1856_A_SR4.txt deleted file mode 100644 index 83ffc2e..0000000 --- a/test/data/1856/pbem/1856_A_SR4.txt +++ /dev/null @@ -1,4 +0,0 @@ -Author: Chris Schaffer -3 players -State: in progress -Date: 2010/03/24 diff --git a/test/data/1889/pbem/1889_A_OR6.rails b/test/data/1889/pbem/1889_A_OR6.rails deleted file mode 100644 index 24cabfd..0000000 Binary files a/test/data/1889/pbem/1889_A_OR6.rails and /dev/null differ diff --git a/test/data/1889/pbem/1889_A_OR6.report b/test/data/1889/pbem/1889_A_OR6.report deleted file mode 100644 index f66f5b4..0000000 --- a/test/data/1889/pbem/1889_A_OR6.report +++ /dev/null @@ -1,625 +0,0 @@ -GameIs,1889 -PlayerIs,1,Phil -PlayerIs,2,Simon -PlayerIs,3,Chris -PlayerCash,Â¥420 -BankHas,Â¥5740 -StartOfPhase,2 -BankSizeIs,Â¥5740 -StartOfInitialRound -HasPriority,Phil ---- -BID_ITEM_LOG,Phil,Â¥55,D,Â¥365 -BID_ITEM_LOG,Simon,Â¥35,B,Â¥385 -BID_ITEM_LOG,Chris,Â¥40,B,Â¥380 ---- -BID_ITEM_LOG,Phil,Â¥45,C,Â¥320 -BID_ITEM_LOG,Simon,Â¥60,D,Â¥325 -BID_ITEM_LOG,Chris,Â¥50,C,Â¥330 ---- -BID_ITEM_LOG,Phil,Â¥65,E,Â¥255 -BID_ITEM_LOG,Simon,Â¥85,F,Â¥240 -BID_ITEM_LOG,Chris,Â¥65,D,Â¥265 ---- -BuysItemFor,Phil,A,Â¥20 -TO_AUCTION,B -BID_ITEM_LOG,Simon,Â¥45,B,Â¥230 -BID_ITEM_LOG,Chris,Â¥50,B,Â¥255 -PASSES,Simon -BuysItemFor,Chris,B,Â¥50 -TO_AUCTION,C -PASSES,Phil -BuysItemFor,Chris,C,Â¥50 -TO_AUCTION,D -BID_ITEM_LOG,Phil,Â¥70,D,Â¥265 -BID_ITEM_LOG,Simon,Â¥75,D,Â¥260 -PASSES,Chris -BID_ITEM_LOG,Phil,Â¥80,D,Â¥255 -PASSES,Simon -PASSES,Chris -BuysItemFor,Phil,D,Â¥80 -BuysItemFor,Phil,E,Â¥65 -BuysItemFor,Simon,F,Â¥85 ---- -Has,Phil,Â¥255 -Has,Simon,Â¥335 -Has,Chris,Â¥320 -StartStockRound,1 -HasPriority,Simon ---- -START_COMPANY_LOG,Simon,SR,Â¥65,Â¥130,2,20,BANK -START_COMPANY_LOG,Chris,UR,Â¥90,Â¥180,2,20,BANK -BUY_SHARE_LOG,Phil,10,UR,IPO,Â¥90 ---- -BUY_SHARE_LOG,Simon,10,SR,IPO,Â¥65 -BUY_SHARE_LOG,Chris,10,UR,IPO,Â¥90 -BUY_SHARE_LOG,Phil,10,UR,IPO,Â¥90 -FloatsWithCash,UR,Â¥900 ---- -BUY_SHARE_LOG,Simon,10,SR,IPO,Â¥65 -PASSES,Chris -BUY_SHARE_LOG,Phil,10,SR,IPO,Â¥65 -FloatsWithCash,SR,Â¥650 ---- -BUY_SHARE_LOG,Simon,10,SR,IPO,Â¥65 -PASSES,Chris -PASSES,Phil ---- -PASSES,Simon -END_SR,1 ---- -Has,SR,Â¥650 -Has,UR,Â¥900 -Has,Phil,Â¥10 -Has,Simon,Â¥10 -Has,Chris,Â¥50 -START_OR,1.1 ---- -ReceivesFor,Phil,Â¥5,A -ReceivesFor,Chris,Â¥5,B -ReceivesFor,Chris,Â¥10,C -ReceivesFor,Phil,Â¥15,D -ReceivesFor,Phil,Â¥15,E -ReceivesFor,Simon,Â¥20,F -CompanyOperates,UR,Chris -LaysTileAt,UR,9,B5,S -CompanyDoesNotPayDividend,UR -PRICE_MOVES_LOG,UR,Â¥90,D2,Â¥80,C2 -BuysTrain,UR,2,IPO,Â¥80 -FirstTrainBought,2 -BuysTrain,UR,2,IPO,Â¥80 -CompanyOperates,SR,Simon -LaysTileAt,SR,6,I2,SW -CompanyDoesNotPayDividend,SR -PRICE_MOVES_LOG,SR,Â¥65,D6,Â¥60,C6 -BuysTrain,SR,2,IPO,Â¥80 -BuysTrain,SR,2,IPO,Â¥80 -EndOfOperatingRound,1.1 ---- -Has,SR,Â¥490 -Has,UR,Â¥740 -Has,Phil,Â¥45 -Has,Simon,Â¥30 -Has,Chris,Â¥65 -StartStockRound,2 -HasPriority,Chris ---- -PASSES,Chris -PASSES,Phil -PASSES,Simon -END_SR,2 ---- -Has,SR,Â¥490 -Has,UR,Â¥740 -Has,Phil,Â¥45 -Has,Simon,Â¥30 -Has,Chris,Â¥65 -START_OR,2.1 ---- -ReceivesFor,Phil,Â¥5,A -ReceivesFor,Chris,Â¥5,B -ReceivesFor,Chris,Â¥10,C -ReceivesFor,Phil,Â¥15,D -ReceivesFor,Phil,Â¥15,E -ReceivesFor,Simon,Â¥20,F -CompanyOperates,UR,Chris -LaysTileAt,UR,8,C8,S -LAYS_TOKEN_ON,UR,C4,Â¥40 -CompanyRevenue,UR,Â¥100 -CompanyPaysOutFull,UR,Â¥100 -Payout,Phil,Â¥20,2,10 -Payout,Chris,Â¥30,3,10 -PRICE_MOVES_LOG,UR,Â¥80,C2,Â¥90,D2 -BuysTrain,UR,2,IPO,Â¥80 -CompanyOperates,SR,Simon -LaysTileAtFor,SR,438,I4,NE,Â¥80 -CompanyRevenue,SR,Â¥100 -CompanyPaysOutFull,SR,Â¥100 -Payout,Phil,Â¥10,1,10 -Payout,Simon,Â¥50,5,10 -PRICE_MOVES_LOG,SR,Â¥60,C6,Â¥65,D6 -BuysTrain,SR,2,IPO,Â¥80 -All 2-trains are sold out, 3-trains now available -EndOfOperatingRound,2.1 ---- -Has,SR,Â¥330 -Has,UR,Â¥620 -Has,Phil,Â¥110 -Has,Simon,Â¥100 -Has,Chris,Â¥110 -StartStockRound,3 -HasPriority,Chris ---- -BUY_SHARE_LOG,Chris,10,UR,IPO,Â¥90 -BUY_SHARE_LOG,Phil,10,UR,IPO,Â¥90 -BUY_SHARE_LOG,Simon,10,UR,IPO,Â¥90 ---- -Autopasses,Chris -Autopasses,Phil -PASSES,Simon -END_SR,3 ---- -Has,SR,Â¥330 -Has,UR,Â¥620 -Has,Phil,Â¥20 -Has,Simon,Â¥10 -Has,Chris,Â¥20 -START_OR,3.1 ---- -ReceivesFor,Phil,Â¥5,A -ReceivesFor,Chris,Â¥5,B -ReceivesFor,Chris,Â¥10,C -ReceivesFor,Phil,Â¥15,D -ReceivesFor,Phil,Â¥15,E -ReceivesFor,Simon,Â¥20,F -CompanyOperates,UR,Chris -LaysTileAt,UR,6,C10,NE -LaysTileAt,UR,437,B11,NW -CompanyRevenue,UR,Â¥160 -CompanyPaysOutFull,UR,Â¥160 -Payout,Simon,Â¥16,1,10 -Payout,Phil,Â¥48,3,10 -Payout,Chris,Â¥64,4,10 -PRICE_MOVES_LOG,UR,Â¥90,D2,Â¥100,E2 -BuysTrain,UR,3,IPO,Â¥180 -FirstTrainBought,3 -StartOfPhase,3 -BuysPrivateFromFor,UR,D,Phil,Â¥100 -BuysPrivateFromFor,UR,B,Chris,Â¥60 -BuysPrivateFromFor,UR,C,Chris,Â¥80 -LaysTileAt,UR,14,C4,SW -CompanyOperates,SR,Simon -LaysTileAt,SR,58,J5,NW -LAYS_TOKEN_ON,SR,I4,Â¥40 -CompanyRevenue,SR,Â¥150 -CompanyPaysOutFull,SR,Â¥150 -Payout,Phil,Â¥15,1,10 -Payout,Simon,Â¥75,5,10 -PRICE_MOVES_LOG,SR,Â¥65,D6,Â¥70,E6 -BuysTrain,SR,3,IPO,Â¥180 -BuysPrivateFromFor,SR,F,Simon,Â¥110 -EndOfOperatingRound,3.1 ---- -Has,SR,Â¥0 -Has,UR,Â¥200 -Has,Phil,Â¥218 -Has,Simon,Â¥231 -Has,Chris,Â¥239 -StartStockRound,4 -HasPriority,Chris ---- -BUY_SHARE_LOG,Chris,10,UR,IPO,Â¥90 -START_COMPANY_LOG,Phil,IR,Â¥80,Â¥160,2,20,BANK -SELL_SHARE_LOG,Simon,10,UR,Â¥100 -PRICE_MOVES_LOG,UR,Â¥100,E2,Â¥90,E3 -START_COMPANY_LOG,Simon,KO,Â¥65,Â¥130,2,20,BANK ---- -BUY_SHARE_LOG,Chris,10,IR,IPO,Â¥80 -SELL_SHARE_LOG,Phil,10,SR,Â¥70 -PRICE_MOVES_LOG,SR,Â¥70,E6,Â¥65,E7 -BUY_SHARE_LOG,Phil,10,IR,IPO,Â¥80 -BUY_SHARE_LOG,Simon,10,KO,IPO,Â¥65 ---- -BUY_SHARE_LOG,Chris,10,SR,IPO,Â¥65 -CorrectionModeActivate,Phil,CORRECT_CASH -CorrectCashAddMoney,Phil,Â¥80 -CorrectionModeDeactivate,Phil,CORRECT_CASH -BUY_SHARE_LOG,Phil,10,IR,IPO,Â¥80 -FloatsWithCash,IR,Â¥800 -BUY_SHARE_LOG,Simon,10,KO,IPO,Â¥65 ---- -PASSES,Chris -PASSES,Phil -BUY_SHARE_LOG,Simon,10,KO,IPO,Â¥65 -FloatsWithCash,KO,Â¥650 ---- -PASSES,Chris -PASSES,Phil -PASSES,Simon -END_SR,4 ---- -Has,IR,Â¥800 -Has,SR,Â¥0 -Has,KO,Â¥650 -Has,UR,Â¥200 -Has,Phil,Â¥48 -Has,Simon,Â¥6 -Has,Chris,Â¥4 -START_OR,4.1 ---- -ReceivesFor,Phil,Â¥5,A -ReceivesFor,UR,Â¥5,B -ReceivesFor,UR,Â¥10,C -ReceivesFor,UR,Â¥15,D -ReceivesFor,Phil,Â¥15,E -ReceivesFor,SR,Â¥20,F -CompanyOperates,UR,Chris -CorrectionModeActivate,Chris,CORRECT_CASH -CorrectCashSubstractMoney,Phil,Â¥15 -CorrectionModeDeactivate,Chris,CORRECT_CASH -LaysTileAt,UR,206,C10,SE -CompanyRevenue,UR,Â¥210 -CompanyPaysOutFull,UR,Â¥210 -Payout,Phil,Â¥63,3,10 -Payout,Chris,Â¥105,5,10 -Payout,UR,Â¥21,1,10 -PRICE_MOVES_LOG,UR,Â¥90,E3,Â¥100,F3 -CompanyOperates,IR,Phil -LaysTileAt,IR,5,E2,S -CompanyDoesNotPayDividend,IR -PRICE_MOVES_LOG,IR,Â¥80,D3,Â¥75,C3 -BuysTrain,IR,3,IPO,Â¥180 -BuysTrain,IR,3,IPO,Â¥180 -CompanyOperates,SR,Simon -CompanyRevenue,SR,Â¥180 -CompanyPaysOutFull,SR,Â¥180 -Payout,Chris,Â¥18,1,10 -Payout,Simon,Â¥90,5,10 -Payout,SR,Â¥18,1,10 -PRICE_MOVES_LOG,SR,Â¥65,E7,Â¥70,F7 -CompanyOperates,KO,Simon -LaysTileAtFor,KO,439,I4,S,Â¥80 -CompanyDoesNotPayDividend,KO -PRICE_MOVES_LOG,KO,Â¥65,D6,Â¥60,C6 -BuysTrain,KO,3,IPO,Â¥180 -All 3-trains are sold out, 4-trains now available -BuysTrain,KO,2,SR,Â¥250 -EndOfOperatingRound,4.1 ---- -Has,IR,Â¥440 -Has,SR,Â¥288 -Has,KO,Â¥140 -Has,UR,Â¥251 -Has,Phil,Â¥116 -Has,Simon,Â¥96 -Has,Chris,Â¥127 -START_OR,4.2 ---- -ReceivesFor,Phil,Â¥5,A -ReceivesFor,UR,Â¥5,B -ReceivesFor,UR,Â¥10,C -ReceivesFor,UR,Â¥15,D -ReceivesFor,Phil,Â¥15,E -ReceivesFor,SR,Â¥20,F -CompanyOperates,UR,Chris -CorrectionModeActivate,Chris,CORRECT_CASH -CorrectCashSubstractMoney,Phil,Â¥15 -CorrectionModeDeactivate,Chris,CORRECT_CASH -LaysTileAt,UR,9,D3,SW -CompanyRevenue,UR,Â¥210 -CompanyPaysOutFull,UR,Â¥210 -Payout,Phil,Â¥63,3,10 -Payout,Chris,Â¥105,5,10 -Payout,UR,Â¥21,1,10 -PRICE_MOVES_LOG,UR,Â¥100,F3,Â¥110,G3 -CompanyOperate... [truncated message content] |
From: Erik V. <ev...@us...> - 2011-07-30 20:49:52
|
data/1825/CompanyManager.xml | 4 data/1825/Game.xml | 21 - data/1826/CompanyManager.xml | 2 data/1826/Game.xml | 26 + data/1830/CompanyManager.xml | 2 data/1830/Game.xml | 49 ++- data/1851/CompanyManager.xml | 2 data/1851/Game.xml | 28 + data/1856/CompanyManager.xml | 2 data/1856/Game.xml | 25 - data/1870/CompanyManager.xml | 2 data/1870/Game.xml | 57 ++- data/1880/Game.xml | 304 ++++++++++--------- data/1889/CompanyManager.xml | 2 data/1889/Game.xml | 28 + data/18AL/CompanyManager.xml | 2 data/18AL/Game.xml | 37 +- data/18EU/CompanyManager.xml | 4 data/18EU/Game.xml | 245 ++++++++-------- data/18GA/CompanyManager.xml | 2 data/18GA/Game.xml | 224 +++++++------- data/18JR/CompanyManager.xml | 2 data/18JR/Game.xml | 321 ++++++++++----------- data/18Kaas/CompanyManager.xml | 2 data/18Kaas/Game.xml | 51 +-- data/18Scan/CompanyManager.xml | 6 data/18Scan/Game.xml | 198 ++++++------ data/18TN/CompanyManager.xml | 2 data/18TN/Game.xml | 18 - data/18VA/CompanyManager.xml | 2 data/18VA/Game.xml | 233 +++++++-------- rails/game/GameManager.java | 2 rails/game/Phase.java | 17 - rails/game/PhaseManager.java | 18 - rails/game/PublicCompany.java | 10 rails/game/TrainCertificateType.java | 98 ------ rails/game/TrainManager.java | 2 rails/game/TrainType.java | 1 rails/game/specific/_1856/OperatingRound_1856.java | 6 39 files changed, 1005 insertions(+), 1052 deletions(-) New commits: commit db9eb87965fba93ef69c12247c4df97dd62e2782 Author: Erik Vos <eri...@xs...> Date: Sat Jul 30 22:44:39 2011 +0200 Finished phase management steps 1-3 Converted all remaining games. Reformatted several XML files. Removed now redundant code. diff --git a/data/1825/CompanyManager.xml b/data/1825/CompanyManager.xml index 3fc9bea..3785510 100644 --- a/data/1825/CompanyManager.xml +++ b/data/1825/CompanyManager.xml @@ -14,9 +14,9 @@ </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains limit="4,4,3"/> + <Trains limit="4,3"/> <TileLays> - <Number colour="yellow" number="2" phase="1,2,3,4,5"></Number></TileLays></CompanyType> + <Number colour="yellow" number="2" phase="1,2,3,4"></Number></TileLays></CompanyType> <Company name="S&M" type="Private" basePrice="30" revenue="5" longname="Swansea and Mumbles"> </Company> <Company name="CHP" type="Private" basePrice="75" revenue="12" diff --git a/data/1825/Game.xml b/data/1825/Game.xml index 6c4570d..608dad5 100644 --- a/data/1825/Game.xml +++ b/data/1825/Game.xml @@ -57,24 +57,16 @@ <Component name="TrainManager" class="rails.game.TrainManager"> <Defaults> <Reach base="stops" countTowns="yes"/> - <!-- Alternative values: - base="hexes" for H-trains as in 1826, 1849 etc. - countTowns="no" for all trains in 1841, 18EU, etc., - where towns score but do not count against the train length. - Otherwise, towns are counted as minor or major stops, - depending on the presence or absence of a "minorStops" value. - --> <Score towns="yes"/> - <!-- Alternative values: - towns="no" for trains that ignore towns (e.g. 1826 TGV). - cities="double" if city-revenue is doubled (e.g. 1826 TGV). - --> </Defaults> <TrainType name="2" majorStops="2" cost="180" quantity="6"/> - <TrainType name="3" majorStops="3" cost="300" quantity="4" startPhase="2"/> + <TrainType name="3" majorStops="3" cost="300" quantity="4"> + <NewPhase phaseName="2"/> + </TrainType> <TrainType name="4" majorStops="4" cost="430" quantity="3"/> - <TrainType name="5" majorStops="5" cost="550" quantity="4" - startPhase="3" rustedTrain="2" /> + <TrainType name="5" majorStops="5" cost="550" quantity="4"> + <NewPhase phaseName="3"/> + </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <!-- Note: released and rusted trains are now specified per TrainType @@ -92,6 +84,7 @@ </Phase> <Phase name="3"> <Tiles colour="yellow,green,brown"/> + <Trains rusted="2" limitStep="2"/> <OperatingRounds number="3"/> </Phase> </Component> diff --git a/data/1826/CompanyManager.xml b/data/1826/CompanyManager.xml index 35e6731..9d06d08 100644 --- a/data/1826/CompanyManager.xml +++ b/data/1826/CompanyManager.xml @@ -18,7 +18,7 @@ <HomeBase lay="firstOR"/> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains number="4,4,3,2"/> + <Trains limit="4,3,2"/> <CanBuyPrivates/> <CanUseSpecialProperties/> </CompanyType> diff --git a/data/1826/Game.xml b/data/1826/Game.xml index 9877cbc..692cb6f 100644 --- a/data/1826/Game.xml +++ b/data/1826/Game.xml @@ -70,14 +70,21 @@ --> </Defaults> <TrainType name="2H" majorStops="2" cost="100" quantity="8"/> - <TrainType name="4H" majorStops="4" cost="200" quantity="7" startPhase="4H"/> - <TrainType name="6H" majorStops="6" cost="300" quantity="6" startPhase="6H" - rustedTrain="2H"/> - <TrainType name="10H" majorStops="10" cost="600" quantity="5" startPhase="10H" - rustedTrain="4H"/> - <TrainType name="E" majorStops="6" cost="800" quantity="4" startPhase="E" - rustedTrain="6H"/> - <TrainType name="TGV" majorStops="4" cost="1000" quantity="10" startPhase="TGV"/> + <TrainType name="4H" majorStops="4" cost="200" quantity="7"> + <NewPhase phaseName="4H"/> + </TrainType> + <TrainType name="6H" majorStops="6" cost="300" quantity="6"> + <NewPhase phaseName="6H"/> + </TrainType> + <TrainType name="10H" majorStops="10" cost="600" quantity="5"> + <NewPhase phaseName="10H"/> + </TrainType> + <TrainType name="E" majorStops="6" cost="800" quantity="4"> + <NewPhase phaseName="E"/> + </TrainType> + <TrainType name="TGV" majorStops="4" cost="1000" quantity="10"> + <NewPhase phaseName="TGV"/> + </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> <Phase name="2H" > @@ -90,12 +97,15 @@ <OperatingRounds number="2"/> </Phase> <Phase name="6H" > + <Trains rusted="2H" limitStep="2"/> </Phase> <Phase name="10H" > <Tiles colour="yellow,green,brown"/> + <Trains rusted="4H" limitStep="3"/> <OperatingRounds number="3"/> </Phase> <Phase name="E" > + <Trains rusted="6H"/> </Phase> <Phase name="TGV" > <Tiles colour="yellow,green,brown,gray"/> diff --git a/data/1830/CompanyManager.xml b/data/1830/CompanyManager.xml old mode 100755 new mode 100644 index a1b76eb..769e079 --- a/data/1830/CompanyManager.xml +++ b/data/1830/CompanyManager.xml @@ -20,7 +20,7 @@ </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains limit="4,4,3,2"/> + <Trains limit="4,3,2"/> <CanUseSpecialProperties/> <IfOption name="Variant" value="Coalfields,Coalfields&Reading"> <CanUseSpecialProperties/> diff --git a/data/1830/Game.xml b/data/1830/Game.xml index ecdb701..6ef5513 100644 --- a/data/1830/Game.xml +++ b/data/1830/Game.xml @@ -143,16 +143,18 @@ (the '+' is optional) --> </IfOption> </TrainType> - <TrainType name="3" majorStops="3" cost="180" quantity="5" startPhase="3"> - <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading"> - <Attributes obsoleting="yes"/> - </IfOption> - <IfOption name="Variant" value="Wabash"> - <Attributes quantity="6"/> - </IfOption> + <TrainType name="3" majorStops="3" cost="180" quantity="5"> + <NewPhase phaseName="3"/> + <IfOption name="Variant" + value="Coalfields,Reading,Coalfields&Reading"> + <Attributes obsoleting="yes"/> + </IfOption> + <IfOption name="Variant" value="Wabash"> + <Attributes quantity="6"/> + </IfOption> </TrainType> - <TrainType name="4" majorStops="4" cost="300" quantity="4" startPhase="4" - rustedTrain="2"> + <TrainType name="4" majorStops="4" cost="300" quantity="4"> + <NewPhase phaseName="4"/> <IfOption name="Variant" value="Coalfields,Reading"> <Attributes obsoleting="yes" quantity="5"/> </IfOption> @@ -163,13 +165,14 @@ <Attributes quantity="5"/> </IfOption> </TrainType> - <TrainType name="5" majorStops="5" cost="450" quantity="3" startPhase="5"> - <IfOption name="Variant" value="Wabash"> + <TrainType name="5" majorStops="5" cost="450" quantity="3"> + <NewPhase phaseName="5"/> + <IfOption name="Variant" value="Wabash"> <Attributes quantity="4"/> </IfOption> </TrainType> - <TrainType name="6" majorStops="6" cost="630" startPhase="6" - rustedTrain="3" releasedTrain="D"> + <TrainType name="6" majorStops="6" cost="630"> + <NewPhase phaseName="6"/> <IfOption name="WithOptional6Train" value="yes"> <Attributes quantity="3"/> </IfOption> @@ -193,7 +196,8 @@ <TrainType name="7" majorStops="7" cost="830" quantity="-1"/> </IfOption> <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading,Simple"> - <TrainType name="D" majorStops="99" startPhase="D" rustedTrain="4"> + <TrainType name="D" majorStops="99"> + <NewPhase phaseName="D"/> <IfOption name="Variant" value="Basegame,Pere Marquette,Simple"> <Attributes cost="1100"/> <Exchange cost="800"/> @@ -228,19 +232,28 @@ <OperatingRounds number="2"/> </Phase> <Phase name="4"> - <Tiles colour="yellow,green"/> + <Trains rusted="2" limitStep="2"/> </Phase> <Phase name="5"> <Tiles colour="yellow,green,brown"/> + <Trains limitStep="3"/> <!--Privates close="yes"/--> <OperatingRounds number="3"/> <OffBoardRevenue step="2"/> </Phase> - <Phase name="6"> - <Tiles colour="yellow,green,brown"/> + <Phase name="6"> + <Trains rusted="3"> + <IfOption name="Variant" value="Basegame,Pere Marquette,Simple"> + <Attributes released="D"/> + </IfOption> + <IfOption name="Variant" + value="Coalfields,Reading,Coalfields&Reading"> + <Attributes released="7,D"/> + </IfOption> + </Trains> </Phase> <Phase name="D"> - <Tiles colour="yellow,green,brown"/> + <Trains rusted="4"/> </Phase> </Component> <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> diff --git a/data/1851/CompanyManager.xml b/data/1851/CompanyManager.xml index fb3733b..5673c23 100644 --- a/data/1851/CompanyManager.xml +++ b/data/1851/CompanyManager.xml @@ -10,7 +10,7 @@ <ShareUnit percentage="10"/> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains limit="4,4,3,2"/> + <Trains limit="4,3,2"/> <BaseTokens> <BuyCost initialTokenCost="100"/> <HomeBase lay="whenFloated"/> diff --git a/data/1851/Game.xml b/data/1851/Game.xml index 282329d..574f68f 100644 --- a/data/1851/Game.xml +++ b/data/1851/Game.xml @@ -58,14 +58,20 @@ --> </Defaults> <TrainType name="2" majorStops="2" cost="100" quantity="5"/> - <TrainType name="3" majorStops="3" cost="200" quantity="4" startPhase="3"/> - <TrainType name="4" majorStops="4" cost="300" quantity="3" startPhase="4" - rustedTrain="2"/> - <TrainType name="5" majorStops="5" cost="500" quantity="2" startPhase="5"/> - <TrainType name="6" majorStops="6" cost="600" quantity="2" startPhase="6" - rustedTrain="3"/> - <TrainType name="8" majorStops="8" cost="800" startPhase="8" - rustedTrain="4"> + <TrainType name="3" majorStops="3" cost="200" quantity="4"> + <NewPhase phaseName="3"/> + </TrainType> + <TrainType name="4" majorStops="4" cost="300" quantity="3"> + <NewPhase phaseName="4"/> + </TrainType> + <TrainType name="5" majorStops="5" cost="500" quantity="2"> + <NewPhase phaseName="5"/> + </TrainType> + <TrainType name="6" majorStops="6" cost="600" quantity="2"> + <NewPhase phaseName="6"/> + </TrainType> + <TrainType name="8" majorStops="8" cost="800"> + <NewPhase phaseName="8"/> <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> </IfOption> @@ -92,20 +98,22 @@ <OperatingRounds number="2"/> </Phase> <Phase name="4"> - <Tiles colour="yellow,green"/> + <Trains rusted="2" limitStep="2"/> <OffBoardRevenue step="2"/> </Phase> <Phase name="5"> <Tiles colour="yellow,green,brown"/> + <Trains limitStep="3"/> <Privates close="yes"/> <OperatingRounds number="3"/> </Phase> <Phase name="6"> - <Tiles colour="yellow,green,brown"/> + <Trains rusted="3"/> <OffBoardRevenue step="3"/> </Phase> <Phase name="8"> <Tiles colour="yellow,green,brown,grey"/> + <Trains rusted="4"/> </Phase> </Component> <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> diff --git a/data/1856/CompanyManager.xml b/data/1856/CompanyManager.xml index 34cff8b..8d35118 100644 --- a/data/1856/CompanyManager.xml +++ b/data/1856/CompanyManager.xml @@ -13,7 +13,7 @@ <BaseTokens> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains limit="4,4,3,2"/> + <Trains limit="4,3,2"/> <Loans value="100" perRound="1" interest="10"/> <!-- Number of loans is undefined and handled in the code --> <CanUseSpecialProperties/> diff --git a/data/1856/Game.xml b/data/1856/Game.xml index 87706d8..4b00c6a 100644 --- a/data/1856/Game.xml +++ b/data/1856/Game.xml @@ -55,49 +55,50 @@ </Defaults> <TrainType name="2" majorStops="2" cost="100" quantity="6"/> <TrainType name="3" majorStops="3" cost="225" quantity="5"> - <NewPhase phaseName="2"/> + <NewPhase phaseName="3"/> </TrainType> <TrainType name="4" majorStops="4" cost="350" quantity="4"> - <NewPhase phaseName="3"/> + <NewPhase phaseName="4"/> </TrainType> <TrainType name="5" majorStops="5" cost="550" quantity="3"> - <NewPhase phaseName="4"/> + <NewPhase phaseName="5"/> </TrainType> <TrainType name="6" majorStops="6" cost="700" quantity="2"> - <NewPhase phaseName="5"/> + <NewPhase phaseName="6"/> </TrainType> <TrainType name="D" majorStops="99" cost="1100" quantity="-1"> - <NewPhase phaseName="6"/> + <NewPhase phaseName="D"/> <Exchange cost="750"/> </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> - <Phase name="1"> + <Phase name="2" realName="1"> <Tiles colour="yellow"/> <OperatingRounds number="1"/> <Trains tradingAllowed="yes"/> <Loans allowed="yes"/> </Phase> - <Phase name="2"> + <Phase name="3" realName="2"> <Tiles colour="yellow,green"/> <OperatingRounds number="2"/> <Privates sellingAllowed="yes"/> </Phase> - <Phase name="3"> - <Trains rusted="2"/> + <Phase name="4" realName="3"> + <Trains rusted="2" limitStep="2"/> </Phase> - <Phase name="4"> + <Phase name="5" realName="4"> <Tiles colour="yellow,green,brown"/> + <Trains limitStep="3"/> <OperatingRounds number="3"/> <Privates close="yes"/> <OffBoardRevenue step="2"/> </Phase> - <Phase name="5"> + <Phase name="6" realName="5"> <Tiles colour="yellow,green,brown,grey"/> <Trains rusted="3" released="D"/> <Loans allowed="no"/> </Phase> - <Phase name="6"> + <Phase name="D" realName="6"> <Trains rusted="4"/> <OffBoardRevenue step="3"/> </Phase> diff --git a/data/1870/CompanyManager.xml b/data/1870/CompanyManager.xml old mode 100755 new mode 100644 index a525a6d..18251c7 --- a/data/1870/CompanyManager.xml +++ b/data/1870/CompanyManager.xml @@ -21,7 +21,7 @@ <BaseTokens> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains limit="4,4,3,2"/> + <Trains limit="4,3,2"/> <CanUseSpecialProperties/> </CompanyType> diff --git a/data/1870/Game.xml b/data/1870/Game.xml index bd7a6dc..9f31b33 100644 --- a/data/1870/Game.xml +++ b/data/1870/Game.xml @@ -47,48 +47,59 @@ <Score towns="yes"/> </Defaults> <TrainType name="2" majorStops="2" cost="80" quantity="7"/> - <TrainType name="3" majorStops="3" cost="180" quantity="6" startPhase="2"/> - <TrainType name="4" majorStops="4" cost="300" quantity="5" startPhase="3" - rustedTrain="2"/> - <TrainType name="5" majorStops="5" cost="450" quantity="4" startPhase="4"/> - <TrainType name="6" majorStops="6" cost="630" quantity="3" startPhase="5" - rustedTrain="3"/> - <TrainType name="8" majorStops="8" cost="800" quantity="3" startPhase="6" - rustedTrain="4"/> - <TrainType name="10" majorStops="10" cost="950" quantity="2" startPhase="7"/> - <TrainType name="12" majorStops="12" cost="1100" quantity="-1" startPhase="8" - rustedTrain="5"/> + <TrainType name="3" majorStops="3" cost="180" quantity="6"> + <NewPhase phaseName="3"/> + </TrainType> + <TrainType name="4" majorStops="4" cost="300" quantity="5" startPhase="3"> + <NewPhase phaseName="4"/> + </TrainType> + <TrainType name="5" majorStops="5" cost="450" quantity="4" startPhase="4"> + <NewPhase phaseName="5"/> + </TrainType> + <TrainType name="6" majorStops="6" cost="630" quantity="3" startPhase="5"> + <NewPhase phaseName="6"/> + </TrainType> + <TrainType name="8" majorStops="8" cost="800" quantity="3"> + <NewPhase phaseName="8"/> + </TrainType> + <TrainType name="10" majorStops="10" cost="950" quantity="2"> + <NewPhase phaseName="10"/> + </TrainType> + <TrainType name="12" majorStops="12" cost="1100" quantity="-1"> + <NewPhase phaseName="12"/> + </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> - <Phase name="1"> + <Phase name="2" realName="1"> <Tiles colour="yellow"/> <OperatingRounds number="1"/> <Trains tradingAllowed="yes"/> </Phase> - <Phase name="2"> + <Phase name="3" realName="2"> <Tiles colour="yellow,green"/> <OperatingRounds number="2"/> </Phase> - <Phase name="3"> - <Tiles colour="yellow,green"/> + <Phase name="4" realName="3"> + <Trains rusted="2" limitStep="2"/> </Phase> - <Phase name="4"> + <Phase name="5" realName="4"> <Tiles colour="yellow,green,brown"/> + <Trains limitStep="3"/> <OperatingRounds number="3"/> </Phase> - <Phase name="5"> + <Phase name="6" realName="5"> <Tiles colour="yellow,green,brown,grey"/> + <Trains rusted="3"/> <Privates close="yes"/> <OffBoardRevenue step="2"/> </Phase> - <Phase name="6"> - <Tiles colour="yellow,green,brown,grey"/> + <Phase name="8" realName="6"> + <Trains rusted="4"/> </Phase> - <Phase name="7"> - <Tiles colour="yellow,green,brown,grey"/> + <Phase name="10" realName="7"> </Phase> - <Phase name="8"> - <Tiles colour="yellow,green,brown,grey"/> + <Phase name="12" realName="8"> + <Trains rusted="5"/> <OffBoardRevenue step="3"/> </Phase> </Component> diff --git a/data/1880/Game.xml b/data/1880/Game.xml index d451ad6..8695192 100644 --- a/data/1880/Game.xml +++ b/data/1880/Game.xml @@ -1,151 +1,155 @@ -<?xml version="1.0"?> -<ComponentManager> - <Component name="GameManager" class="rails.game.GameManager"> - <Game name="1880"/> - <GameOption name="RouteAwareness" values="Highlight,Deactivate" default="Deactivate" /> - <GameOption name="RevenueCalculation" values="Suggest,Deactivate" default="Deactivate" /> - <GameOption name="UnlimitedTiles" type="toggle" default="no"/> - <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> - <GameParameters> - <PlayerShareLimit percentage="100" /> - <StockRound class="rails.game.specific._1880.StockRound_1880" sequence="SellBuy"> - <NoSaleInFirstSR/> - </StockRound> - <OperatingRound class="rails.game.specific._1880.OperatingRound_1880"> - <EmergencyTrainBuying mayBuyFromCompany="no"/> - </OperatingRound> - </GameParameters> - <GuiClasses> - <StatusWindow class="rails.ui.swing.StatusWindow"/> - <StartRoundWindow class="rails.ui.swing.gamespecific._1880.StartRoundWindow_1880"/> - </GuiClasses> - <EndOfGame/> - <!-- need to implement the 3 OR set limit after purchase of first 8 TrainType --> - </Component> - <Component name="PlayerManager" class="rails.game.PlayerManager"> - <Players number="3" cash="600" certLimit="20"/> - <Players number="4" cash="480" certLimit="16"/> - <Players number="5" cash="400" certLimit="14"/> - <Players number="6" cash="340" certLimit="12"/> - <Players number="7" cash="300" certLimit="11"/> - </Component> - <Component name="Bank" class="rails.game.Bank"> - <Bank amount="30000"/> - </Component> - <Component name="TileManager" class="rails.game.TileManager" - file="TileSet.xml"/> - <Component name="Map" class="rails.game.MapManager" file="Map.xml"/> - <Component name="CompanyManager" class="rails.game.CompanyManager" - file="CompanyManager.xml"/> - <Component name="StockMarket" class="rails.game.specific._1880.StockMarket_1880" - file="StockMarket.xml"/> - <Component name="TrainManager" class="rails.game.TrainManager"> - <Defaults> - <Reach base="stops" countTowns="major"/> - <Score towns="yes"/> - </Defaults> - <TrainType name="2" majorStops="2" cost="100" quantity="10"/> - <TrainType name="2+2" majorStops="2" minorStops="2" cost="180" quantity="5"> - <NewPhase phaseName="2+2"/> - </TrainType> - <TrainType name="3" majorStops="3" cost="180" quantity="6"> - <NewPhase phaseName="3"/> - </TrainType> - <TrainType name="3+3" majorStops="3" minorStops="3" cost="300" quantity="5"> - <NewPhase phaseName="3+3"/> - </TrainType> - <TrainType name="4" majorStops="4" cost="300" quantity="5"> - <NewPhase phaseName="4"/> - </TrainType> - <TrainType name="4+4" majorStops="4" minorStops="4" cost="450" quantity="5"> - <NewPhase phaseName="4+4"/> - </TrainType> - <TrainType name="6" majorStops="6" cost="600" quantity="5"> - <NewPhase phaseName="6"/> - </TrainType> - <TrainType name="6e" majorStops="-1" cost="700" quantity="5"> - <NewPhase phaseName="6e"/> - </TrainType> - <!-- majorStops="-1" indicates that this not a normally running train--> - <!-- The e-type trains are express trains that can ignore towns/cities on their way for a maximum payout--> - <TrainType name="8" majorStops="8" cost="800" quantity="2"> - <NewPhase phaseName="8"/> - </TrainType> - <TrainType name="8e" majorStops="-1" cost="900" quantity="2"> - <NewPhase phaseName="8e"/> - </TrainType> - <!-- majorStops="-1" indicates that this not a normally running train--> - <!-- The e-type trains are express trains that can ignore towns/cities on their way for a maximum payout--> - <TrainType name="10" majorStops="10" cost="1000" quantity="-1"> - <NewPhase phaseName="8e"/> - </TrainType> - </Component> - <Component name="PhaseManager" class="rails.game.PhaseManager"> - <Phase name="2" realName="A1"> - <Tiles colour="yellow"/> - <OperatingRounds number="-1"/> - <Float percentage="20"/> - <Trains tradingAllowed="yes"/> - <Stocks avail="5"/> - </Phase> - <Phase name="2+2" realName="A2"> - <Tiles colour="yellow"/> - </Phase> - <Phase name="3" realName="B1"> - <Tiles colour="yellow,green"/> - <Float percentage="30"/> - <Stocks avail="10"/> - <OffBoardRevenue step="2"/> - </Phase> - <Phase name="3+3" realName="B2"> - <Tiles colour="yellow,green"/> - <OffBoardRevenue step="2"/> - </Phase> - <Phase name="4" realName="B3"> - <Tiles colour="yellow,green"/> - <OffBoardRevenue step="2"/> - <Privates close="yes"/> - <Investors active="no"/> - <Communists active="yes"/> - <Float percentage="40"/> - <Trains limitStep="2" rusted="2"/> - </Phase> - <Phase name="4+4" realName="C1"> - <Tiles colour="yellow,green,brown"/> - <OffBoardRevenue step="3"/> - <Trains rusted="2+2"/> - </Phase> - <Phase name="6" realName="C2"> - <Tiles colour="yellow,green,brown"/> - <Comunists active="no"/> - <Float percentage="60"/> - <OffBoardRevenue step="3"/> - <Trains limitStep="3" rusted="3"/> - </Phase> - <Phase name="6e" realName="C3"> - <Tiles colour="yellow,green,brown"/> - <OffBoardRevenue step="3"/> - <Trains limitStep="3" rusted="3+3"/> - </Phase> - <Phase name="8" realName="D1"> - <Tiles colour="yellow,green,brown,grey"/> - <OffBoardRevenue step="4"/> - <Trains limitStep="3" rusted="4"/> - </Phase> - <Phase name="8e" realName="D2"> - <Tiles colour="yellow,green,brown,grey"/> - <OffBoardRevenue step="4"/> - <Trains limitStep="3" rusted="4+4"/> - </Phase> - <Phase name="8e" realName="D3"> - </Phase> - <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> - <Modifier class="rails.game.specific._1880.OffBoardRevenueModifier" /> - <Modifier class="rails.game.specific._1880.ExpressTrainRevenueModifier" /> - </Component> - </Component> - <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> - <Modifier class="rails.game.specific._1826.TGVModifier" /> - </Component> - +<?xml version="1.0"?> +<ComponentManager> + <Component name="GameManager" class="rails.game.GameManager"> + <Game name="1880"/> + <GameOption name="RouteAwareness" values="Highlight,Deactivate" + default="Deactivate"/> + <GameOption name="RevenueCalculation" values="Suggest,Deactivate" + default="Deactivate"/> + <GameOption name="UnlimitedTiles" type="toggle" default="no"/> + <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> + <GameParameters> + <PlayerShareLimit percentage="100"/> + <StockRound class="rails.game.specific._1880.StockRound_1880" + sequence="SellBuy"> + <NoSaleInFirstSR/> + </StockRound> + <OperatingRound + class="rails.game.specific._1880.OperatingRound_1880"> + <EmergencyTrainBuying mayBuyFromCompany="no"/> + </OperatingRound> + </GameParameters> + <GuiClasses> + <StatusWindow class="rails.ui.swing.StatusWindow"/> + <StartRoundWindow + class="rails.ui.swing.gamespecific._1880.StartRoundWindow_1880"/> + </GuiClasses> + <EndOfGame/> + + <!-- need to implement the 3 OR set limit after purchase of first 8 TrainType --> + </Component> + <Component name="PlayerManager" class="rails.game.PlayerManager"> + <Players number="3" cash="600" certLimit="20"/> + <Players number="4" cash="480" certLimit="16"/> + <Players number="5" cash="400" certLimit="14"/> + <Players number="6" cash="340" certLimit="12"/> + <Players number="7" cash="300" certLimit="11"/> + </Component> + <Component name="Bank" class="rails.game.Bank"> + <Bank amount="30000"/> + </Component> + <Component name="TileManager" class="rails.game.TileManager" + file="TileSet.xml"/> + <Component name="Map" class="rails.game.MapManager" file="Map.xml"/> + <Component name="CompanyManager" class="rails.game.CompanyManager" + file="CompanyManager.xml"/> + <Component name="StockMarket" + class="rails.game.specific._1880.StockMarket_1880" + file="StockMarket.xml"/> + <Component name="TrainManager" class="rails.game.TrainManager"> + <Defaults> + <Reach base="stops" countTowns="major"/> + <Score towns="yes"/> + </Defaults> + <TrainType name="2" majorStops="2" cost="100" quantity="10"/> + <TrainType name="2+2" majorStops="2" minorStops="2" cost="180" quantity="5"> + <NewPhase phaseName="2+2"/> + </TrainType> + <TrainType name="3" majorStops="3" cost="180" quantity="6"> + <NewPhase phaseName="3"/> + </TrainType> + <TrainType name="3+3" majorStops="3" minorStops="3" cost="300" quantity="5"> + <NewPhase phaseName="3+3"/> + </TrainType> + <TrainType name="4" majorStops="4" cost="300" quantity="5"> + <NewPhase phaseName="4"/> + </TrainType> + <TrainType name="4+4" majorStops="4" minorStops="4" cost="450" quantity="5"> + <NewPhase phaseName="4+4"/> + </TrainType> + <TrainType name="6" majorStops="6" cost="600" quantity="5"> + <NewPhase phaseName="6"/> + </TrainType> + <TrainType name="6e" majorStops="-1" cost="700" quantity="5"> + <NewPhase phaseName="6e"/> + </TrainType> + <!-- majorStops="-1" indicates that this not a normally running train--> + + <!-- The e-type trains are express trains that can ignore towns/cities on their way for a maximum payout--> + <TrainType name="8" majorStops="8" cost="800" quantity="2"> + <NewPhase phaseName="8"/> + </TrainType> + <TrainType name="8e" majorStops="-1" cost="900" quantity="2"> + <NewPhase phaseName="8e"/> + </TrainType> + <!-- majorStops="-1" indicates that this not a normally running train--> + + <!-- The e-type trains are express trains that can ignore towns/cities on their way for a maximum payout--> + <TrainType name="10" majorStops="10" cost="1000" quantity="-1"> + <NewPhase phaseName="8e"/> + </TrainType> + </Component> + <Component name="PhaseManager" class="rails.game.PhaseManager"> + <Phase name="2" realName="A1"> + <Tiles colour="yellow"/> + <OperatingRounds number="-1"/> + <Float percentage="20"/> + <Trains tradingAllowed="yes"/> + <Stocks avail="5"/> + </Phase> + <Phase name="2+2" realName="A2"> + </Phase> + <Phase name="3" realName="B1"> + <Tiles colour="yellow,green"/> + <Float percentage="30"/> + <Stocks avail="10"/> + <OffBoardRevenue step="2"/> + </Phase> + <Phase name="3+3" realName="B2"> + <OffBoardRevenue step="2"/> + </Phase> + <Phase name="4" realName="B3"> + <OffBoardRevenue step="2"/> + <Privates close="yes"/> + <Investors active="no"/> + <Communists active="yes"/> + <Float percentage="40"/> + <Trains limitStep="2" rusted="2"/> + </Phase> + <Phase name="4+4" realName="C1"> + <Tiles colour="yellow,green,brown"/> + <OffBoardRevenue step="3"/> + <Trains rusted="2+2"/> + </Phase> + <Phase name="6" realName="C2"> + <Communists active="no"/> + <Float percentage="60"/> + <OffBoardRevenue step="3"/> + <Trains limitStep="3" rusted="3"/> + </Phase> + <Phase name="6e" realName="C3"> + <OffBoardRevenue step="3"/> + <Trains limitStep="3" rusted="3+3"/> + </Phase> + <Phase name="8" realName="D1"> + <Tiles colour="yellow,green,brown,grey"/> + <OffBoardRevenue step="4"/> + <Trains limitStep="3" rusted="4"/> + </Phase> + <Phase name="8e" realName="D2"> + <OffBoardRevenue step="4"/> + <Trains limitStep="3" rusted="4+4"/> + </Phase> + <Phase name="8e" realName="D3"> + </Phase> + <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> + <Modifier class="rails.game.specific._1880.OffBoardRevenueModifier"/> + <Modifier + class="rails.game.specific._1880.ExpressTrainRevenueModifier"/> + </Component> + </Component> + <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> + <Modifier class="rails.game.specific._1826.TGVModifier"/> + </Component> + </ComponentManager> \ No newline at end of file diff --git a/data/1889/CompanyManager.xml b/data/1889/CompanyManager.xml index 72e3c08..83dd566 100644 --- a/data/1889/CompanyManager.xml +++ b/data/1889/CompanyManager.xml @@ -19,7 +19,7 @@ </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains limit="4,4,3,2"/> + <Trains limit="4,3,2"/> <CanUseSpecialProperties/> </CompanyType> <IfOption name="BeginnerGame" value="yes"> diff --git a/data/1889/Game.xml b/data/1889/Game.xml index 71ed798..5fddf24 100644 --- a/data/1889/Game.xml +++ b/data/1889/Game.xml @@ -83,12 +83,17 @@ --> </Defaults> <TrainType name="2" majorStops="2" cost="80" quantity="6"/> - <TrainType name="3" majorStops="3" cost="180" quantity="5" startPhase="3"/> - <TrainType name="4" majorStops="4" cost="300" quantity="4" startPhase="4" - rustedTrain="2"/> - <TrainType name="5" majorStops="5" cost="450" quantity="3" startPhase="5"/> - <TrainType name="6" majorStops="6" cost="630" startPhase="6" - rustedTrain="3" releasedTrain="D"> + <TrainType name="3" majorStops="3" cost="180" quantity="5"> + <NewPhase phaseName="3"/> + </TrainType> + <TrainType name="4" majorStops="4" cost="300" quantity="4"> + <NewPhase phaseName="4"/> + </TrainType> + <TrainType name="5" majorStops="5" cost="450" quantity="3"> + <NewPhase phaseName="5"/> + </TrainType> + <TrainType name="6" majorStops="6" cost="630"> + <NewPhase phaseName="6"/> <IfOption name="WithOptional6Train" value="yes"> <Attributes quantity="3"/> </IfOption> @@ -96,8 +101,8 @@ <Attributes quantity="2"/> </IfOption> </TrainType> - <TrainType name="D" majorStops="99" cost="1100" startPhase="D" - rustedTrain="4"> + <TrainType name="D" majorStops="99" cost="1100"> + <NewPhase phaseName="D"/> <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> </IfOption> @@ -123,19 +128,20 @@ <OperatingRounds number="2"/> </Phase> <Phase name="4"> - <Tiles colour="yellow,green"/> + <Trains rusted="2" limitStep="2"/> </Phase> <Phase name="5"> <Tiles colour="yellow,green,brown"/> + <Trains limitStep="3"/> <Privates sellingAllowed="no" close="yes" revenueStep="2"/> <!--G increases revenue and does not close - if owned by player--> <OperatingRounds number="3"/> <OffBoardRevenue step="2"/> </Phase> <Phase name="6"> - <Tiles colour="yellow,green,brown"/> + <Trains rusted="3" released="D"/> </Phase> <Phase name="D"> - <Tiles colour="yellow,green,brown"/> + <Trains rusted="4"/> </Phase> </Component> </ComponentManager> diff --git a/data/18AL/CompanyManager.xml b/data/18AL/CompanyManager.xml old mode 100755 new mode 100644 index 26cf9ce..741ce43 --- a/data/18AL/CompanyManager.xml +++ b/data/18AL/CompanyManager.xml @@ -13,7 +13,7 @@ <BaseTokens> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains limit="4,4,3,2"/> + <Trains limit="4,3,2"/> <CanUseSpecialProperties/> </CompanyType> <Company name="Tusc" type="Private" basePrice="20" revenue="5" longname="Tuscumbia Railway"/> diff --git a/data/18AL/Game.xml b/data/18AL/Game.xml index fff9d7c..9c59f20 100644 --- a/data/18AL/Game.xml +++ b/data/18AL/Game.xml @@ -53,23 +53,30 @@ <Score towns="yes"/> </Defaults> <TrainType name="2" majorStops="2" cost="100" quantity="5"/> - <TrainType name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> - <TrainType name="4" majorStops="4" cost="300" quantity="3" startPhase="4" - rustedTrain="2" > - <IfOption name="Obsolete4Trains" value="yes"> + <TrainType name="3" majorStops="3" cost="180" quantity="4"> + <NewPhase phaseName="3"/> + </TrainType> + <TrainType name="4" majorStops="4" cost="300" quantity="3"> + <NewPhase phaseName="4"/> + <IfOption name="Obsolete4Trains" value="yes"> <Attributes obsoleting="yes"/> </IfOption> <IfOption name="Obsolete4Trains" value="no"> <Attributes obsoleting="no"/> </IfOption> </TrainType>/> - <TrainType name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> - <TrainType name="6" majorStops="6" cost="630" quantity="1" startPhase="6" - rustedTrain="3"/> - <TrainType name="7" majorStops="7" cost="700" quantity="1" startPhase="7" - rustedTrain="4"/> - <TrainType name="4D" majorStops="4" cost="800" startPhase="4D"> - <IfOption name="UnlimitedTopTrains" value="yes"> + <TrainType name="5" majorStops="5" cost="450" quantity="2"> + <NewPhase phaseName="5"/> + </TrainType> + <TrainType name="6" majorStops="6" cost="630" quantity="1"> + <NewPhase phaseName="6"/> + </TrainType> + <TrainType name="7" majorStops="7" cost="700" quantity="1"> + <NewPhase phaseName="7"/> + </TrainType> + <TrainType name="4D" majorStops="4" cost="800"> + <NewPhase phaseName="4D"/> + <IfOption name="UnlimitedTopTrains" value="yes"> <Attributes quantity="-1"/> </IfOption> <IfOption name="UnlimitedTopTrains" value="no"> @@ -92,20 +99,20 @@ <OperatingRounds number="2"/> </Phase> <Phase name="4"> - <Tiles colour="yellow,green"/> - <Trains onePerTurn="no"/> + <Trains rusted="2" limitStep="2" onePerTurn="no"/> </Phase> <Phase name="5"> <Tiles colour="yellow,green,brown"/> + <Trains limitStep="3"/> <OperatingRounds number="3"/> <Privates close="yes"/> <OffBoardRevenue step="2"/> </Phase> <Phase name="6"> - <Tiles colour="yellow,green,brown"/> + <Trains rusted="3"/> </Phase> <Phase name="7"> - <Tiles colour="yellow,green,brown"/> + <Trains rusted="4"/> </Phase> <Phase name="4D"> <Tiles colour="yellow,green,brown,grey"/> diff --git a/data/18EU/CompanyManager.xml b/data/18EU/CompanyManager.xml index 02dc6f5..34cfd3a 100644 --- a/data/18EU/CompanyManager.xml +++ b/data/18EU/CompanyManager.xml @@ -15,7 +15,7 @@ <BaseTokens> <HomeBase lay="whenStarted"/> </BaseTokens> - <Trains limit="2,2,1" mandatory="no"/> + <Trains limit="2,1" mandatory="no"/> <InitialTrain type="2" cost="0" tradeable="yes"/> </CompanyType> <CompanyType name="Major" class="rails.game.PublicCompany" @@ -33,7 +33,7 @@ <HomeBase lay="whenStarted"/> </BaseTokens> <Payout split="allowed" mustExceedPriceToMove="yes"/> - <Trains limit="4,4,3,2"/> + <Trains limit="4,3,2"/> <TradeShares mustHaveOperated="yes"/> </CompanyType> diff --git a/data/18EU/Game.xml b/data/18EU/Game.xml index 682d668..6a3af0f 100644 --- a/data/18EU/Game.xml +++ b/data/18EU/Game.xml @@ -1,115 +1,132 @@ -<?xml version="1.0"?> -<ComponentManager> - <Component name="GameManager" class="rails.game.specific._18EU.GameManager_18EU"> - <Game name="18EU"/> - <GameOption name="RouteAwareness" values="Highlight,Deactivate" default="Deactivate" /> - <GameOption name="RevenueCalculation" values="Suggest,Deactivate" default="Deactivate" /> - <GameOption name="Extra3Trains" values="0,1,2" default="0"/> - <GameOption name="Extra4Trains" values="0,1" default="0"/> - <GameOption name="NoMapMode" type="toggle" default="no" /> - <GameOption name="UnlimitedTiles" type="toggle" default="no"/> - <GameOption name="SeparateSalesAtSamePrice" type="toggle" default="yes"/> - <GameParameters> - <StockRound class="rails.game.specific._18EU.StockRound_18EU" - sequence="sellBuy" - skipFirst="yes"> - <NoSaleInFirstSR/> - <NoSaleIfNotOperated/> - </StockRound> - <OperatingRound class="rails.game.specific._18EU.OperatingRound_18EU"> - <EmergencyTrainBuying mustBuyCheapestTrain="no" mayBuyFromCompany="yes"/> - </OperatingRound> - <PlayerShareLimit percentage="60"/> - <BankPoolLimit percentage="50"/> - <TreasuryShareLimit percentage="80"/> - </GameParameters> - <GuiClasses> - <GameStatus class="rails.ui.swing.gamespecific._18EU.GameStatus_18EU"/> - <StatusWindow class="rails.ui.swing.gamespecific._18EU.StatusWindow_18EU"/> - <GameUIManager class="rails.ui.swing.gamespecific._18EU.GameUIManager_18EU"/> - </GuiClasses> - <EndOfGame> - <BankBreaks limit="0" finish="setOfORs"/> - <!-- "Runs out"; when "broken", -1 is the limit --> - <!-- Also when the share value reaches $300; this is configured in teh stock market XML --> - </EndOfGame> - </Component> - <Component name="PlayerManager" class="rails.game.PlayerManager"> - <Players number="2" cash="750" certLimit="28"/> - <Players number="3" cash="450" certLimit="20"/> - <Players number="4" cash="350" certLimit="16"/> - <Players number="5" cash="300" certLimit="13"/> - <Players number="6" cash="250" certLimit="11"/> - </Component> - <Component name="Bank" class="rails.game.Bank"> - <Bank amount="12000"/> - </Component> - <Component name="TileManager" class="rails.game.TileManager" - file="TileSet.xml"/> - <Component name="Map" class="rails.game.MapManager" file="Map.xml"/> - <Component name="CompanyManager" class="rails.game.CompanyManager" - file="CompanyManager.xml"/> - <Component name="StockMarket" class="rails.game.StockMarket" - file="StockMarket.xml"/> - <Component name="TrainManager" class="rails.game.TrainManager"> - <Defaults> - <Reach base="stops" countTowns="no"/> - <Score towns="yes"/> - </Defaults> - <TrainType name="2" majorStops="2" cost="100" quantity="15"/> - <TrainType name="3" majorStops="3" cost="200" startPhase="3" releasedTrain="P"> - <IfOption name="Extra3Trains" value="0"> - <Attributes quantity="5"/> - </IfOption> - <IfOption name="Extra3Trains" value="1"> - <Attributes quantity="6"/> - </IfOption> - <IfOption name="Extra3Trains" value="2"> - <Attributes quantity="7"/> - </IfOption> - </TrainType> - <TrainType name="4" majorStops="4" cost="300" startPhase="4" - rustedTrain="2"> - <IfOption name="Extra4Trains" value="0"> - <Attributes quantity="4"/> - </IfOption> - <IfOption name="Extra4Trains" value="1"> - <Attributes quantity="5"/> - </IfOption> - </TrainType> - <TrainType name="5" majorStops="5" cost="500" quantity="3" startPhase="5"/> - <TrainType name="6" majorStops="6" cost="600" quantity="2" startPhase="6" - rustedTrain="3"/> - <TrainType name="8" majorStops="8" cost="800" quantity="-1" startPhase="8" - rustedTrain="4"/> - <!-- majorStops="-1" indicates that this not a normally running train--> - <TrainType name="P" initialPortfolio="Pool" majorStops="-1" cost="100" quantity="5"/> - </Component> - <Component name="PhaseManager" class="rails.game.PhaseManager"> - <Phase name="2" > - <Tiles colour="yellow"/> - <OperatingRounds number="2"/> - <Trains tradingAllowed="yes"/> - </Phase> - <Phase name="3"> - <Tiles colour="yellow,green"/> - </Phase> - <Phase name="4"> - <Tiles colour="yellow,green"/> - </Phase> - <Phase name="5"> - <Tiles colour="yellow,green,brown"/> - <OffBoardRevenue step="2"/> - </Phase> - <Phase name="6"> - <Tiles colour="yellow,green,brown"/> - </Phase> - <Phase name="8"> - <Tiles colour="yellow,green,brown,grey"/> - </Phase> - </Component> - <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> - <Modifier class="rails.game.specific._18EU.OffBoardRevenueModifier" /> - <Modifier class="rails.game.specific._18EU.PullmanRevenueModifier" /> - </Component> +<?xml version="1.0"?> +<ComponentManager> + <Component name="GameManager" + class="rails.game.specific._18EU.GameManager_18EU"> + <Game name="18EU"/> + <GameOption name="RouteAwareness" values="Highlight,Deactivate" + default="Deactivate"/> + <GameOption name="RevenueCalculation" values="Suggest,Deactivate" + default="Deactivate"/> + <GameOption name="Extra3Trains" values="0,1,2" default="0"/> + <GameOption name="Extra4Trains" values="0,1" default="0"/> + <GameOption name="NoMapMode" type="toggle" default="no"/> + <GameOption name="UnlimitedTiles" type="toggle" default="no"/> + <GameOption name="SeparateSalesAtSamePrice" type="toggle" default="yes"/> + <GameParameters> + <StockRound class="rails.game.specific._18EU.StockRound_18EU" + sequence="sellBuy" skipFirst="yes"> + <NoSaleInFirstSR/> + <NoSaleIfNotOperated/> + </StockRound> + <OperatingRound + class="rails.game.specific._18EU.OperatingRound_18EU"> + <EmergencyTrainBuying mustBuyCheapestTrain="no" + mayBuyFromCompany="yes"/> + </OperatingRound> + <PlayerShareLimit percentage="60"/> + <BankPoolLimit percentage="50"/> + <TreasuryShareLimit percentage="80"/> + </GameParameters> + <GuiClasses> + <GameStatus + class="rails.ui.swing.gamespecific._18EU.GameStatus_18EU"/> + <StatusWindow + class="rails.ui.swing.gamespecific._18EU.StatusWindow_18EU"/> + <GameUIManager + class="rails.ui.swing.gamespecific._18EU.GameUIManager_18EU"/> + </GuiClasses> + <EndOfGame> + <BankBreaks limit="0" finish="setOfORs"/> + <!-- "Runs out"; when "broken", -1 is the limit --> + + <!-- Also when the share value reaches $300; this is configured in teh stock market XML --> + </EndOfGame> + </Component> + <Component name="PlayerManager" class="rails.game.PlayerManager"> + <Players number="2" cash="750" certLimit="28"/> + <Players number="3" cash="450" certLimit="20"/> + <Players number="4" cash="350" certLimit="16"/> + <Players number="5" cash="300" certLimit="13"/> + <Players number="6" cash="250" certLimit="11"/> + </Component> + <Component name="Bank" class="rails.game.Bank"> + <Bank amount="12000"/> + </Component> + <Component name="TileManager" class="rails.game.TileManager" + file="TileSet.xml"/> + <Component name="Map" class="rails.game.MapManager" file="Map.xml"/> + <Component name="CompanyManager" class="rails.game.CompanyManager" + file="CompanyManager.xml"/> + <Component name="StockMarket" class="rails.game.StockMarket" + file="StockMarket.xml"/> + <Component name="TrainManager" class="rails.game.TrainManager"> + <Defaults> + <Reach base="stops" countTowns="no"/> + <Score towns="yes"/> + </Defaults> + <TrainType name="2" majorStops="2" cost="100" quantity="15"/> + <TrainType name="3" majorStops="3" cost="200"> + <NewPhase phaseName="3"/> + <IfOption name="Extra3Trains" value="0"> + <Attributes quantity="5"/> + </IfOption> + <IfOption name="Extra3Trains" value="1"> + <Attributes quantity="6"/> + </IfOption> + <IfOption name="Extra3Trains" value="2"> + <Attributes quantity="7"/> + </IfOption> + </TrainType> + <TrainType name="4" majorStops="4" cost="300"> + <NewPhase phaseName="4"/> + <IfOption name="Extra4Trains" value="0"> + <Attributes quantity="4"/> + </IfOption> + <IfOption name="Extra4Trains" value="1"> + <Attributes quantity="5"/> + </IfOption> + </TrainType> + <TrainType name="5" majorStops="5" cost="500" quantity="3"> + <NewPhase phaseName="5"/> + </TrainType> + <TrainType name="6" majorStops="6" cost="600" quantity="2"> + <NewPhase phaseName="6"/> + </TrainType> + <TrainType name="8" majorStops="8" cost="800" quantity="-1"> + <NewPhase phaseName="8"/> + </TrainType> + <!-- majorStops="-1" indicates that this not a normally running train--> + <TrainType name="P" initialPortfolio="Pool" majorStops="-1" cost="100" + quantity="5"/> + </Component> + <Component name="PhaseManager" class="rails.game.PhaseManager"> + <Phase name="2"> + <Tiles colour="yellow"/> + <OperatingRounds number="2"/> + <Trains tradingAllowed="yes"/> + </Phase> + <Phase name="3"> + <Tiles colour="yellow,green"/> + <Trains released="P"/> + </Phase> + <Phase name="4"> + <Trains rusted="2" limitStep="2"/> + </Phase> + <Phase name="5"> + <Tiles colour="yellow,green,brown"/> + <Trains limitStep="2"/> + <OffBoardRevenue step="2"/> + </Phase> + <Phase name="6"> + <Trains rusted="3"/> + </Phase> + <Phase name="8"> + <Tiles colour="yellow,green,brown,grey"/> + <Trains rusted="4"/> + </Phase> + </Component> + <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> + <Modifier class="rails.game.specific._18EU.OffBoardRevenueModifier"/> + <Modifier class="rails.game.specific._18EU.PullmanRevenueModifier"/> + </Component> </ComponentManager> \ No newline at end of file diff --git a/data/18GA/CompanyManager.xml b/data/18GA/CompanyManager.xml index de54a0f..9f1126d 100644 --- a/data/18GA/CompanyManager.xml +++ b/data/18GA/CompanyManager.xml @@ -17,7 +17,7 @@ <HomeBase lay="firstOR"/> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains limit="4,4,3,2"/> + <Trains limit="4,3,2"/> <CanBuyPrivates/> <CanUseSpecialProperties/> </CompanyType> diff --git a/data/18GA/Game.xml b/data/18GA/Game.xml index 2335f43..926f5f1 100644 --- a/data/18GA/Game.xml +++ b/data/18GA/Game.xml @@ -1,105 +1,121 @@ -<?xml version="1.0"?> -<ComponentManager> - <Component name="GameManager" class="rails.game.GameManager"> - <Game name="18GA"/> - <GameOption name="Variant" values="Basegame,Cotton Port" default="Basegame" /> - <GameOption name="NoMapMode" type="toggle" default="no" /> - <GameOption name="RouteAwareness" values="Highlight,Deactivate" default="Highlight" /> - <GameOption name="RevenueCalculation" values="Suggest,Deactivate" default="Suggest" /> - <GameOption name="UnlimitedTopTrains" parm="8" type="toggle" default="no"/> - <GameOption name="UnlimitedTiles" type="toggle" default="no"/> - <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> - <GameOption name="TwoPlayersCertLimit70Percent" type="toggle" default="yes"/> - <GameParameters> - <OperatingRound class="rails.game.specific._18GA.OperatingRound_18GA"/> - <PlayerShareLimit percentage="60"> - <IfOption name="NumberOfPlayers" value="2"> - <IfOption name="TwoPlayersCertLimit70Percent" value="yes"> - <Attributes percentage="70"/> - </IfOption> - </IfOption> - </PlayerShareLimit> - <BankPoolLimit percentage="50"/> - <StockRound> - <NoSaleInFirstSR/> - </StockRound> - <OperatingRound> - <EmergencyTrainBuying mustBuyCheapestTrain="yes" mayBuyFromCompany="no"/> - </OperatingRound> - </GameParameters> - <GuiClasses> - </GuiClasses> - <EndOfGame> - <Bankruptcy/> - <BankBreaks limit="0" finish="currentOR"/> - <!-- "Runs out"; when "broken", -1 is the limit --> - <!-- Also when the share value reaches $300; this is configured in the stock market XML, - but uses the 'finish' attribute value defined above. --> - </EndOfGame> - </Component> - <Component name="PlayerManager" class="rails.game.PlayerManager"> - <Players number="2" cash="810" certLimit="20"/> - <Players number="3" cash="600" certLimit="15"/> - <Players number="4" cash="450" certLimit="12"/> - <Players number="5" cash="360" certLimit="10"/> - </Component> - <Component name="Bank" class="rails.game.Bank"> - <Bank amount="8000"/> - </Component> - <Component name="TileManager" class="rails.game.TileManager" - file="TileSet.xml"/> - <Component name="Map" class="rails.game.MapManager" file="Map.xml"/> - <Component name="CompanyManager" class="rails.game.CompanyManager" - file="CompanyManager.xml"/> - <Component name="StockMarket" class="rails.game.StockMarket" - file="StockMarket.xml"/> - <Component name="TrainManager" class="rails.game.TrainManager"> - <Defaults> - <Reach base="stops" countTowns="no"/> - <Score towns="yes"/> - </Defaults> - <TrainType name="2" majorStops="2" cost="100" quantity="5"/> - <TrainType name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> - <TrainType name="4" majorStops="4" cost="300" quantity="3" startPhase="4" - rustedTrain="2" /> - <TrainType name="5" majorStops="5" cost="450" quantity="2" startPhase="5"/> - <TrainType name="6" majorStops="6" cost="630" quantity="2" startPhase="6" - rustedTrain="3"/> - <TrainType name="8" majorStops="8" cost="800" startPhase="8" - rustedTrain="4"> - <IfOption name="UnlimitedTopTrains" value="yes"> - <Attributes quantity="-1"/> - </IfOption> - <IfOption name="UnlimitedTopTrains" value="no"> - <Attributes quantity="5"/> - </IfOption> - </TrainType> - </Component> - <Component name="PhaseManager" class="rails.game.PhaseManager"> - <Phase name="2" > - <Tiles colour="yellow"/> - <OperatingRounds number="1"/> - <Trains onePerTurn="yes" tradingAllowed="yes"/> - </Phase> - <Phase name="3"> - <Tiles colour="yellow,green"/> - <Privates sellingAllowed="yes"/> - <OperatingRounds number="2"/> - </Phase> - <Phase name="4"> - <Trains onePerTurn="no"/> - </Phase> - <Phase name="5"> - <Tiles colour="yellow,green,brown"/> - <OperatingRounds number="3"/> - <Privates close="yes"/> - <OffBoardRevenue step="2"/> - </Phase> - <Phase name="6" /> - <Phase name="8"> - <Tiles colour="yellow,green,brown,grey"/> - </Phase> - </Component> - <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> - </Component> +<?xml version="1.0"?> +<ComponentManager> + <Component name="GameManager" class="rails.game.GameManager"> + <Game name="18GA"/> + <GameOption name="Variant" values="Basegame,Cotton Port" + default="Basegame"/> + <GameOption name="NoMapMode" type="toggle" default="no"/> + <GameOption name="RouteAwareness" values="Highlight,Deactivate" + default="Highlight"/> + <GameOption name="RevenueCalculation" values="Suggest,Deactivate" + default="Suggest"/> + <GameOption name="UnlimitedTopTrains" parm="8" type="toggle" default="no"/> + <GameOption name="UnlimitedTiles" type="toggle" default="no"/> + <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> + <GameOption name="TwoPlayersCertLimit70Percent" type="toggle" + default="yes"/> + <GameParameters> + <OperatingRound + class="rails.game.specific._18GA.OperatingRound_18GA"/> + <PlayerShareLimit percentage="60"> + <IfOption name="NumberOfPlayers" value="2"> + <IfOption name="TwoPlayersCertLimit70Percent" value="yes"> + <Attributes percentage="70"/> + </IfOption> + </IfOption> + </PlayerShareLimit> + <BankPoolLimit percentage="50"/> + <StockRound> + <NoSaleInFirstSR/> + </StockRound> + <OperatingRound> + <EmergencyTrainBuying mustBuyCheapestTrain="yes" + mayBuyFromCompany="no"/> + </OperatingRound> + </GameParameters> + <GuiClasses> + </GuiClasses> + <EndOfGame> + <Bankruptcy/> + <BankBreaks limit="0" finish="currentOR"/> + <!-- "Runs out"; when "broken", -1 is the limit --> + <!-- Also when the share value reaches $300; this is configured in the stock market XML, + but uses the 'finish' attribute value defined above. --> + </EndOfGame> + </Component> + <Component name="PlayerManager" class="rails.game.PlayerManager"> + <Players number="2" cash="810" certLimit="20"/> + <Players number="3" cash="600" certLimit="15"/> + <Players number="4" cash="450" certLimit="12"/> + <Players number="5" cash="360" certLimit="10"/> + </Component> + <Component name="Bank" class="rails.game.Bank"> + <Bank amount="8000"/> + </Component> + <Component name="TileManager" class="rails.game.TileManager" + file="TileSet.xml"/> + <Component name="Map" class="rails.game.MapManager" file="Map.xml"/> + <Component name="CompanyManager" class="rails.game.CompanyManager" + file="CompanyManager.xml"/> + <Component name="StockMarket" class="rails.game.StockMarket" + file="StockMarket.xml"/> + <Component name="TrainManager" class="rails.game.TrainManager"> + <Defaults> + <Reach base="stops" countTowns="no"/> + <Score towns="yes"/> + </Defaults> + <TrainType name="2" majorStops="2" cost="100" quantity="5"/> + <TrainType name="3" majorStops="3" cost="180" quantity="4"> + <NewPhase phaseName="3"/> + </TrainType> + <TrainType name="4" majorStops="4" cost="300" quantity="3"> + <NewPhase phaseName="4"/> + </TrainType> + <TrainType name="5" majorStops="5" cost="450" quantity="2"> + <NewPhase phaseName="5"/> + </TrainType> + <TrainType name="6" majorStops="6" cost="630" quantity="2"> + <NewPhase phaseName="6"/> + </TrainType> + <TrainType name="8" majorStops="8" cost="800"> + <NewPhase phaseName="8"/> + <IfOption name="UnlimitedTopTrains" value="yes"> + <Attributes quantity="-1"/> + </IfOption> + <IfOption name="UnlimitedTopTrains" value="no"> + <Attributes quantity="5"/> + </IfOption> + </TrainType> + </Component> + <Component name="PhaseManager" class="rails.game.PhaseManager"> + <Phase name="2"> + <Tiles colour="yellow"/> + <OperatingRounds number="1"/> + <Trains onePerTurn="yes" tradingAllowed="yes"/> + </Phase> + <Phase name="3"> + <Tiles colour="yellow,green"/> + <Privates sellingAllowed="yes"/> + <OperatingRounds number="2"/> + </Phase> + <Phase name="4"> + <Trains rusted="2" limitStep="2" onePerTurn="no"/> + </Phase> + <Phase name="5"> + <Tiles colour="yellow,green,brown"/> + <Trains limitStep="3"/> + <OperatingRounds number="3"/> + <Privates close="yes"/> + <OffBoardRevenue step="2"/> + </Phase> + <Phase name="6"> + <Trains rusted="3"/> + </Phase> + <Phase name="8"> + <Tiles colour="yellow,green,brown,grey"/> + <Trains rusted="4"/> + </Phase> + </Component> + <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> + </Component> </ComponentManager> \ No newline at end of file diff --git a/data/18JR/CompanyManager.xml b/data/18JR/CompanyManager.xml index 8012694..cd1aaaa 100644 --- a/data/18JR/CompanyManager.xml +++ b/data/18JR/CompanyManager.xml @@ -18,7 +18,7 @@ </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="8"/> - <Trains limit="4,4,3,2"/> + <Trains limit="4,3,2"/> <CanUseSpecialProperties/> </CompanyType> <Company name="SVNRR" type="Private" basePrice="20" revenue="5" diff --git a/data/18JR/Game.xml b/data/18JR/Game.xml index 172c17a..8e81c11 100644 --- a/data/18JR/Game.xml +++ b/data/18JR/Game.xml @@ -1,155 +1,168 @@ -<?xml version="1.0"?> -<ComponentManager> - <Component name="GameManager" class="rails.game.GameManager"> - <Game name="18JR"/> - <!-- GAME OPTIONS must have: - - a name, which must also exist as an entry in LocalText.properties, - - optionally 'type="toggle"', which has the effect that the - selection uses a checkbox instead of a dropdown list. - In this case, 'values' must be absent - (the allowed values are fixed to "yes,no"). - - optionally, 'values="a,b,c"' i,e, a list of allowed values. - - optionally, a default value (only affects a toggle; - in a dropdown the first item is always the default). - --> - <!-- The options in Game.xml are not currently used. - See GamesList.xml for the real ones. - --> - <GameOption name="Variant" values="Basegame,Cotton Port" default="Basegame" /> - <GameOption name="NoMapMode" type="toggle" default="no" /> - <GameOption name="RouteAwareness" values="Highlight,Deactivate" default="Deactivate" /> - <GameOption name="RevenueCalculation" values="Suggest,Deactivate" default="Deactivate" /> - <GameOption name="BeginnerGame" type="toggle" default="no" /> - <GameOption name="WithOptional6Train" type="toggle" default="no"/> - <GameOption name="UnlimitedTopTrains" parm="D" type="toggle" default="no"/> - <GameOption name="UnlimitedTiles" type="toggle" default="no"/> - <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> - <GameOption name="TwoPlayersCertLimit70Percent" type="toggle" default="yes"/> - <GameOption name="SeparateSalesAtSamePrice" type="toggle" default="yes"/> - <GameParameters> - <PlayerShareLimit percentage="60"> - <!-- Option "NumberOfPlayers" is automatically set - by the game engine --> - <IfOption name="NumberOfPlayers" value="2"> - <IfOption name="TwoPlayersCertLimit70Percent" value="yes"> - <Attributes percentage="70"/> - </IfOption> - </IfOption> - </PlayerShareLimit> - <BankPoolLimit percentage="50"/> - <StockRound> - <NoSaleInFirstSR/> - </StockRound> - </GameParameters> - <EndOfGame> - <Bankruptcy/> - <BankBreaks limit="0" finish="setOfORs"/> - <!-- "Runs out"; when "broken", -1 is the limit --> - ... [truncated message content] |
From: Erik V. <ev...@us...> - 2011-07-29 15:59:40
|
data/1826/Game.xml | 3 + data/1830/Game.xml | 3 + data/1835/Game.xml | 4 + data/1851/Game.xml | 3 + data/1856/Game.xml | 4 + data/1870/Game.xml | 3 + data/1880/Game.xml | 4 + data/1889/Game.xml | 4 + data/18AL/Game.xml | 3 + data/18EU/Game.xml | 4 + data/18GA/Game.xml | 3 + data/18Kaas/Game.xml | 3 + data/18Scan/Game.xml | 3 + data/18TN/Game.xml | 4 + data/18VA/Game.xml | 3 + rails/game/GameDef.java | 5 +- rails/game/GameManager.java | 16 +++++- rails/game/OperatingRound.java | 100 +++++++++++++++++++++++++++------------- rails/game/action/BuyTrain.java | 4 - 19 files changed, 134 insertions(+), 42 deletions(-) New commits: commit c0f2c89243a2a47b50ae4e494ab53c8abf71ec49 Author: Erik Vos <eri...@xs...> Date: Fri Jul 29 17:49:02 2011 +0200 Configured emergency train buying rules in all remaining games. diff --git a/data/1826/Game.xml b/data/1826/Game.xml index b757188..9877cbc 100644 --- a/data/1826/Game.xml +++ b/data/1826/Game.xml @@ -22,6 +22,9 @@ <StockRound> <NoSaleInFirstSR/> </StockRound> + <OperatingRound> + <EmergencyTrainBuying mustBuyCheapestTrain="yes" mayBuyFromCompany="yes"/> + </OperatingRound> </GameParameters> <GuiClasses> </GuiClasses> diff --git a/data/1851/Game.xml b/data/1851/Game.xml index 7c2ba99..282329d 100644 --- a/data/1851/Game.xml +++ b/data/1851/Game.xml @@ -15,6 +15,9 @@ <StockRound sequence="SellBuy"> <NoSaleIfNotOperated/> </StockRound> + <OperatingRound> + <EmergencyTrainBuying mustBuyCheapestTrain="yes" mayBuyFromCompany="yes"/> + </OperatingRound> </GameParameters> <EndOfGame> <Bankruptcy/> diff --git a/data/1870/Game.xml b/data/1870/Game.xml old mode 100755 new mode 100644 index dd7f49b..bd7a6dc --- a/data/1870/Game.xml +++ b/data/1870/Game.xml @@ -14,6 +14,9 @@ <StockRound> <NoSaleInFirstSR/> </StockRound> + <OperatingRound> + <EmergencyTrainBuying mustBuyCheapestTrain="yes" mayBuyFromCompany="no"/> + </OperatingRound> </GameParameters> <EndOfGame> <Bankruptcy/> diff --git a/data/1880/Game.xml b/data/1880/Game.xml index a0e5e04..d451ad6 100644 --- a/data/1880/Game.xml +++ b/data/1880/Game.xml @@ -11,7 +11,9 @@ <StockRound class="rails.game.specific._1880.StockRound_1880" sequence="SellBuy"> <NoSaleInFirstSR/> </StockRound> - <OperatingRound class="rails.game.specific._1880.OperatingRound_1880"/> + <OperatingRound class="rails.game.specific._1880.OperatingRound_1880"> + <EmergencyTrainBuying mayBuyFromCompany="no"/> + </OperatingRound> </GameParameters> <GuiClasses> <StatusWindow class="rails.ui.swing.StatusWindow"/> diff --git a/data/1889/Game.xml b/data/1889/Game.xml index f3e70d9..71ed798 100644 --- a/data/1889/Game.xml +++ b/data/1889/Game.xml @@ -36,7 +36,9 @@ <StockRound sequence="SellBuyOrBuySell"> <NoSaleInFirstSR/> </StockRound> - <OperatingRound class="rails.game.specific._1889.OperatingRound_1889"/> + <OperatingRound class="rails.game.specific._1889.OperatingRound_1889"> + <EmergencyTrainBuying mustBuyCheapestTrain="yes" mayBuyFromCompany="no"/> + </OperatingRound> </GameParameters> <EndOfGame> <ForcedSelling CompanyDump="no"/> diff --git a/data/18AL/Game.xml b/data/18AL/Game.xml old mode 100755 new mode 100644 index 6e4b89a..fff9d7c --- a/data/18AL/Game.xml +++ b/data/18AL/Game.xml @@ -18,6 +18,9 @@ <StockRound> <NoSaleInFirstSR/> </StockRound> + <OperatingRound> + <EmergencyTrainBuying mustBuyCheapestTrain="yes" mayBuyFromCompany="no"/> + </OperatingRound> </GameParameters> <GuiClasses> <ORUIManager class="rails.ui.swing.gamespecific._18AL.ORUIManager_18AL"/> diff --git a/data/18EU/Game.xml b/data/18EU/Game.xml index 652f382..682d668 100644 --- a/data/18EU/Game.xml +++ b/data/18EU/Game.xml @@ -16,7 +16,9 @@ <NoSaleInFirstSR/> <NoSaleIfNotOperated/> </StockRound> - <OperatingRound class="rails.game.specific._18EU.OperatingRound_18EU"/> + <OperatingRound class="rails.game.specific._18EU.OperatingRound_18EU"> + <EmergencyTrainBuying mustBuyCheapestTrain="no" mayBuyFromCompany="yes"/> + </OperatingRound> <PlayerShareLimit percentage="60"/> <BankPoolLimit percentage="50"/> <TreasuryShareLimit percentage="80"/> diff --git a/data/18GA/Game.xml b/data/18GA/Game.xml index 9611fa8..2335f43 100644 --- a/data/18GA/Game.xml +++ b/data/18GA/Game.xml @@ -23,6 +23,9 @@ <StockRound> <NoSaleInFirstSR/> </StockRound> + <OperatingRound> + <EmergencyTrainBuying mustBuyCheapestTrain="yes" mayBuyFromCompany="no"/> + </OperatingRound> </GameParameters> <GuiClasses> </GuiClasses> diff --git a/data/18Kaas/Game.xml b/data/18Kaas/Game.xml index 086dd36..bb269d6 100644 --- a/data/18Kaas/Game.xml +++ b/data/18Kaas/Game.xml @@ -17,6 +17,9 @@ <StockRound> <NoSaleInFirstSR/> </StockRound> + <OperatingRound> + <EmergencyTrainBuying mustBuyCheapestTrain="yes" mayBuyFromCompany="yes"/> + </OperatingRound> </GameParameters> <EndOfGame> <Bankruptcy/> diff --git a/data/18Scan/Game.xml b/data/18Scan/Game.xml index 05de9dd..735d96e 100644 --- a/data/18Scan/Game.xml +++ b/data/18Scan/Game.xml @@ -14,6 +14,9 @@ <StockRound sequence="SellBuy"> <NoSaleIfNotOperated/> </StockRound> + <OperatingRound> + <EmergencyTrainBuying mustBuyCheapestTrain="no" mayBuyFromCompany="yes"/> + </OperatingRound> </GameParameters> <GuiClasses> </GuiClasses> diff --git a/data/18TN/Game.xml b/data/18TN/Game.xml index 7ead0ad..31ddc16 100644 --- a/data/18TN/Game.xml +++ b/data/18TN/Game.xml @@ -23,7 +23,9 @@ <StockRound> <NoSaleInFirstSR/> </StockRound> - <OperatingRound class="rails.game.specific._18TN.OperatingRound_18TN"/> + <OperatingRound class="rails.game.specific._18TN.OperatingRound_18TN"> + <EmergencyTrainBuying mustBuyCheapestTrain="yes" mayBuyFromCompany="no"/> + </OperatingRound> </GameParameters> <EndOfGame> <Bankruptcy/> diff --git a/data/18VA/Game.xml b/data/18VA/Game.xml index cd53d42..0beb1ee 100644 --- a/data/18VA/Game.xml +++ b/data/18VA/Game.xml @@ -29,6 +29,9 @@ <StockRound> <NoSaleInFirstSR/> </StockRound> + <OperatingRound> + <EmergencyTrainBuying mustBuyCheapestTrain="no" mayBuyFromCompany="yes"/> + </OperatingRound> </GameParameters> <EndOfGame> <Bankruptcy/> commit b5441119c92dc9d9efed4310d618cab5671627e1 Author: Erik Vos <eri...@xs...> Date: Fri Jul 29 15:38:30 2011 +0200 Added configuration options for train emergency buying. Until now, all games followed the 1830 rules to determine what trains can be bought if a company has no trains and insufficient cash, and for what price. Three configuration options have been added in a new <EmergencyTrainBuying> tag under <OperatingRound>, all having valid values "yes" and "no". All cases only apply to train buys needing additional president cash. (Buys with own company cash are allowed according to the standard train buying rules.) 1. mustBuyCheapestTrain [from the Bank, with president cash]: Yes (default): 1830/Kaas, 1856/70, 18AL/GA/TN, 1826 No: 1835, 18EU/VA/Scan. 2. mayAlwaysBuyNewTrain [if not enough cash for a new train but enough for a used train]: Yes: 1835 [Disputed; disapproving players are advised to ignore the new train offer] No (default): all other games 3. mayBuyFromCompany [up to list price]: Yes (default): 1830/Kaas, 1835, 18EU/VA/Scan, 1826 No: 1856/70, 18AL/GA/TN Only 1830, 1835 and 1856 have been updated so far. diff --git a/data/1830/Game.xml b/data/1830/Game.xml old mode 100755 new mode 100644 index 521f2cd..ecdb701 --- a/data/1830/Game.xml +++ b/data/1830/Game.xml @@ -42,6 +42,9 @@ <StockRound> <NoSaleInFirstSR/> </StockRound> + <OperatingRound> + <EmergencyTrainBuying mustBuyCheapestTrain="no" mayBuyFromCompany="yes"/> + </OperatingRound> </GameParameters> <EndOfGame> <Bankruptcy/> diff --git a/data/1835/Game.xml b/data/1835/Game.xml index 8b11f9f..cc54f5b 100644 --- a/data/1835/Game.xml +++ b/data/1835/Game.xml @@ -19,7 +19,9 @@ <NoSaleInFirstSR/> <NoSaleIfNotOperated/> </StockRound> - <OperatingRound class="rails.game.specific._1835.OperatingRound_1835"/> + <OperatingRound class="rails.game.specific._1835.OperatingRound_1835"> + <EmergencyTrainBuying mustBuyCheapestTrain="no" mayAlwaysBuyNewTrain="yes" mayBuyFromCompany="yes"/> + </OperatingRound> </GameParameters> <GuiClasses> <StatusWindow class="rails.ui.swing.gamespecific._1835.StatusWindow_1835"/> diff --git a/data/1856/Game.xml b/data/1856/Game.xml old mode 100755 new mode 100644 index b89892a..87706d8 --- a/data/1856/Game.xml +++ b/data/1856/Game.xml @@ -16,7 +16,9 @@ <NoSaleInFirstSR/> <NoSaleOfJustBoughtShare/> </StockRound> - <OperatingRound class="rails.game.specific._1856.OperatingRound_1856"/> + <OperatingRound class="rails.game.specific._1856.OperatingRound_1856"> + <EmergencyTrainBuying mustBuyCheapestTrain="yes" mayBuyFromCompany="no"/> + </OperatingRound> <ShareSellingRound class="rails.game.specific._1856.ShareSellingRound_1856"/> <PlayerShareLimit percentage="60"/> <BankPoolLimit percentage="50"/> diff --git a/rails/game/GameDef.java b/rails/game/GameDef.java index 485d5a8..18dff88 100644 --- a/rails/game/GameDef.java +++ b/rails/game/GameDef.java @@ -19,7 +19,10 @@ public class GameDef { FIXED_PRICE_TRAINS_BETWEEN_PRESIDENTS(false), SKIP_FIRST_STOCK_ROUND(false), NO_SALE_OF_JUST_BOUGHT_CERT(false), - REMOVE_TRAIN_BEFORE_SR(false); + REMOVE_TRAIN_BEFORE_SR(false), + EMERGENCY_MUST_BUY_CHEAPEST_TRAIN (true), + EMERGENCY_MAY_ALWAYS_BUY_NEW_TRAIN (false), + EMERGENCY_MAY_BUY_FROM_COMPANY (true); private Object defaultValue; diff --git a/rails/game/GameManager.java b/rails/game/GameManager.java index 7c5a11a..d476d79 100644 --- a/rails/game/GameManager.java +++ b/rails/game/GameManager.java @@ -352,8 +352,7 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { Tag orTag = gameParmTag.getChild("OperatingRound"); if (orTag != null) { String orClassName = - orTag.getAttributeAsString("class", - "rails.game.OperatingRound"); + orTag.getAttributeAsString("class", "rails.game.OperatingRound"); try { operatingRoundClass = Class.forName(orClassName).asSubclass( @@ -368,6 +367,19 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { dynamicOperatingOrder = orderTag.getAttributeAsBoolean("dynamic", dynamicOperatingOrder); } + + Tag emergencyTag = orTag.getChild("EmergencyTrainBuying"); + if (emergencyTag != null) { + setGameParameter (GameDef.Parm.EMERGENCY_MUST_BUY_CHEAPEST_TRAIN, + emergencyTag.getAttributeAsBoolean("mustBuyCheapestTrain", + GameDef.Parm.EMERGENCY_MUST_BUY_CHEAPEST_TRAIN.defaultValueAsBoolean())); + setGameParameter (GameDef.Parm.EMERGENCY_MAY_ALWAYS_BUY_NEW_TRAIN, + emergencyTag.getAttributeAsBoolean("mayAlwaysBuyNewTrain", + GameDef.Parm.EMERGENCY_MAY_ALWAYS_BUY_NEW_TRAIN.defaultValueAsBoolean())); + setGameParameter (GameDef.Parm.EMERGENCY_MAY_BUY_FROM_COMPANY, + emergencyTag.getAttributeAsBoolean("mayBuyFromCompany", + GameDef.Parm.EMERGENCY_MAY_BUY_FROM_COMPANY.defaultValueAsBoolean())); + } } // ShareSellingRound class diff --git a/rails/game/OperatingRound.java b/rails/game/OperatingRound.java index 6c80717..59c1058 100644 --- a/rails/game/OperatingRound.java +++ b/rails/game/OperatingRound.java @@ -2684,9 +2684,11 @@ public class OperatingRound extends Round implements Observer { if (cash == 0 && hasTrains) return; boolean canBuyTrainNow = canBuyTrainNow(); - boolean presidentMayHelp = !hasTrains && operatingCompany.get().mustOwnATrain(); - TrainI cheapestTrain = null; - int costOfCheapestTrain = 0; + boolean mustBuyTrain = !hasTrains && operatingCompany.get().mustOwnATrain(); + boolean emergency = false; + + SortedMap<Integer, TrainI> newEmergencyTrains = new TreeMap<Integer, TrainI>(); + SortedMap<Integer, TrainI> usedEmergencyTrains = new TreeMap<Integer, TrainI>(); TrainManager trainMgr = gameManager.getTrainManager(); // First check if any more trains may be bought from the Bank @@ -2712,13 +2714,11 @@ public class OperatingRound extends Round implements Observer { if (cost <= cash) { if (canBuyTrainNow) { BuyTrain action = new BuyTrain(train, type, ipo, cost); - action.setForcedBuyIfNoRoute(presidentMayHelp); // TEMPORARY + action.setForcedBuyIfNoRoute(mustBuyTrain); // TEMPORARY possibleActions.add(action); } - } else if (costOfCheapestTrain == 0 - || cost < costOfCheapestTrain) { - cheapestTrain = train; - costOfCheapestTrain = cost; + } else if (mustBuyTrain) { + newEmergencyTrains.put(cost, train); } } @@ -2747,7 +2747,7 @@ public class OperatingRound extends Round implements Observer { if (reducedPrice > cash) continue; BuyTrain bt = new BuyTrain(train, ipo, reducedPrice); bt.setSpecialProperty(stb); - bt.setForcedBuyIfNoRoute(presidentMayHelp); // TEMPORARY + bt.setForcedBuyIfNoRoute(mustBuyTrain); // TEMPORARY possibleActions.add(bt); } @@ -2764,21 +2764,52 @@ public class OperatingRound extends Round implements Observer { cost = train.getCost(); if (cost <= cash) { BuyTrain bt = new BuyTrain(train, pool, cost); - bt.setForcedBuyIfNoRoute(presidentMayHelp); // TEMPORARY + bt.setForcedBuyIfNoRoute(mustBuyTrain); // TEMPORARY possibleActions.add(bt); - } else if (costOfCheapestTrain == 0 - || cost < costOfCheapestTrain) { - cheapestTrain = train; - costOfCheapestTrain = cost; + } else if (mustBuyTrain) { + usedEmergencyTrains.put(cost, train); } } - if (!hasTrains && possibleActions.getType(BuyTrain.class).isEmpty() - && cheapestTrain != null && presidentMayHelp) { - BuyTrain bt = new BuyTrain(cheapestTrain, - cheapestTrain.getHolder(), costOfCheapestTrain); - bt.setPresidentMustAddCash(costOfCheapestTrain - cash); - bt.setForcedBuyIfNoRoute(presidentMayHelp); // TODO TEMPORARY - possibleActions.add(bt); + + emergency = mustBuyTrain && possibleActions.getType(BuyTrain.class).isEmpty(); + + // If we must buy a train and haven't found one yet, the president must add cash. + if (emergency + // Some people think it's allowed in 1835 to buy a new train with president cash + // even if the company has enough cash to buy a used train. + // Players who think differently can ignore that extra option. + || getGameParameterAsBoolean (GameDef.Parm.EMERGENCY_MAY_ALWAYS_BUY_NEW_TRAIN) + && !newEmergencyTrains.isEmpty()) { + if (getGameParameterAsBoolean (GameDef.Parm.EMERGENCY_MUST_BUY_CHEAPEST_TRAIN)) { + // Find the cheapest one + // Assume there is always one available from IPO + int cheapestTrainCost = newEmergencyTrains.firstKey(); + TrainI cheapestTrain = newEmergencyTrains.get(cheapestTrainCost); + if (!usedEmergencyTrains.isEmpty() + && usedEmergencyTrains.firstKey() < cheapestTrainCost) { + cheapestTrainCost = usedEmergencyTrains.firstKey(); + cheapestTrain = usedEmergencyTrains.get(cheapestTrainCost); + } + BuyTrain bt = new BuyTrain(cheapestTrain, + cheapestTrain.getHolder(), cheapestTrainCost); + bt.setPresidentMustAddCash(cheapestTrainCost - cash); + bt.setForcedBuyIfNoRoute(mustBuyTrain); // TODO TEMPORARY + possibleActions.add(bt); + } else { + // All possible bank trains are buyable + for (TrainI train : newEmergencyTrains.values()) { + BuyTrain bt = new BuyTrain(train, ipo, train.getCost()); + bt.setPresidentMustAddCash(train.getCost() - cash); + bt.setForcedBuyIfNoRoute(mustBuyTrain); // TODO TEMPORARY + possibleActions.add(bt); + } + for (TrainI train : usedEmergencyTrains.values()) { + BuyTrain bt = new BuyTrain(train, pool, train.getCost()); + bt.setPresidentMustAddCash(train.getCost() - cash); + bt.setForcedBuyIfNoRoute(mustBuyTrain); // TODO TEMPORARY + possibleActions.add(bt); + } + } } } @@ -2791,6 +2822,7 @@ public class OperatingRound extends Round implements Observer { Portfolio pf; int index; int numberOfPlayers = getNumberOfPlayers(); + int presidentCash = operatingCompany.get().getPresident().getCash(); // Set up a list per player of presided companies List<List<PublicCompanyI>> companiesPerPlayer = @@ -2809,7 +2841,7 @@ public class OperatingRound extends Round implements Observer { // first int currentPlayerIndex = getCurrentPlayer().getIndex(); for (int i = currentPlayerIndex; i < currentPlayerIndex - + numberOfPlayers; i++) { + + numberOfPlayers; i++) { companies = companiesPerPlayer.get(i % numberOfPlayers); for (PublicCompanyI company : companies) { pf = company.getPortfolio(); @@ -2817,23 +2849,29 @@ public class OperatingRound extends Round implements Observer { for (TrainI train : trains) { if (train.isObsolete() || !train.isTradeable()) continue; + bt = null; if (i != currentPlayerIndex - //&& trainMgr.buyAtFaceValueBetweenDifferentPresidents() - && getGameParameterAsBoolean(GameDef.Parm.FIXED_PRICE_TRAINS_BETWEEN_PRESIDENTS) + && getGameParameterAsBoolean(GameDef.Parm.FIXED_PRICE_TRAINS_BETWEEN_PRESIDENTS) || operatingCompany.get().mustTradeTrainsAtFixedPrice() || company.mustTradeTrainsAtFixedPrice()) { + // Fixed price if ((cash >= train.getCost()) && (operatingCompany.get().mayBuyTrainType(train))) { bt = new BuyTrain(train, pf, train.getCost()); } else { continue; } - } else { + } else if (cash > 0 + || emergency + && getGameParameterAsBoolean (GameDef.Parm.EMERGENCY_MAY_BUY_FROM_COMPANY)) { bt = new BuyTrain(train, pf, 0); + + // In some games the president may add extra cash up to the list price + if (emergency && cash < train.getCost()) { + bt.setPresidentMayAddCash(Math.min(train.getCost() - cash, + presidentCash)); + } } - if (presidentMayHelp && cash < train.getCost()) { - bt.setPresidentMayAddCash(train.getCost() - cash); - } - possibleActions.add(bt); + if (bt != null) possibleActions.add(bt); } } } @@ -2857,7 +2895,7 @@ public class OperatingRound extends Round implements Observer { /** Reports if a tile lay is allowed by a certain company on a certain hex * <p> - * This method can be used both in retricting possible actions + * This method can be used both in restricting possible actions * and in validating submitted actions. * <p> Currently, only a few standard checks are included. * This method can be extended to perform other generic checks, @@ -2874,7 +2912,7 @@ public class OperatingRound extends Round implements Observer { /** Reports if a token lay is allowed by a certain company on a certain hex and city * <p> - * This method can be used both in retricting possible actions + * This method can be used both in restricting possible actions * and in validating submitted actions. * <p> Currently, only a few standard checks are included. * This method can be extended to perform other generic checks, diff --git a/rails/game/action/BuyTrain.java b/rails/game/action/BuyTrain.java index 59bdc80..f63641f 100644 --- a/rails/game/action/BuyTrain.java +++ b/rails/game/action/BuyTrain.java @@ -33,8 +33,8 @@ public class BuyTrain extends PossibleORAction { /** Obsolete, but left in for backwards compatibility of saved files */ private boolean forcedExchange = false; - private boolean presidentMustAddCash = false; - private boolean presidentMayAddCash = false; + private boolean presidentMustAddCash = false; // If buying from the bank + private boolean presidentMayAddCash = false; // If buying from a company private int presidentCashToAdd = 0; transient private SpecialTrainBuy specialProperty = null; |
From: Brett L. <wak...@us...> - 2011-07-23 20:08:28
|
data/1825/Tiles.xml | 796 data/1826/CompanyManager.xml | 232 data/1826/Map.xml | 190 data/1826/Tiles.xml | 706 data/1830/Map.xml | 372 data/1830/Tiles.xml | 928 data/1835/Tiles.xml | 1020 data/1880/CompanyManager.xml | 406 data/1880/Game.xml | 85 data/1880/Map.xml | 4 data/1880/StockMarket.xml | 117 data/1880/TileSet.xml | 4 data/1880/Tiles.xml | 786 data/18EU/CompanyManager.xml | 258 data/18GA/CompanyManager.xml | 202 data/18GA/Map.xml | 262 data/18GA/Tiles.xml | 578 data/18Scan/CompanyManager.xml | 172 data/18Scan/Map.xml | 124 data/18Scan/Tiles.xml | 382 data/18TN/Map.xml | 150 data/18TN/Tiles.xml | 440 data/18VA/Tiles.xml | 606 tiles/TileDictionary.xml |47982 ++++++++++++++++++++--------------------- tiles/Tiles.xml | 8420 +++---- 25 files changed, 32638 insertions(+), 32584 deletions(-) New commits: commit 89a0bab136a73ac1570bb5a4b3f52b98da4523e2 Author: Martin Brumm <dr....@t-...> Date: Sat Jul 23 08:08:00 2011 +0200 1880 Patch diff --git a/data/1880/CompanyManager.xml b/data/1880/CompanyManager.xml index 2118f9c..cd8dc10 100644 --- a/data/1880/CompanyManager.xml +++ b/data/1880/CompanyManager.xml @@ -29,7 +29,7 @@ capitalisation="incremental"> <Capitalisation Type="incremental"/> <TileLays> - <Number colour="yellow" phase="A2,B1,B2,B3,C1,C2,C3,D1,D2,D3" + <Number colour="yellow" phase="2+2,3,3+3,4,4+4,6,6e,8,8e,10" number="2"/> </TileLays> <Float percentage="60"/> @@ -41,7 +41,7 @@ <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> <Capitalisation type="incremental"/> - <Trains limit="4,4,4,3,3,3,3,3,2,2,2"/> + <Trains limit="4,3,2"/> <CanUseSpecialProperties/> </CompanyType> @@ -84,7 +84,7 @@ </SpecialProperty> </Company> <Company name="IG" longname="Imperial Qing Government" type="Private" - basePrice="160"> + basePrice="160" revenue="20"> <Info key="ComesWithPresidency" parm="BCR,20"/> </Company> <Company name="RC" longname="Rocket Company" type="Private" basePrice="70" diff --git a/data/1880/Game.xml b/data/1880/Game.xml index 8445ed2..a0e5e04 100644 --- a/data/1880/Game.xml +++ b/data/1880/Game.xml @@ -8,11 +8,15 @@ <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> <GameParameters> <PlayerShareLimit percentage="100" /> - <StockRound class="rails.game.specific._1880.StockRound_1880"> + <StockRound class="rails.game.specific._1880.StockRound_1880" sequence="SellBuy"> <NoSaleInFirstSR/> </StockRound> <OperatingRound class="rails.game.specific._1880.OperatingRound_1880"/> </GameParameters> + <GuiClasses> + <StatusWindow class="rails.ui.swing.StatusWindow"/> + <StartRoundWindow class="rails.ui.swing.gamespecific._1880.StartRoundWindow_1880"/> + </GuiClasses> <EndOfGame/> <!-- need to implement the 3 OR set limit after purchase of first 8 TrainType --> </Component> @@ -31,7 +35,7 @@ <Component name="Map" class="rails.game.MapManager" file="Map.xml"/> <Component name="CompanyManager" class="rails.game.CompanyManager" file="CompanyManager.xml"/> - <Component name="StockMarket" class="rails.game.StockMarket" + <Component name="StockMarket" class="rails.game.specific._1880.StockMarket_1880" file="StockMarket.xml"/> <Component name="TrainManager" class="rails.game.TrainManager"> <Defaults> @@ -39,80 +43,107 @@ <Score towns="yes"/> </Defaults> <TrainType name="2" majorStops="2" cost="100" quantity="10"/> - <TrainType name="2+2" majorStops="2" minorStops="2" cost="180" quantity="5"/> - <TrainType name="3" majorStops="3" cost="180" quantity="6" startPhase="2"/> - <TrainType name="3+3" majorStops="3" minorStops="3" cost="300" quantity="5" startPhase="3"/> - <TrainType name="4" majorStops="4" cost="300" quantity="5" startPhase="4" rustedTrain="2"/> - <TrainType name="4+4" majorStops="4" minorStops="4" cost="450" quantity="5" startPhase="5" rustedTrain="2+2"/> - <TrainType name="6" majorStops="6" cost="600" quantity="5" startPhase="6" rustedTrain="3"/> - <TrainType name="6e" majorStops="-1" cost="700" quantity="5" startPhase="7" rustedTrain="3+3"/> + <TrainType name="2+2" majorStops="2" minorStops="2" cost="180" quantity="5"> + <NewPhase phaseName="2+2"/> + </TrainType> + <TrainType name="3" majorStops="3" cost="180" quantity="6"> + <NewPhase phaseName="3"/> + </TrainType> + <TrainType name="3+3" majorStops="3" minorStops="3" cost="300" quantity="5"> + <NewPhase phaseName="3+3"/> + </TrainType> + <TrainType name="4" majorStops="4" cost="300" quantity="5"> + <NewPhase phaseName="4"/> + </TrainType> + <TrainType name="4+4" majorStops="4" minorStops="4" cost="450" quantity="5"> + <NewPhase phaseName="4+4"/> + </TrainType> + <TrainType name="6" majorStops="6" cost="600" quantity="5"> + <NewPhase phaseName="6"/> + </TrainType> + <TrainType name="6e" majorStops="-1" cost="700" quantity="5"> + <NewPhase phaseName="6e"/> + </TrainType> <!-- majorStops="-1" indicates that this not a normally running train--> <!-- The e-type trains are express trains that can ignore towns/cities on their way for a maximum payout--> - <TrainType name="8" majorStops="8" cost="800" quantity="2" startPhase="8" rustedTrain="4"/> - <TrainType name="8e" majorStops="-1" cost="900" quantity="2" rustedTrain="4+4"/> + <TrainType name="8" majorStops="8" cost="800" quantity="2"> + <NewPhase phaseName="8"/> + </TrainType> + <TrainType name="8e" majorStops="-1" cost="900" quantity="2"> + <NewPhase phaseName="8e"/> + </TrainType> <!-- majorStops="-1" indicates that this not a normally running train--> <!-- The e-type trains are express trains that can ignore towns/cities on their way for a maximum payout--> - <TrainType name="10" majorStops="10" cost="1000" quantity="-1"/> + <TrainType name="10" majorStops="10" cost="1000" quantity="-1"> + <NewPhase phaseName="8e"/> + </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> - <Phase name="A1"> + <Phase name="2" realName="A1"> <Tiles colour="yellow"/> <OperatingRounds number="-1"/> <Float percentage="20"/> <Trains tradingAllowed="yes"/> <Stocks avail="5"/> </Phase> - <Phase name="A2"> - <Tiles colour="yellow"/> - + <Phase name="2+2" realName="A2"> + <Tiles colour="yellow"/> </Phase> - <Phase name="B1"> + <Phase name="3" realName="B1"> <Tiles colour="yellow,green"/> <Float percentage="30"/> <Stocks avail="10"/> <OffBoardRevenue step="2"/> </Phase> - <Phase name="B2"> + <Phase name="3+3" realName="B2"> <Tiles colour="yellow,green"/> <OffBoardRevenue step="2"/> </Phase> - <Phase name="B3"> + <Phase name="4" realName="B3"> <Tiles colour="yellow,green"/> <OffBoardRevenue step="2"/> <Privates close="yes"/> <Investors active="no"/> <Communists active="yes"/> <Float percentage="40"/> + <Trains limitStep="2" rusted="2"/> </Phase> - <Phase name="C1"> + <Phase name="4+4" realName="C1"> <Tiles colour="yellow,green,brown"/> <OffBoardRevenue step="3"/> + <Trains rusted="2+2"/> </Phase> - <Phase name="C2"> + <Phase name="6" realName="C2"> <Tiles colour="yellow,green,brown"/> <Comunists active="no"/> <Float percentage="60"/> <OffBoardRevenue step="3"/> + <Trains limitStep="3" rusted="3"/> </Phase> - <Phase name="C3"> + <Phase name="6e" realName="C3"> <Tiles colour="yellow,green,brown"/> <OffBoardRevenue step="3"/> + <Trains limitStep="3" rusted="3+3"/> </Phase> - <Phase name="D1"> + <Phase name="8" realName="D1"> <Tiles colour="yellow,green,brown,grey"/> <OffBoardRevenue step="4"/> + <Trains limitStep="3" rusted="4"/> </Phase> - <Phase name="D2"> + <Phase name="8e" realName="D2"> <Tiles colour="yellow,green,brown,grey"/> <OffBoardRevenue step="4"/> + <Trains limitStep="3" rusted="4+4"/> </Phase> - <Phase name="D3"> - <Tiles colour="yellow,green,brown,grey"/> - <OffBoardRevenue step="4"/> + <Phase name="8e" realName="D3"> </Phase> <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> <Modifier class="rails.game.specific._1880.OffBoardRevenueModifier" /> <Modifier class="rails.game.specific._1880.ExpressTrainRevenueModifier" /> </Component> </Component> + <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> + <Modifier class="rails.game.specific._1826.TGVModifier" /> + </Component> + </ComponentManager> \ No newline at end of file diff --git a/data/1880/Map.xml b/data/1880/Map.xml index d6be686..a5f2214 100644 --- a/data/1880/Map.xml +++ b/data/1880/Map.xml @@ -36,6 +36,8 @@ <Hex name="F6" tile="-80001" city="Test8" cost="30" /> <Hex name="F8" tile="-80004" city="Beijing" orientation="5" label="Beijing"/> <Hex name="F10" tile="-10" city="Tianjin" /> + <Hex name="F12" tile="-4008" orientation="1"/> + <Hex name="F14" tile="-4008" orientation="6"/> <Hex name="G1" tile="0" cost="20" /> <Hex name="G3" tile="-10" city="Baotou" cost="20" /> <Hex name="G5" tile="0" cost="50" /> @@ -58,6 +60,7 @@ <Hex name="I9" tile="-80020" city="Kaifeng, Zhengzhou" cost="20" /> <Hex name="I11" tile="0" /> <Hex name="I13" tile="0" /> + <Hex name="I15" tile="-4009" orientation="2"/> <Hex name="J2" tile="-10" city="Lhasa" cost="50"/> <Hex name="J4" tile="0" cost="30"/> <Hex name="J6" tile="-10" cost="30" city="Xian" /> @@ -65,6 +68,7 @@ <Hex name="J10" tile="0" /> <Hex name="J12" tile="-10" city="Hefei" /> <Hex name="J14" tile="-1" cost="20"/> + <Hex name="J16" tile="-4008" orientation="6"/> <Hex name="K1" tile="-903" orientation="5" value="0,0,0,80" city="Lhasa" /> <Hex name="K3" tile="0" cost="30" /> <Hex name="K5" tile="-1" cost="30" /> diff --git a/data/1880/StockMarket.xml b/data/1880/StockMarket.xml index 0b25a98..5960108 100644 --- a/data/1880/StockMarket.xml +++ b/data/1880/StockMarket.xml @@ -1,10 +1,21 @@ <?xml version="1.0" encoding="UTF-8"?> <StockMarket type="rectangular"> <UpOrDownRight /> - <StockSpaceType name="revenue5" colour="255,255,100" /> - <StockSpaceType name="revenue10" colour="255,255,0" /> - <StockSpaceType name="revenue15" colour="100,255,255" /> - <StockSpaceType name="revenue20" colour="0,255,255" /> + <StockSpaceType name="yellow" colour="255,255,100"> + <Revenue5/> + </StockSpaceType> + <StockSpaceType name="umbra" colour="255,255,0"> + <Revenue10 /> + </StockSpaceType> + <StockSpaceType name="orange" colour="100,255,255"> + <Revenue15 /> + </StockSpaceType> + <StockSpaceType name="sepia" colour="0,255,255"> + <Revenue20 /> + </StockSpaceType> + <StockSpaceType name="brown" colour="0,255,255"> + <Revenue40 /> + </StockSpaceType> <StockSpace name="A3" price="70" /> <StockSpace name="A4" price="65" /> <StockSpace name="A5" price="60" /> @@ -31,19 +42,19 @@ <StockSpace name="C9" price="60" /> <StockSpace name="D1" price="105" /> <StockSpace name="D2" price="100" > - <StartSpace /> + <StartSpace parslots="4"/> </StockSpace> <StockSpace name="D3" price="95" /> <StockSpace name="D4" price="90" > - <StartSpace /> + <StartSpace parslots="4"/> </StockSpace> <StockSpace name="D5" price="85" /> <StockSpace name="D6" price="80" > - <StartSpace /> + <StartSpace parslots="4"/> </StockSpace> <StockSpace name="D7" price="75" /> <StockSpace name="D8" price="70" > - <StartSpace /> + <StartSpace parslots="4"/> </StockSpace> <StockSpace name="D9" price="65" /> <StockSpace name="E1" price="110" /> @@ -55,48 +66,48 @@ <StockSpace name="E7" price="80" /> <StockSpace name="E8" price="75" /> <StockSpace name="E9" price="70" /> - <StockSpace name="F1" price="115" type="revenue5" /> - <StockSpace name="F2" price="110" type="revenue5" /> - <StockSpace name="F3" price="105" type="revenue5" /> - <StockSpace name="F4" price="100" type="revenue5" /> - <StockSpace name="F5" price="95" type="revenue5" /> - <StockSpace name="F6" price="90" type="revenue5" /> - <StockSpace name="F7" price="85" type="revenue5" /> - <StockSpace name="G1" price="120" type="revenue5" /> - <StockSpace name="G2" price="115" type="revenue5" /> - <StockSpace name="G3" price="110" type="revenue5" /> - <StockSpace name="G4" price="105" type="revenue5" /> - <StockSpace name="G5" price="100" type="revenue5" /> - <StockSpace name="G6" price="95" type="revenue5" /> - <StockSpace name="G7" price="90" type="revenue5" /> - <StockSpace name="H1" price="125" type="revenue5" /> - <StockSpace name="H2" price="120" type="revenue5" /> - <StockSpace name="H3" price="115" type="revenue5" /> - <StockSpace name="H4" price="110" type="revenue5" /> - <StockSpace name="H5" price="105" type="revenue5" /> - <StockSpace name="H6" price="100" type="revenue5" /> - <StockSpace name="I1" price="130" type="revenue10" /> - <StockSpace name="I2" price="125" type="revenue10" /> - <StockSpace name="I3" price="120" type="revenue10" /> - <StockSpace name="I4" price="115" type="revenue10" /> - <StockSpace name="I5" price="110" type="revenue10" /> - <StockSpace name="J1" price="140" type="revenue10" /> - <StockSpace name="J2" price="135" type="revenue10" /> - <StockSpace name="J3" price="130" type="revenue10" /> - <StockSpace name="J4" price="125" type="revenue10" /> - <StockSpace name="J5" price="120" type="revenue10" /> - <StockSpace name="K1" price="150" type="revenue15" /> - <StockSpace name="K2" price="145" type="revenue15" /> - <StockSpace name="K3" price="140" type="revenue15" /> - <StockSpace name="K4" price="135" type="revenue15" /> - <StockSpace name="L1" price="160" type="revenue15" /> - <StockSpace name="L2" price="155" type="revenue15" /> - <StockSpace name="L3" price="150" type="revenue15" /> - <StockSpace name="L4" price="145" type="revenue15" /> - <StockSpace name="M1" price="180" type="revenue20" /> - <StockSpace name="M2" price="170" type="revenue20" /> - <StockSpace name="M3" price="165" type="revenue20" /> - <StockSpace name="N1" price="200" type="revenue20" /> - <StockSpace name="N2" price="190" type="revenue20" /> - <StockSpace name="N3" price="180" type="revenue20" /> -</StockMarket> + <StockSpace name="F1" price="115" type="yellow" /> + <StockSpace name="F2" price="110" type="yellow" /> + <StockSpace name="F3" price="105" type="yellow" /> + <StockSpace name="F4" price="100" type="yellow" /> + <StockSpace name="F5" price="95" type="yellow" /> + <StockSpace name="F6" price="90" type="yellow" /> + <StockSpace name="F7" price="85" type="yellow" /> + <StockSpace name="G1" price="120" type="yellow" /> + <StockSpace name="G2" price="115" type="yellow" /> + <StockSpace name="G3" price="110" type="yellow" /> + <StockSpace name="G4" price="105" type="yellow" /> + <StockSpace name="G5" price="100" type="yellow" /> + <StockSpace name="G6" price="95" type="yellow" /> + <StockSpace name="G7" price="90" type="yellow" /> + <StockSpace name="H1" price="125" type="yellow" /> + <StockSpace name="H2" price="120" type="yellow" /> + <StockSpace name="H3" price="115" type="yellow" /> + <StockSpace name="H4" price="110" type="yellow" /> + <StockSpace name="H5" price="105" type="yellow" /> + <StockSpace name="H6" price="100" type="yellow" /> + <StockSpace name="I1" price="130" type="umbra" /> + <StockSpace name="I2" price="125" type="umbra" /> + <StockSpace name="I3" price="120" type="umbra" /> + <StockSpace name="I4" price="115" type="umbra" /> + <StockSpace name="I5" price="110" type="umbra" /> + <StockSpace name="J1" price="140" type="umbra" /> + <StockSpace name="J2" price="135" type="umbra" /> + <StockSpace name="J3" price="130" type="umbra" /> + <StockSpace name="J4" price="125" type="umbra" /> + <StockSpace name="J5" price="120" type="umbra" /> + <StockSpace name="K1" price="150" type="orange" /> + <StockSpace name="K2" price="145" type="orange" /> + <StockSpace name="K3" price="140" type="orange" /> + <StockSpace name="K4" price="135" type="orange" /> + <StockSpace name="L1" price="160" type="orange" /> + <StockSpace name="L2" price="155" type="orange" /> + <StockSpace name="L3" price="150" type="orange" /> + <StockSpace name="L4" price="145" type="orange" /> + <StockSpace name="M1" price="180" type="sepia" /> + <StockSpace name="M2" price="170" type="sepia" /> + <StockSpace name="M3" price="165" type="sepia" /> + <StockSpace name="N1" price="200" type="brown" /> + <StockSpace name="N2" price="190" type="sepia" /> + <StockSpace name="N3" price="180" type="sepia" /> +</StockMarket> \ No newline at end of file diff --git a/data/1880/TileSet.xml b/data/1880/TileSet.xml index 3415315..fdcf3a8 100644 --- a/data/1880/TileSet.xml +++ b/data/1880/TileSet.xml @@ -9,6 +9,8 @@ <Tile id="-2"><!-- 2 towns --> <Upgrade id="8854,8855,8856,8857,8858" /> </Tile> + <Tile id="-4008"></Tile> + <Tile id="-4009"></Tile> <Tile id="-10"><!-- 1 city --> <Upgrade id="5,6,57"/> </Tile> @@ -19,7 +21,7 @@ <Upgrade id="5,6,57,8850,8851,8852" /> </Tile> <Tile id="-80002"> - <Upgrade id="8854,8855,8856,8857,8858,235" /> + <Upgrade id="235,8854,8855,8856,8857,8858" /> </Tile> <Tile id="-80003"> <Upgrade id="8887" /> diff --git a/data/1880/Tiles.xml b/data/1880/Tiles.xml index 41bd077..34f548a 100644 --- a/data/1880/Tiles.xml +++ b/data/1880/Tiles.xml @@ -1,8 +1,14 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?><Tiles><Tile colour="white" id="0" name="empty"/><Tile colour="white" id="-1" name="1 village"> +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<Tiles><Tile colour="white" id="0" name="empty"/> + <Tile colour="white" id="-1" name="1 village"> <Station id="city1" position="002" type="Town"/> </Tile><Tile colour="white" id="-2" name="2 villages"> <Station id="city1" position="102" type="Town"/> <Station id="city2" position="302" type="Town"/> + </Tile><Tile colour="fixed" id="-4008"> + <Track from="side3" gauge="narrow" to="side5"/> + </Tile><Tile colour="fixed" id="-4009"> + <Track from="side3" gauge="normal" to="side0"/> </Tile><Tile colour="white" id="-10" name="1 city"> <Station id="city1" position="302" slots="1" type="City"/> </Tile><Tile colour="white" id="-80020" name="2 cities Initial"> commit 4925b20335ea534894e00895e9b3f90dc5fe26c7 Author: Brett Lentz <bl...@cl...> Date: Sat Jul 23 12:55:56 2011 -0700 convert all xml files from dos to unix format. diff --git a/data/1825/Tiles.xml b/data/1825/Tiles.xml index 63697e7..0c98c87 100644 --- a/data/1825/Tiles.xml +++ b/data/1825/Tiles.xml @@ -1,399 +1,399 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<Tiles> - <Tile colour="white" id="0" name="empty"/> - <Tile colour="white" id="-1" name="1 village"> - <Station id="city1" position="002" type="Town"/> - </Tile> - <Tile colour="white" id="-2" name="2 villages"> - <Station id="city1" position="102" type="Town"/> - <Station id="city2" position="302" type="Town"/> - </Tile> - <Tile colour="white" id="-10" name="1 city"> - <Station id="city1" position="302" slots="1" type="City"/> - </Tile> - <Tile colour="yellow" id="-20" name="2 cities"> - <Station id="city1" position="002" slots="1" type="City"/> - <Station id="city2" position="302" slots="1" type="City"/> - </Tile> - <Tile colour="fixed" id="-5" name="MF 5"> - <Station id="city1" position="0" slots="1" type="City" value="20"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side1"/> - </Tile> - <Tile colour="fixed" id="-7" name="MF 7"> - <Track from="side2" gauge="normal" to="side1"/> - </Tile> - <Tile colour="fixed" id="-41" name="-41"> - <Track from="side0" gauge="normal" to="side3"/> - <Track from="side4" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="side3"/> - </Tile> - <Tile colour="fixed" id="-104" name="MF 104"> - <Station id="city1" position="0" slots="1" type="City" value="20"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="green" id="-25001" name="London"> - <Station id="city1" position="403" slots="1" type="City" value="50"/> - <Station id="city2" position="503" slots="1" type="City" value="50"/> - <Station id="city3" position="003" slots="1" type="City" value="50"/> - <Station id="city4" position="103" slots="1" type="City" value="50"/> - <Station id="city5" position="203" slots="1" type="City" value="50"/> - <Station id="city6" position="303" slots="1" type="City" value="50"/> - <Track from="side5" gauge="normal" to="city2"/> - <Track from="side4" gauge="normal" to="city1"/> - <Track from="side3" gauge="normal" to="city6"/> - <Track from="side2" gauge="normal" to="city5"/> - <Track from="side1" gauge="normal" to="city4"/> - <Track from="side0" gauge="normal" to="city3"/> - </Tile> - <Tile colour="green" id="-25002" name="B/M/G"> - <Station id="city1" position="402" slots="1" type="City" value="40"/> - <Station id="city2" position="002" slots="1" type="City" value="40"/> - <Station id="city3" position="202" slots="1" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city3" gauge="normal" to="side2"/> - <Track from="side0" gauge="normal" to="city2"/> - </Tile> - <Tile colour="green" id="-25003" name="Bristol"> - <Station id="city1" position="0" slots="1" type="City" value="30"/> - <Track from="side3" gauge="normal" to="city1"/> - <Track from="city1" gauge="normal" to="side1"/> - </Tile> - <Tile colour="fixed" id="-25004" name="Wolverton"> - <Station id="city1" position="0" slots="1" type="City" value="10"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="fixed" id="-25005" name="Swindon"> - <Station id="city1" position="0" slots="1" type="City" value="10"/> - <Track from="side4" gauge="normal" to="city1"/> - <Track from="side5" gauge="normal" to="city1"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="fixed" id="-25006" name="Southend"> - <Station id="city1" position="102" slots="1" type="City" value="20"/> - <Track from="side4" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="city1"/> - <Track from="side3" gauge="normal" to="side2"/> - </Tile> - <Tile colour="fixed" id="-25007" name="Bournemouth"> - <Station id="city1" position="0" slots="1" type="City" value="20"/> - <Station id="city2" position="0" slots="1" type="City" value="20"/> - <Track from="side4" gauge="normal" to="city2"/> - <Track from="side5" gauge="normal" to="city2"/> - <Track from="side0" gauge="normal" to="city2"/> - </Tile> - <Tile colour="fixed" id="-25008" name="Barrow"> - <Station id="city1" position="552" slots="1" type="City" value="10"/> - <Station id="city2" position="152" type="Town" value="10"/> - <Track from="side5" gauge="normal" to="city1"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city2" gauge="normal" to="side2"/> - </Tile> - <Tile colour="green" id="-25009" name="Liverpool"> - <Station id="city1" position="002" slots="1" type="City" value="40"/> - <Station id="city2" position="202" slots="1" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side2"/> - </Tile> - <Tile colour="fixed" id="-25010" name="Doncaster"> - <Station id="city1" position="351" slots="1" type="City" value="20"/> - <Station id="city2" position="051" slots="1" type="City" value="20"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city2" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city2" gauge="normal" to="side5"/> - </Tile> - <Tile colour="fixed" id="-25011" name="Aberdeen"> - <Station id="city1" position="0" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side3"/> - </Tile> - <Tile colour="fixed" id="-25012" name="Helensburgh"> - <Station id="city1" position="202" type="Town" value="10"/> - <Station id="city2" position="102" type="Town" value="10"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="fixed" id="-25013" name="Anstruther"> - <Station id="city1" position="502" type="Town" value="10"/> - <Track from="side2" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="fixed" id="-25014" name="Maryport"> - <Station id="city1" position="051" slots="1" type="City" value="10"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - </Tile> - <Tile colour="fixed" id="-25015" name="Milford H."> - <Station id="city1" position="052" slots="1" type="City" value="10"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - </Tile> - <Tile colour="fixed" id="-25016" name="Highbridge"> - <Station id="city1" position="151" slots="1" type="City" value="10"/> - <Track from="side0" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="yellow" id="1" name="1"> - <Station id="city1" position="408" type="Town" value="10"/> - <Station id="city2" position="108" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city2" gauge="normal" to="side3"/> - </Tile> - <Tile colour="yellow" id="2" name="2"> - <Station id="city1" position="302" type="Town" value="10"/> - <Station id="city2" position="109" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city2" gauge="normal" to="side2"/> - </Tile> - <Tile colour="yellow" id="3" name="3"> - <Station id="city1" position="352" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - </Tile> - <Tile colour="yellow" id="4" name="4"> - <Station id="city1" position="0" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side0"/> - </Tile> - <Tile colour="yellow" id="5" name="5"> - <Station id="city1" position="0" slots="1" type="City" value="20"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="yellow" id="6" name="6"> - <Station id="city1" position="0" slots="1" type="City" value="20"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="yellow" id="7" name="7"> - <Track from="side3" gauge="normal" to="side4"/> - </Tile> - <Tile colour="yellow" id="8" name="8"> - <Track from="side3" gauge="normal" to="side5"/> - </Tile> - <Tile colour="yellow" id="9" name="9"> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="yellow" id="55" name="55"> - <Station id="city1" position="202" type="Town" value="10"/> - <Station id="city2" position="302" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city2" gauge="normal" to="side3"/> - <Track from="city2" gauge="normal" to="side0"/> - </Tile> - <Tile colour="yellow" id="56" name="56"> - <Station id="city1" position="407" type="Town" value="10"/> - <Station id="city2" position="108" type="Town" value="10"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city2" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side2"/> - </Tile> - <Tile colour="green" id="12" name="12"> - <Station id="city1" position="0" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - </Tile> - <Tile colour="green" id="13" name="13"> - <Station id="city1" position="0" slots="1" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - </Tile> - <Tile colour="green" id="14" name="14"> - <Station id="city1" position="0" slots="2" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="15" name="15"> - <Station id="city1" position="0" slots="2" type="City" value="30"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city1" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="16" name="16"> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side4" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="19" name="19"> - <Track from="side5" gauge="normal" to="side1"/> - <Track from="side0" gauge="normal" to="side3"/> - </Tile> - <Tile colour="green" id="20" name="20"> - <Track from="side1" gauge="normal" to="side4"/> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="23" name="23"> - <Track from="side4" gauge="normal" to="side0"/> - <Track from="side0" gauge="normal" to="side3"/> - </Tile> - <Tile colour="green" id="24" name="24"> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="25" name="25"> - <Track from="side1" gauge="normal" to="side3"/> - <Track from="side3" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="26" name="26"> - <Track from="side5" gauge="normal" to="side0"/> - <Track from="side0" gauge="normal" to="side3"/> - </Tile> - <Tile colour="green" id="27" name="27"> - <Track from="side3" gauge="normal" to="side4"/> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="green" id="28" name="28"> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side4" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="29" name="29"> - <Track from="side3" gauge="normal" to="side4"/> - <Track from="side3" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="1052" name="52"> - <Station id="city1" position="152" slots="1" type="City" value="40"/> - <Station id="city2" position="452" slots="1" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city2" gauge="normal" to="side4"/> - </Tile> - <Tile colour="green" id="87" name="87"> - <Station id="city1" position="0" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="green" id="88" name="88"> - <Station id="city1" position="0" type="Town" value="10"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="32" name="32"> - <Station id="city1" position="303" slots="1" type="City" value="70"/> - <Station id="city2" position="403" slots="1" type="City" value="70"/> - <Station id="city3" position="503" slots="1" type="City" value="70"/> - <Station id="city4" position="003" slots="1" type="City" value="70"/> - <Station id="city5" position="103" slots="1" type="City" value="70"/> - <Station id="city6" position="203" slots="1" type="City" value="70"/> - <Track from="city6" gauge="normal" to="side2"/> - <Track from="city5" gauge="normal" to="side1"/> - <Track from="city4" gauge="normal" to="side0"/> - <Track from="city3" gauge="normal" to="side5"/> - <Track from="city2" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side3"/> - </Tile> - <Tile colour="brown" id="33" name="33"> - <Station id="city1" position="102" slots="1" type="City" value="50"/> - <Station id="city2" position="302" slots="1" type="City" value="50"/> - <Station id="city3" position="502" slots="1" type="City" value="50"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city2" gauge="normal" to="side3"/> - <Track from="city3" gauge="normal" to="side4"/> - </Tile> - <Tile colour="brown" id="34" name="34"> - <Station id="city1" position="352" slots="1" type="City" value="50"/> - <Station id="city2" position="052" slots="1" type="City" value="50"/> - <Station id="city3" position="502" slots="1" type="City" value="50"/> - <Track from="city2" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city3" gauge="normal" to="side2"/> - <Track from="city3" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="38" name="38"> - <Station id="city1" position="0" slots="2" type="City" value="40"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city1" gauge="normal" to="side2"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="41" name="41"> - <Track from="side4" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="side3"/> - <Track from="side0" gauge="normal" to="side3"/> - </Tile> - <Tile colour="brown" id="42" name="42"> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side3" gauge="normal" to="side0"/> - <Track from="side5" gauge="normal" to="side0"/> - </Tile> - <Tile colour="brown" id="45" name="45"> - <Track from="side1" gauge="normal" to="side5"/> - <Track from="side1" gauge="normal" to="side3"/> - <Track from="side5" gauge="normal" to="side0"/> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="brown" id="46" name="46"> - <Track from="side1" gauge="normal" to="side5"/> - <Track from="side1" gauge="normal" to="side0"/> - <Track from="side3" gauge="normal" to="side5"/> - <Track from="side3" gauge="normal" to="side0"/> - </Tile> - <Tile colour="brown" id="47" name="47"> - <Track from="side3" gauge="normal" to="side0"/> - <Track from="side3" gauge="normal" to="side1"/> - <Track from="side4" gauge="normal" to="side0"/> - <Track from="side4" gauge="normal" to="side1"/> - </Tile> - <Tile colour="brown" id="64" name="64"> - <Station id="city1" position="401" slots="1" type="City" value="50"/> - <Station id="city2" position="052" slots="1" type="City" value="50"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side5"/> - <Track from="city2" gauge="normal" to="side1"/> - <Track from="city2" gauge="normal" to="side0"/> - </Tile> - <Tile colour="brown" id="65" name="65"> - <Station id="city1" position="501" slots="1" type="City" value="50"/> - <Station id="city2" position="252" slots="1" type="City" value="50"/> - <Track from="city1" gauge="normal" to="side4"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side2"/> - <Track from="city2" gauge="normal" to="side3"/> - </Tile> - <Tile colour="brown" id="66" name="66"> - <Station id="city1" position="002" slots="1" type="City" value="50"/> - <Station id="city2" position="452" slots="1" type="City" value="50"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city1" gauge="normal" to="side0"/> - <Track from="city2" gauge="normal" to="side4"/> - <Track from="city2" gauge="normal" to="side5"/> - </Tile> - <Tile colour="brown" id="67" name="67"> - <Station id="city1" position="307" slots="1" type="City" value="50"/> - <Station id="city2" position="502" slots="1" type="City" value="50"/> - <Track from="city1" gauge="normal" to="side1"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city2" gauge="normal" to="side5"/> - <Track from="city2" gauge="normal" to="side2"/> - </Tile> - <Tile colour="brown" id="68" name="68"> - <Station id="city1" position="302" slots="1" type="City" value="50"/> - <Station id="city2" position="502" slots="1" type="City" value="50"/> - <Track from="city1" gauge="normal" to="side3"/> - <Track from="city2" gauge="normal" to="side2"/> - <Track from="city2" gauge="normal" to="side5"/> - <Track from="city1" gauge="normal" to="side0"/> - </Tile> +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<Tiles> + <Tile colour="white" id="0" name="empty"/> + <Tile colour="white" id="-1" name="1 village"> + <Station id="city1" position="002" type="Town"/> + </Tile> + <Tile colour="white" id="-2" name="2 villages"> + <Station id="city1" position="102" type="Town"/> + <Station id="city2" position="302" type="Town"/> + </Tile> + <Tile colour="white" id="-10" name="1 city"> + <Station id="city1" position="302" slots="1" type="City"/> + </Tile> + <Tile colour="yellow" id="-20" name="2 cities"> + <Station id="city1" position="002" slots="1" type="City"/> + <Station id="city2" position="302" slots="1" type="City"/> + </Tile> + <Tile colour="fixed" id="-5" name="MF 5"> + <Station id="city1" position="0" slots="1" type="City" value="20"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side1"/> + </Tile> + <Tile colour="fixed" id="-7" name="MF 7"> + <Track from="side2" gauge="normal" to="side1"/> + </Tile> + <Tile colour="fixed" id="-41" name="-41"> + <Track from="side0" gauge="normal" to="side3"/> + <Track from="side4" gauge="normal" to="side0"/> + <Track from="side4" gauge="normal" to="side3"/> + </Tile> + <Tile colour="fixed" id="-104" name="MF 104"> + <Station id="city1" position="0" slots="1" type="City" value="20"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="green" id="-25001" name="London"> + <Station id="city1" position="403" slots="1" type="City" value="50"/> + <Station id="city2" position="503" slots="1" type="City" value="50"/> + <Station id="city3" position="003" slots="1" type="City" value="50"/> + <Station id="city4" position="103" slots="1" type="City" value="50"/> + <Station id="city5" position="203" slots="1" type="City" value="50"/> + <Station id="city6" position="303" slots="1" type="City" value="50"/> + <Track from="side5" gauge="normal" to="city2"/> + <Track from="side4" gauge="normal" to="city1"/> + <Track from="side3" gauge="normal" to="city6"/> + <Track from="side2" gauge="normal" to="city5"/> + <Track from="side1" gauge="normal" to="city4"/> + <Track from="side0" gauge="normal" to="city3"/> + </Tile> + <Tile colour="green" id="-25002" name="B/M/G"> + <Station id="city1" position="402" slots="1" type="City" value="40"/> + <Station id="city2" position="002" slots="1" type="City" value="40"/> + <Station id="city3" position="202" slots="1" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city3" gauge="normal" to="side2"/> + <Track from="side0" gauge="normal" to="city2"/> + </Tile> + <Tile colour="green" id="-25003" name="Bristol"> + <Station id="city1" position="0" slots="1" type="City" value="30"/> + <Track from="side3" gauge="normal" to="city1"/> + <Track from="city1" gauge="normal" to="side1"/> + </Tile> + <Tile colour="fixed" id="-25004" name="Wolverton"> + <Station id="city1" position="0" slots="1" type="City" value="10"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="fixed" id="-25005" name="Swindon"> + <Station id="city1" position="0" slots="1" type="City" value="10"/> + <Track from="side4" gauge="normal" to="city1"/> + <Track from="side5" gauge="normal" to="city1"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="fixed" id="-25006" name="Southend"> + <Station id="city1" position="102" slots="1" type="City" value="20"/> + <Track from="side4" gauge="normal" to="side0"/> + <Track from="side4" gauge="normal" to="city1"/> + <Track from="side3" gauge="normal" to="side2"/> + </Tile> + <Tile colour="fixed" id="-25007" name="Bournemouth"> + <Station id="city1" position="0" slots="1" type="City" value="20"/> + <Station id="city2" position="0" slots="1" type="City" value="20"/> + <Track from="side4" gauge="normal" to="city2"/> + <Track from="side5" gauge="normal" to="city2"/> + <Track from="side0" gauge="normal" to="city2"/> + </Tile> + <Tile colour="fixed" id="-25008" name="Barrow"> + <Station id="city1" position="552" slots="1" type="City" value="10"/> + <Station id="city2" position="152" type="Town" value="10"/> + <Track from="side5" gauge="normal" to="city1"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city2" gauge="normal" to="side2"/> + </Tile> + <Tile colour="green" id="-25009" name="Liverpool"> + <Station id="city1" position="002" slots="1" type="City" value="40"/> + <Station id="city2" position="202" slots="1" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side2"/> + </Tile> + <Tile colour="fixed" id="-25010" name="Doncaster"> + <Station id="city1" position="351" slots="1" type="City" value="20"/> + <Station id="city2" position="051" slots="1" type="City" value="20"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city2" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city2" gauge="normal" to="side5"/> + </Tile> + <Tile colour="fixed" id="-25011" name="Aberdeen"> + <Station id="city1" position="0" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> + <Tile colour="fixed" id="-25012" name="Helensburgh"> + <Station id="city1" position="202" type="Town" value="10"/> + <Station id="city2" position="102" type="Town" value="10"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="fixed" id="-25013" name="Anstruther"> + <Station id="city1" position="502" type="Town" value="10"/> + <Track from="side2" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="fixed" id="-25014" name="Maryport"> + <Station id="city1" position="051" slots="1" type="City" value="10"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + </Tile> + <Tile colour="fixed" id="-25015" name="Milford H."> + <Station id="city1" position="052" slots="1" type="City" value="10"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + </Tile> + <Tile colour="fixed" id="-25016" name="Highbridge"> + <Station id="city1" position="151" slots="1" type="City" value="10"/> + <Track from="side0" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="yellow" id="1" name="1"> + <Station id="city1" position="408" type="Town" value="10"/> + <Station id="city2" position="108" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city2" gauge="normal" to="side3"/> + </Tile> + <Tile colour="yellow" id="2" name="2"> + <Station id="city1" position="302" type="Town" value="10"/> + <Station id="city2" position="109" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city2" gauge="normal" to="side2"/> + </Tile> + <Tile colour="yellow" id="3" name="3"> + <Station id="city1" position="352" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + </Tile> + <Tile colour="yellow" id="4" name="4"> + <Station id="city1" position="0" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side0"/> + </Tile> + <Tile colour="yellow" id="5" name="5"> + <Station id="city1" position="0" slots="1" type="City" value="20"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="yellow" id="6" name="6"> + <Station id="city1" position="0" slots="1" type="City" value="20"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="yellow" id="7" name="7"> + <Track from="side3" gauge="normal" to="side4"/> + </Tile> + <Tile colour="yellow" id="8" name="8"> + <Track from="side3" gauge="normal" to="side5"/> + </Tile> + <Tile colour="yellow" id="9" name="9"> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="yellow" id="55" name="55"> + <Station id="city1" position="202" type="Town" value="10"/> + <Station id="city2" position="302" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city2" gauge="normal" to="side3"/> + <Track from="city2" gauge="normal" to="side0"/> + </Tile> + <Tile colour="yellow" id="56" name="56"> + <Station id="city1" position="407" type="Town" value="10"/> + <Station id="city2" position="108" type="Town" value="10"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city2" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side2"/> + </Tile> + <Tile colour="green" id="12" name="12"> + <Station id="city1" position="0" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> + <Tile colour="green" id="13" name="13"> + <Station id="city1" position="0" slots="1" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + </Tile> + <Tile colour="green" id="14" name="14"> + <Station id="city1" position="0" slots="2" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="15" name="15"> + <Station id="city1" position="0" slots="2" type="City" value="30"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city1" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="16" name="16"> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side4" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="19" name="19"> + <Track from="side5" gauge="normal" to="side1"/> + <Track from="side0" gauge="normal" to="side3"/> + </Tile> + <Tile colour="green" id="20" name="20"> + <Track from="side1" gauge="normal" to="side4"/> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="23" name="23"> + <Track from="side4" gauge="normal" to="side0"/> + <Track from="side0" gauge="normal" to="side3"/> + </Tile> + <Tile colour="green" id="24" name="24"> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="25" name="25"> + <Track from="side1" gauge="normal" to="side3"/> + <Track from="side3" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="26" name="26"> + <Track from="side5" gauge="normal" to="side0"/> + <Track from="side0" gauge="normal" to="side3"/> + </Tile> + <Tile colour="green" id="27" name="27"> + <Track from="side3" gauge="normal" to="side4"/> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="green" id="28" name="28"> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side4" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="29" name="29"> + <Track from="side3" gauge="normal" to="side4"/> + <Track from="side3" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="1052" name="52"> + <Station id="city1" position="152" slots="1" type="City" value="40"/> + <Station id="city2" position="452" slots="1" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city2" gauge="normal" to="side4"/> + </Tile> + <Tile colour="green" id="87" name="87"> + <Station id="city1" position="0" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="green" id="88" name="88"> + <Station id="city1" position="0" type="Town" value="10"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="32" name="32"> + <Station id="city1" position="303" slots="1" type="City" value="70"/> + <Station id="city2" position="403" slots="1" type="City" value="70"/> + <Station id="city3" position="503" slots="1" type="City" value="70"/> + <Station id="city4" position="003" slots="1" type="City" value="70"/> + <Station id="city5" position="103" slots="1" type="City" value="70"/> + <Station id="city6" position="203" slots="1" type="City" value="70"/> + <Track from="city6" gauge="normal" to="side2"/> + <Track from="city5" gauge="normal" to="side1"/> + <Track from="city4" gauge="normal" to="side0"/> + <Track from="city3" gauge="normal" to="side5"/> + <Track from="city2" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side3"/> + </Tile> + <Tile colour="brown" id="33" name="33"> + <Station id="city1" position="102" slots="1" type="City" value="50"/> + <Station id="city2" position="302" slots="1" type="City" value="50"/> + <Station id="city3" position="502" slots="1" type="City" value="50"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city2" gauge="normal" to="side3"/> + <Track from="city3" gauge="normal" to="side4"/> + </Tile> + <Tile colour="brown" id="34" name="34"> + <Station id="city1" position="352" slots="1" type="City" value="50"/> + <Station id="city2" position="052" slots="1" type="City" value="50"/> + <Station id="city3" position="502" slots="1" type="City" value="50"/> + <Track from="city2" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city3" gauge="normal" to="side2"/> + <Track from="city3" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="38" name="38"> + <Station id="city1" position="0" slots="2" type="City" value="40"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city1" gauge="normal" to="side2"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="41" name="41"> + <Track from="side4" gauge="normal" to="side0"/> + <Track from="side4" gauge="normal" to="side3"/> + <Track from="side0" gauge="normal" to="side3"/> + </Tile> + <Tile colour="brown" id="42" name="42"> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side3" gauge="normal" to="side0"/> + <Track from="side5" gauge="normal" to="side0"/> + </Tile> + <Tile colour="brown" id="45" name="45"> + <Track from="side1" gauge="normal" to="side5"/> + <Track from="side1" gauge="normal" to="side3"/> + <Track from="side5" gauge="normal" to="side0"/> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="brown" id="46" name="46"> + <Track from="side1" gauge="normal" to="side5"/> + <Track from="side1" gauge="normal" to="side0"/> + <Track from="side3" gauge="normal" to="side5"/> + <Track from="side3" gauge="normal" to="side0"/> + </Tile> + <Tile colour="brown" id="47" name="47"> + <Track from="side3" gauge="normal" to="side0"/> + <Track from="side3" gauge="normal" to="side1"/> + <Track from="side4" gauge="normal" to="side0"/> + <Track from="side4" gauge="normal" to="side1"/> + </Tile> + <Tile colour="brown" id="64" name="64"> + <Station id="city1" position="401" slots="1" type="City" value="50"/> + <Station id="city2" position="052" slots="1" type="City" value="50"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side5"/> + <Track from="city2" gauge="normal" to="side1"/> + <Track from="city2" gauge="normal" to="side0"/> + </Tile> + <Tile colour="brown" id="65" name="65"> + <Station id="city1" position="501" slots="1" type="City" value="50"/> + <Station id="city2" position="252" slots="1" type="City" value="50"/> + <Track from="city1" gauge="normal" to="side4"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side2"/> + <Track from="city2" gauge="normal" to="side3"/> + </Tile> + <Tile colour="brown" id="66" name="66"> + <Station id="city1" position="002" slots="1" type="City" value="50"/> + <Station id="city2" position="452" slots="1" type="City" value="50"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city1" gauge="normal" to="side0"/> + <Track from="city2" gauge="normal" to="side4"/> + <Track from="city2" gauge="normal" to="side5"/> + </Tile> + <Tile colour="brown" id="67" name="67"> + <Station id="city1" position="307" slots="1" type="City" value="50"/> + <Station id="city2" position="502" slots="1" type="City" value="50"/> + <Track from="city1" gauge="normal" to="side1"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city2" gauge="normal" to="side5"/> + <Track from="city2" gauge="normal" to="side2"/> + </Tile> + <Tile colour="brown" id="68" name="68"> + <Station id="city1" position="302" slots="1" type="City" value="50"/> + <Station id="city2" position="502" slots="1" type="City" value="50"/> + <Track from="city1" gauge="normal" to="side3"/> + <Track from="city2" gauge="normal" to="side2"/> + <Track from="city2" gauge="normal" to="side5"/> + <Track from="city1" gauge="normal" to="side0"/> + </Tile> </Tiles> \ No newline at end of file diff --git a/data/1826/CompanyManager.xml b/data/1826/CompanyManager.xml index 55c042b..35e6731 100644 --- a/data/1826/CompanyManager.xml +++ b/data/1826/CompanyManager.xml @@ -1,117 +1,117 @@ -<?xml version="1.0"?> -<CompanyManager> - <CompanyType name="Private" class="rails.game.PrivateCompany"> - <ClosingConditions> - <Phase>5</Phase> - </ClosingConditions> - <Tradeable toCompany="yes" lowerPriceFactor="0.5" upperPriceFactor="1.5"/> - <Tradeable toPlayer="yes"/> - </CompanyType> - <CompanyType name="Public" class="rails.game.PublicCompany"> - <Capitalisation type="incremental"/> - <StockPrice par="no"/> - <Float percentage="60"/> - <ShareUnit percentage="10"/> - <Certificate type="President" shares="2"/> - <Certificate shares="1" number="8"/> - <BaseTokens> - <HomeBase lay="firstOR"/> - <LayCost method="sequence" cost="0,40,100"/> - </BaseTokens> - <Trains number="4,4,3,2"/> - <CanBuyPrivates/> - <CanUseSpecialProperties/> - </CompanyType> - - <Company name="Bridge" type="Private" basePrice="20" revenue="5" - longname="Ponts et Chaussées"></Company> - - <Company name="Mail" type="Private" basePrice="40" revenue="10" - longname="Régie des Postes"></Company> - - <Company name="Algerian" type="Private" basePrice="70" revenue="15" - longname="Chemins de Fer D'Algérie"></Company> - - <Company name="Belgian" type="Private" basePrice="110" revenue="20" - longname="Grand Central Belge"></Company> - - <Company name="Parisian" type="Private" basePrice="160" revenue="25" - longname="Compagnie Paris-Rouen"></Company> - - <Company name="Alsatian" type="Private" basePrice="220" revenue="30" - longname="Ligne - Strasbourg-Bâle"></Company> - - <Company name="A" type="Public" tokens="4" fgColour="FFFFFF" bgColour="120A8F" - longname="Chemin de Fer d'Alsace"> - <Home hex="G19"/> - </Company> - - <Company name="B" type="Public" tokens="4" fgColour="FFFFFF" bgColour="2E6444" - longname="Chemin de Fer de L'Etat Belge"> - <Home hex="C13"/> - </Company> - - <Company name="Est" type="Public" tokens="4" fgColour="000000" bgColour="FF6600" - longname="Chemin de Fer de L'Est"> - <Home hex="G9" city="2"/> - </Company> - - <Company name="GC" type="Public" tokens="4" fgColour="000000" bgColour="BCD2EE" - longname="Grand Central de France"> - <Home hex="L14"/> - </Company> - - <Company name="Midi" type="Public" tokens="4" fgColour="FFFFFF" bgColour="308014" - longname="Chemin de Fer du Midi"> - <Home hex="M3"/> - </Company> - - <Company name="N" type="Public" tokens="4" fgColour="FFFFFF" bgColour="EE0000" - longname="Chemin de Fer du Nord"> - <Home hex="G9" city="1"/> - </Company> - - <Company name="Ouest" type="Public" tokens="4" fgColour="000000" bgColour="FF92BB" - longname="Chemin de Fer de L'Ouest"> - <Home hex="G9" city="5"/> - </Company> - - <Company name="Paris" type="Public" tokens="4" fgColour="000000" bgColour="CECC15" - longname="Chemin de Fer de Paris"> - <Home hex="G9" city="6"/> - </Company> - - <Company name="PLM" type="Public" tokens="4" fgColour="FFFFFF" bgColour="691F01" - longname="Chemin de Fer Paris-Lyon-Méditerranée"> - <Home hex="G9" city="3"/> - </Company> - - <Company name="PO" type="Public" tokens="4" fgColour="FFFFFF" bgColour="0000CD" - longname="Chemin de Fer Paris-Orléans"> - <Home hex="G9" city="4"/> - </Company> - - <Company name="Etat" type="Public" tokens="4" fgColour="FFFFFF" bgColour="000000" - longname="Chemin de Fer de L'Etat"> - </Company> - - <Company name="SNCF" type="Public" tokens="4" fgColour="000000" bgColour="B3B3B3" - longname="Société Nationale des Chemins de fer Français"> - </Company> - - <StartPacket roundClass="rails.game.StartRound_1830"> - <Bidding initial="5" minimum="5" increment="1"/> - <Item name="Bridge" type="Private" basePrice="20"/> - <Item name="Mail" type="Private" basePrice="40"/> - <Item name="Algerian" type="Private" basePrice="70"/> - <Item name="Belgian" type="Private" basePrice="110"> - <SubItem name="B" type="Public" /> - </Item> - <Item name="Parisian" type="Private" basePrice="160"> - <SubItem name="Paris" type="Public" /> - </Item> - <Item name="Alsatian" type="Private" basePrice="220"> - <SubItem name="A" type="Public" president... [truncated message content] |
From: Stefan F. <ste...@us...> - 2011-07-23 08:39:13
|
rails/game/GameManager.java | 1 - rails/game/special/SpecialProperty.java | 11 ++++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) New commits: commit 8b9df8fe03b3dbfbda264eaa0db322c600b325bb Author: Stefan Frey <ste...@we...> Date: Sat Jul 23 10:41:11 2011 +0200 Fixed problem of unique ids related to Special Properties (they start at one instead of zero) diff --git a/rails/game/GameManager.java b/rails/game/GameManager.java index 77b2118..7c5a11a 100644 --- a/rails/game/GameManager.java +++ b/rails/game/GameManager.java @@ -1882,7 +1882,6 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { if (id == null) id = 0; objectStorage.put(typeName + id, object); storageIds.put(typeName, id + 1); // store next id - log.debug("Stores " + typeName + " + on id " + id); return id; } diff --git a/rails/game/special/SpecialProperty.java b/rails/game/special/SpecialProperty.java index 8994da7..917b510 100644 --- a/rails/game/special/SpecialProperty.java +++ b/rails/game/special/SpecialProperty.java @@ -61,7 +61,9 @@ public abstract class SpecialProperty implements SpecialPropertyI { public SpecialProperty() { gameManager = GameManager.getInstance(); - uniqueId = gameManager.storeObject(STORAGE_NAME, this); + uniqueId = gameManager.storeObject(STORAGE_NAME, this) + 1; + // increase unique id to allow loading old save files (which increase by 1) + // TODO: remove that legacy issue } public void configureFromXML(Tag tag) throws ConfigurationException { @@ -109,8 +111,11 @@ public abstract class SpecialProperty implements SpecialPropertyI { return uniqueId; } - public static SpecialPropertyI getByUniqueId(int i) { - return (SpecialPropertyI)GameManager.getInstance().retrieveObject(STORAGE_NAME, i); + public static SpecialPropertyI getByUniqueId(int id) { + id -= 1; + // decrease retrieval id to allow loading old save files (which increase by 1) + // TODO: remove that legacy issue + return (SpecialPropertyI)GameManager.getInstance().retrieveObject(STORAGE_NAME, id); } public void setCompany(CompanyI company) { |
From: Stefan F. <ste...@us...> - 2011-07-23 08:14:13
|
rails/game/GameManager.java | 24 ++++++++++++++---------- rails/game/GameManagerI.java | 6 ++++-- rails/game/Token.java | 8 ++++---- rails/game/special/SpecialProperty.java | 6 ++++-- 4 files changed, 26 insertions(+), 18 deletions(-) New commits: commit d4b5d377e9240fc5bd3dd241fe29ccf9da0c1608 Author: Stefan Frey <ste...@we...> Date: Sat Jul 23 10:16:07 2011 +0200 Fixed problem in new storage mechanism diff --git a/rails/game/GameManager.java b/rails/game/GameManager.java index 56c72ad..77b2118 100644 --- a/rails/game/GameManager.java +++ b/rails/game/GameManager.java @@ -225,9 +225,9 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { // storage to replace static class variables // TODO: Move that to a better place - protected Map<Integer, Object> objectStorage = new HashMap<Integer, Object>(); - protected int storageId = 0; - + protected Map<String, Object> objectStorage = new HashMap<String, Object>(); + protected Map<String, Integer> storageIds = new HashMap<String, Integer>(); + protected static Logger log = Logger.getLogger(GameManager.class.getPackage().getName()); @@ -1873,17 +1873,21 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { } public void resetStorage() { - objectStorage = new HashMap<Integer, Object>(); - storageId = 0; + objectStorage = new HashMap<String, Object>(); + storageIds = new HashMap<String, Integer>(); } - public int storeObject(Object object) { - objectStorage.put(storageId++, object); - return storageId; + public int storeObject(String typeName, Object object) { + Integer id = storageIds.get(typeName); + if (id == null) id = 0; + objectStorage.put(typeName + id, object); + storageIds.put(typeName, id + 1); // store next id + log.debug("Stores " + typeName + " + on id " + id); + return id; } - public Object retrieveObject(int id) { - return objectStorage.get(id); + public Object retrieveObject(String typeName, int id) { + return objectStorage.get(typeName + id); } } diff --git a/rails/game/GameManagerI.java b/rails/game/GameManagerI.java index e95c71f..e9d5936 100644 --- a/rails/game/GameManagerI.java +++ b/rails/game/GameManagerI.java @@ -225,19 +225,21 @@ public interface GameManagerI extends MoveableHolder, ConfigurableComponentI { /** * store element in storage + * @param name to identify the type of the object to retrieve * @param object to store * @return unique id of the object in the storage * TODO move to a better place */ - public int storeObject(Object object); + public int storeObject(String typeName, Object object); /** * ask storage for object + * @param name to identify the type of the object to retrieve * @param identifier in storage * @return object stored under the id (null if none is stored) * TODO move to a better place */ - public Object retrieveObject(int id); + public Object retrieveObject(String typeName, int id); diff --git a/rails/game/Token.java b/rails/game/Token.java index 8d21a70..ee38386 100644 --- a/rails/game/Token.java +++ b/rails/game/Token.java @@ -23,18 +23,18 @@ public abstract class Token implements TokenI { protected String uniqueId; // TODO: storing id in String is for legacy reasons - protected static String ID_PREFIX = "Token_"; + protected static String STORAGE_NAME = "Token"; protected static Logger log = Logger.getLogger(Token.class.getPackage().getName()); public Token() { - uniqueId = ID_PREFIX + GameManager.getInstance().storeObject(this); + uniqueId = STORAGE_NAME + "_" + GameManager.getInstance().storeObject(STORAGE_NAME, this); } public static TokenI getByUniqueId(String id) { - int i = Integer.valueOf(id.replace(ID_PREFIX, "")); - return (Token)GameManager.getInstance().retrieveObject(i); + int i = Integer.valueOf(id.replace(STORAGE_NAME + "_", "")); + return (Token)GameManager.getInstance().retrieveObject(STORAGE_NAME, i); } public String getUniqueId() { diff --git a/rails/game/special/SpecialProperty.java b/rails/game/special/SpecialProperty.java index a165f16..8994da7 100644 --- a/rails/game/special/SpecialProperty.java +++ b/rails/game/special/SpecialProperty.java @@ -50,6 +50,8 @@ public abstract class SpecialProperty implements SpecialPropertyI { protected String description = ""; protected int uniqueId; + + protected static final String STORAGE_NAME = "SpecialProperty"; /** To give subclasses access to the various 'managers' */ protected GameManagerI gameManager; @@ -59,7 +61,7 @@ public abstract class SpecialProperty implements SpecialPropertyI { public SpecialProperty() { gameManager = GameManager.getInstance(); - uniqueId = gameManager.storeObject(this); + uniqueId = gameManager.storeObject(STORAGE_NAME, this); } public void configureFromXML(Tag tag) throws ConfigurationException { @@ -108,7 +110,7 @@ public abstract class SpecialProperty implements SpecialPropertyI { } public static SpecialPropertyI getByUniqueId(int i) { - return (SpecialPropertyI)GameManager.getInstance().retrieveObject(i); + return (SpecialPropertyI)GameManager.getInstance().retrieveObject(STORAGE_NAME, i); } public void setCompany(CompanyI company) { |
From: Stefan F. <ste...@us...> - 2011-07-23 07:37:24
|
rails/game/GameManager.java | 23 +++++++++++++++++++++-- rails/game/GameManagerI.java | 28 +++++++++++++++++++++++++++- rails/game/Token.java | 12 ++++++------ rails/game/special/SpecialProperty.java | 9 ++------- 4 files changed, 56 insertions(+), 16 deletions(-) New commits: commit c9b5d4d6a3884eddf0546b69883e1a2c34bd1966 Author: Stefan Frey <ste...@we...> Date: Sat Jul 23 09:15:29 2011 +0200 Removed static class variables and moved that to a centralize storage in GameManager diff --git a/rails/game/GameManager.java b/rails/game/GameManager.java index 3e16978..56c72ad 100644 --- a/rails/game/GameManager.java +++ b/rails/game/GameManager.java @@ -67,7 +67,7 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { // map of correctionManagers protected Map<CorrectionType, CorrectionManagerI> correctionManagers = new HashMap<CorrectionType, CorrectionManagerI>(); - + protected String gameName; protected Map<String, String> gameOptions; @@ -223,6 +223,11 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { */ protected GameDef.OrStep skippedStep = null; + // storage to replace static class variables + // TODO: Move that to a better place + protected Map<Integer, Object> objectStorage = new HashMap<Integer, Object>(); + protected int storageId = 0; + protected static Logger log = Logger.getLogger(GameManager.class.getPackage().getName()); @@ -1866,6 +1871,20 @@ public class GameManager implements ConfigurableComponentI, GameManagerI { return players.get(0); } - + + public void resetStorage() { + objectStorage = new HashMap<Integer, Object>(); + storageId = 0; + } + + public int storeObject(Object object) { + objectStorage.put(storageId++, object); + return storageId; + } + + public Object retrieveObject(int id) { + return objectStorage.get(id); + } + } diff --git a/rails/game/GameManagerI.java b/rails/game/GameManagerI.java index 8555a07..e95c71f 100644 --- a/rails/game/GameManagerI.java +++ b/rails/game/GameManagerI.java @@ -215,5 +215,31 @@ public interface GameManagerI extends MoveableHolder, ConfigurableComponentI { public void setSkipDone (GameDef.OrStep step); public Player reorderPlayersByCash(boolean high); - //public void reorderPlayersByCash(boolean high); + + /** + * reset the storage for other elements like tokens, special property + * that a referred by unique ids + * TODO + */ + public void resetStorage(); + + /** + * store element in storage + * @param object to store + * @return unique id of the object in the storage + * TODO move to a better place + */ + public int storeObject(Object object); + + /** + * ask storage for object + * @param identifier in storage + * @return object stored under the id (null if none is stored) + * TODO move to a better place + */ + public Object retrieveObject(int id); + + + + } \ No newline at end of file diff --git a/rails/game/Token.java b/rails/game/Token.java index 97b19d1..8d21a70 100644 --- a/rails/game/Token.java +++ b/rails/game/Token.java @@ -21,20 +21,20 @@ public abstract class Token implements TokenI { protected TokenHolder holder = null; protected String description = ""; protected String uniqueId; - - private static Map<String, TokenI> tokenMap = new HashMap<String, TokenI>(); - private static int index = 0; + + // TODO: storing id in String is for legacy reasons + protected static String ID_PREFIX = "Token_"; protected static Logger log = Logger.getLogger(Token.class.getPackage().getName()); public Token() { - uniqueId = "Token_" + (index++); - tokenMap.put(uniqueId, this); + uniqueId = ID_PREFIX + GameManager.getInstance().storeObject(this); } public static TokenI getByUniqueId(String id) { - return tokenMap.get(id); + int i = Integer.valueOf(id.replace(ID_PREFIX, "")); + return (Token)GameManager.getInstance().retrieveObject(i); } public String getUniqueId() { diff --git a/rails/game/special/SpecialProperty.java b/rails/game/special/SpecialProperty.java index 0daeb23..a165f16 100644 --- a/rails/game/special/SpecialProperty.java +++ b/rails/game/special/SpecialProperty.java @@ -54,17 +54,12 @@ public abstract class SpecialProperty implements SpecialPropertyI { /** To give subclasses access to the various 'managers' */ protected GameManagerI gameManager; - protected static Map<Integer, SpecialPropertyI> spMap = new HashMap<Integer, SpecialPropertyI>(); - - protected static int lastIndex = 0; - protected static Logger log = Logger.getLogger(SpecialProperty.class.getPackage().getName()); public SpecialProperty() { - uniqueId = ++lastIndex; - spMap.put(uniqueId, this); gameManager = GameManager.getInstance(); + uniqueId = gameManager.storeObject(this); } public void configureFromXML(Tag tag) throws ConfigurationException { @@ -113,7 +108,7 @@ public abstract class SpecialProperty implements SpecialPropertyI { } public static SpecialPropertyI getByUniqueId(int i) { - return spMap.get(i); + return (SpecialPropertyI)GameManager.getInstance().retrieveObject(i); } public void setCompany(CompanyI company) { |
From: Erik V. <ev...@us...> - 2011-07-22 20:16:00
|
data/1835/CompanyManager.xml | 6 +- data/1835/Game.xml | 50 +++++++++++------- data/1856/CompanyManager.xml | 2 rails/game/OperatingRound.java | 2 rails/game/Phase.java | 46 +++++++++++++++- rails/game/PhaseI.java | 3 - rails/game/PhaseManager.java | 18 ++++++ rails/game/PublicCompany.java | 15 ++++- rails/game/PublicCompanyI.java | 2 rails/game/specific/_1835/PrussianFormationRound.java | 4 - rails/game/specific/_18EU/OperatingRound_18EU.java | 4 - 11 files changed, 115 insertions(+), 37 deletions(-) New commits: commit 90f886aa199ed3b38c6ba276e17ced45be9345f5 Author: Erik Vos <eri...@xs...> Date: Fri Jul 22 22:07:40 2011 +0200 Phase management upgrade step 3: train limits. <Phase><Trains> now has a new attribute 'limitStep', which starts at 1. <Company[Type]><Trains> now lists the number of trains per step, not per phase. These changes have been applied to 1835 ONLY. Temporary code ensures that the old way still works for other games. <Phase> has another new optional attribute 'realName', intended to have the 'official' name of a phase, as in the physical game. 1835 phase example: <Phase name="4" realName="2"> <Trains limitStep="2" rusted="2"/> </Phase> In the game status window this phase is now displayed as "4 [2]". The major CompanyType now has <Trains limit="4,3,2"/> This change also fixes the 1835 bug that the train limit was reduced to 2 at buying the 4+4-train in stead of the 5-train. diff --git a/data/1835/CompanyManager.xml b/data/1835/CompanyManager.xml index 9af7965..dc0030a 100644 --- a/data/1835/CompanyManager.xml +++ b/data/1835/CompanyManager.xml @@ -10,7 +10,7 @@ <HomeBase lay="whenFloated"/> </BaseTokens> <Payout split="always"/> - <Trains limit="2,2,1" mandatory="no"/> + <Trains limit="2,1" mandatory="no"/> </CompanyType> <CompanyType name="Major" class="rails.game.PublicCompany" capitalisation="incremental"> <PoolPaysOut/> @@ -28,7 +28,7 @@ <HomeBase lay="whenFloated"/> </BaseTokens> <Capitalisation type="incremental"/> - <Trains limit="4,4,3,2"/> + <Trains limit="4,3,2"/> <CanUseSpecialProperties/> </CompanyType> @@ -211,7 +211,7 @@ <Certificate shares="2" number="3"/> <Certificate shares="2" number="4" status="reserved"/> <Certificate shares="1" number="4" status="reserved"/> - <Trains limit="0,0,4,3"/> + <Trains limit="4,4,3"/> </Company> <StartPacket roundClass="rails.game.StartRound_1835" variant="Snake"> diff --git a/data/1835/Game.xml b/data/1835/Game.xml index 75b48c6..8b11f9f 100644 --- a/data/1835/Game.xml +++ b/data/1835/Game.xml @@ -55,45 +55,57 @@ </Defaults> <TrainType name="2" majorStops="2" cost="80" quantity="9"/> <TrainType name="2+2" majorStops="2" minorStops="2" cost="120" quantity="4"/> - <TrainType name="3" majorStops="3" cost="180" quantity="4" startPhase="3"/> + <TrainType name="3" majorStops="3" cost="180" quantity="4"> + <NewPhase phaseName="3"/> + </TrainType> <TrainType name="3+3" majorStops="3" minorStops="3" cost="270" quantity="3"/> - <TrainType name="4" majorStops="4" cost="360" quantity="3" startPhase="4" - rustedTrain="2"/> - <TrainType name="4+4" majorStops="4" minorStops="4" cost="440" quantity="1" - startPhase="4+4" rustedTrain="2+2"/> - <TrainType name="5" majorStops="5" cost="500" quantity="2" startPhase="5"/> + <TrainType name="4" majorStops="4" cost="360" quantity="3"> + <NewPhase phaseName="4"/> + </TrainType> + <TrainType name="4+4" majorStops="4" minorStops="4" cost="440" quantity="1"> + <NewPhase phaseName="4+4"/> + </TrainType> + <TrainType name="5" majorStops="5" cost="500" quantity="2"> + <NewPhase phaseName="5"/> + </TrainType> <TrainType name="5+5" majorStops="5" minorStops="5" cost="600" quantity="1"/> - <TrainType name="6" majorStops="6" cost="600" quantity="2" startPhase="6" - rustedTrain="3"/> - <TrainType name="6+6" majorStops="6" minorStops="6" cost="720" quantity="4" - rustedTrain="3+3"/> + <TrainType name="6" majorStops="6" cost="600" quantity="2"> + <NewPhase phaseName="6"/> + </TrainType> + <TrainType name="6+6" majorStops="6" minorStops="6" cost="720" quantity="4"> + <NewPhase phaseName="6+6"/> + </TrainType> </Component> <Component name="PhaseManager" class="rails.game.PhaseManager"> - <Phase name="2"> + <Phase name="2" realName="1"> <Tiles colour="yellow"/> <OperatingRounds number="1"/> </Phase> - <Phase name="3"> + <Phase name="3" realName="2"> <Tiles colour="yellow,green"/> <OperatingRounds number="2"/> <OffBoardRevenue step="2"/> <Trains tradingAllowed="yes"/> </Phase> - <Phase name="4"> - <Tiles colour="yellow,green"/> + <Phase name="4" realName="2"> + <Trains limitStep="2" rusted="2"/> </Phase> - <Phase name="4+4"> - <Tiles colour="yellow,green"/> + <Phase name="4+4" realName="2"> + <Trains rusted="2+2"/> </Phase> - <Phase name="5"> + <Phase name="5" realName="3"> <Tiles colour="yellow,green,brown"/> <OperatingRounds number="3"/> <!--Privates close="yes"/--> <OffBoardRevenue step="3"/> + <Trains limitStep="3"/> <Info key="PhaseClosesAllPrivates"/> </Phase> - <Phase name="6"> - <Tiles colour="yellow,green,brown"/> + <Phase name="6" realName="3"> + <Trains rusted="3"/> </Phase> + <Phase name="6+6" realName="3"> + <Trains rusted="3+3"/> + </Phase> </Component> </ComponentManager> diff --git a/data/1856/CompanyManager.xml b/data/1856/CompanyManager.xml old mode 100755 new mode 100644 index d8e0b42..34cff8b --- a/data/1856/CompanyManager.xml +++ b/data/1856/CompanyManager.xml @@ -26,7 +26,7 @@ <BaseTokens> <LayCost method="sequence" cost="0,40,100"/> </BaseTokens> - <Trains limit="0,0,0,3"/> + <Trains limit="3"/> <Options mustTradeTrainsAtFixedPrice="yes" canClose="no"/> </CompanyType> diff --git a/rails/game/OperatingRound.java b/rails/game/OperatingRound.java index 35cc3b4..6c80717 100644 --- a/rails/game/OperatingRound.java +++ b/rails/game/OperatingRound.java @@ -1877,7 +1877,7 @@ public class OperatingRound extends Round implements Observer { excessTrainCompanies = new HashMap<Player, List<PublicCompanyI>>(); Player player; for (PublicCompanyI comp : operatingCompanies.viewList()) { - if (comp.getPortfolio().getNumberOfTrains() > comp.getTrainLimit(getCurrentPhase().getIndex())) { + if (comp.getPortfolio().getNumberOfTrains() > comp.getCurrentTrainLimit()) { player = comp.getPresident(); if (!excessTrainCompanies.containsKey(player)) { excessTrainCompanies.put(player, diff --git a/rails/game/Phase.java b/rails/game/Phase.java index 44d90be..7685387 100644 --- a/rails/game/Phase.java +++ b/rails/game/Phase.java @@ -14,6 +14,8 @@ public class Phase implements PhaseI { protected int index; protected String name; + + protected String realName; protected String colourList = ""; @@ -27,6 +29,12 @@ public class Phase implements PhaseI { protected int offBoardRevenueStep = 1; + /** New style train limit configuration. + * TODO TEMPORARILY the default is 0 to allow distinguishing the old and new styles. + * This should be set to 1 once all game configs have been converted. + */ + protected int trainLimitStep = 0; + protected int privatesRevenueStep = 1; // sfy 1889 protected boolean trainTradingAllowed = false; @@ -79,6 +87,7 @@ public class Phase implements PhaseI { privateSellingAllowed = defaults.privateSellingAllowed; numberOfOperatingRounds = defaults.numberOfOperatingRounds; offBoardRevenueStep = defaults.offBoardRevenueStep; + trainLimitStep = defaults.trainLimitStep; privatesRevenueStep = defaults.privatesRevenueStep; trainTradingAllowed = defaults.trainTradingAllowed; oneTrainPerTurn = defaults.oneTrainPerTurn; @@ -91,6 +100,9 @@ public class Phase implements PhaseI { } } } + + // Real name (as in the printed game) + realName = tag.getAttributeAsString("realName", null); // String colourList; String[] colourArray = new String[0]; @@ -124,16 +136,17 @@ public class Phase implements PhaseI { numberOfOperatingRounds); } - // Off-board revenue steps + // Off-board revenue steps (starts at 1) Tag offBoardTag = tag.getChild("OffBoardRevenue"); if (offBoardTag != null) { offBoardRevenueStep = offBoardTag.getAttributeAsInteger("step", offBoardRevenueStep); } - + Tag trainsTag = tag.getChild("Trains"); if (trainsTag != null) { + trainLimitStep = trainsTag.getAttributeAsInteger("limitStep", trainLimitStep); rustedTrainNames = trainsTag.getAttributeAsString("rusted", null); releasedTrainNames = trainsTag.getAttributeAsString("released", null); trainTradingAllowed = @@ -245,6 +258,25 @@ public class Phase implements PhaseI { return colourList; } + public int getTrainLimitStep() { + return trainLimitStep; + } + + // TEMPORARILY included. To be removed when all games have been converted to new style train limit configuration. + public void setTrainLimitStep(int trainLimitStep) { + this.trainLimitStep = trainLimitStep; + } + + public int getTrainLimitIndex() { + if(trainLimitStep > 0) { + // New style + return trainLimitStep - 1; + } else { + // TODO Old style, can be removed once all games have been converted + return index; + } + } + public int getIndex() { return index; } @@ -253,6 +285,10 @@ public class Phase implements PhaseI { return name; } + public String getRealName() { + return realName; + } + /** * @return Returns the privatesClose. */ @@ -340,6 +376,10 @@ public class Phase implements PhaseI { @Override public String toString() { - return name; + if (realName == null) { + return name; + } else { + return name + " [" + realName+ "]"; + } } } diff --git a/rails/game/PhaseI.java b/rails/game/PhaseI.java index bf41d07..a598e12 100644 --- a/rails/game/PhaseI.java +++ b/rails/game/PhaseI.java @@ -26,7 +26,8 @@ public interface PhaseI extends ConfigurableComponentI { public int getPrivatesRevenueStep(); // sfy 1889 public boolean isTrainTradingAllowed(); - + public int getTrainLimitStep(); + public int getTrainLimitIndex(); public boolean canBuyMoreTrainsPerTurn(); public boolean canBuyMoreTrainsPerTypePerTurn(); diff --git a/rails/game/PhaseManager.java b/rails/game/PhaseManager.java index 3f446bf..e0b4ef3 100644 --- a/rails/game/PhaseManager.java +++ b/rails/game/PhaseManager.java @@ -59,6 +59,24 @@ public class PhaseManager implements ConfigurableComponentI { phase.finishConfiguration(gameManager); } + /* TODO TEMPORARY CODE: + * If any phase has a train limit step > 0, all remaining 0 values must be set to 1. + * This code uses separate loops to allow easy removal. + */ + boolean anyLimitStep = false; + for (Phase phase : phaseList) { + if (phase.getTrainLimitStep() > 0) { + anyLimitStep = true; + break; + } + } + if (anyLimitStep) { + for (Phase phase : phaseList) { + if (phase.getTrainLimitStep() == 0) phase.setTrainLimitStep(1); + } + } + // End of temporary code + PhaseI initialPhase = phaseList.get(0); setPhase(initialPhase, null); } diff --git a/rails/game/PublicCompany.java b/rails/game/PublicCompany.java index 3416239..7cd390c 100644 --- a/rails/game/PublicCompany.java +++ b/rails/game/PublicCompany.java @@ -1572,12 +1572,21 @@ public class PublicCompany extends Company implements PublicCompanyI { return 100 / shareUnit.intValue(); } - public int getTrainLimit(int phaseIndex) { - return trainLimit[Math.min(phaseIndex, trainLimit.length - 1)]; + /** Get the current maximum number of trains. + * @parm index The limit for the given index (N.B. starts at 0). + * <p><i>Old style:</i> the index of the current phase.<br> + * <i>New style:</i> the index of the train limit step as defined for the current phase. + * <br>The limits per train (type) must follow the logic that is implemented for the current game, + * which is indicated by the absence or presence of 'limitStep' attributes in the <Phase> tags. + * <p>N.B. the new style limit steps per phase start at 1, + * so one must be subtracted before calling this method. + */ + protected int getTrainLimit(int index) { + return trainLimit[Math.min(index, trainLimit.length - 1)]; } public int getCurrentTrainLimit() { - return getTrainLimit(GameManager.getInstance().getCurrentPhase().getIndex()); + return getTrainLimit(gameManager.getCurrentPhase().getTrainLimitIndex()); } public int getNumberOfTrains() { diff --git a/rails/game/PublicCompanyI.java b/rails/game/PublicCompanyI.java index 31b5d4a..63ad78b 100644 --- a/rails/game/PublicCompanyI.java +++ b/rails/game/PublicCompanyI.java @@ -258,8 +258,6 @@ public interface PublicCompanyI extends CompanyI, CashHolder, TokenHolder { public void setCapitalisation(int capitalisation); - public int getTrainLimit(int phaseIndex); - public int getCurrentTrainLimit(); public int getNumberOfTrains(); diff --git a/rails/game/specific/_1835/PrussianFormationRound.java b/rails/game/specific/_1835/PrussianFormationRound.java index fe04427..1b97e32 100644 --- a/rails/game/specific/_1835/PrussianFormationRound.java +++ b/rails/game/specific/_1835/PrussianFormationRound.java @@ -118,7 +118,7 @@ public class PrussianFormationRound extends StockRound { } else if (step == Step.DISCARD_TRAINS) { - if (prussian.getNumberOfTrains() > prussian.getTrainLimit(getCurrentPhase().getIndex())) { + if (prussian.getNumberOfTrains() > prussian.getCurrentTrainLimit()) { possibleActions.add(new DiscardTrain(prussian, prussian.getPortfolio().getUniqueTrains(), true)); } @@ -189,7 +189,7 @@ public class PrussianFormationRound extends StockRound { if (skipCurrentPlayer) { setNextPlayer(); if (getCurrentPlayer() == startingPlayer) { - if (prussian.getNumberOfTrains() > prussian.getTrainLimit(getCurrentPhase().getIndex())) { + if (prussian.getNumberOfTrains() > prussian.getCurrentTrainLimit()) { step = Step.DISCARD_TRAINS; } else { finishRound(); diff --git a/rails/game/specific/_18EU/OperatingRound_18EU.java b/rails/game/specific/_18EU/OperatingRound_18EU.java index a6fb8a0..a1fc677 100644 --- a/rails/game/specific/_18EU/OperatingRound_18EU.java +++ b/rails/game/specific/_18EU/OperatingRound_18EU.java @@ -238,7 +238,7 @@ public class OperatingRound_18EU extends OperatingRound { // A Pullmann always goes first, and automatically. // If the last train is a Pullmann, discard it. - if ((numberOfTrains > comp.getTrainLimit(getCurrentPhase().getIndex()) || numberOfTrains == 1) + if ((numberOfTrains > comp.getCurrentTrainLimit() || numberOfTrains == 1) && pullmann != null) { pullmann.moveTo(pool); numberOfTrains--; @@ -246,7 +246,7 @@ public class OperatingRound_18EU extends OperatingRound { // If we are still above the limit, make the list // of trains to select the discarded one from - if (numberOfTrains > comp.getTrainLimit(getCurrentPhase().getIndex())) { + if (numberOfTrains > comp.getCurrentTrainLimit()) { player = comp.getPresident(); if (!excessTrainCompanies.containsKey(player)) { excessTrainCompanies.put(player, |
From: Erik V. <ev...@us...> - 2011-07-22 18:59:57
|
rails/common/parser/Tag.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 505fb03f5041aa14be1d8e772d3b02aff870f2d5 Author: Erik Vos <eri...@xs...> Date: Fri Jul 22 20:59:27 2011 +0200 Added comments to explain option name shortening code. diff --git a/rails/common/parser/Tag.java b/rails/common/parser/Tag.java index ed1c334..712e5b6 100644 --- a/rails/common/parser/Tag.java +++ b/rails/common/parser/Tag.java @@ -318,9 +318,15 @@ public class Tag { String optionValue = gameOptions.get(name); // For backwards compatibility: search for an extended name - // TODO OBSOLETE?? + /* This applies to parametrized options, such as "UnlimitedTopTrains". + * It parametrized with a parameter "D" to allow display as "Unlimited D-trains" + * and still remaining generic. + * Parametrization means that the actual name is UnlimitedTopTrains_D, + * for instance in saved files, and so the name must be shortened to find a match. + */ if (optionValue == null) { for (String optName : gameOptions.keySet()) { + // startsWith is a shortcut, perhaps it should be matches(name+"_.*"). if (optName != null && optName.startsWith(name)) { optionValue = gameOptions.get(optName); log.warn("Option name "+name+" replaced by "+optName); |
From: Erik V. <ev...@us...> - 2011-07-22 18:35:25
|
rails/common/parser/Tag.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 91ed37d10a7c65408b8a23007a0601e6491bb51d Author: Erik Vos <eri...@xs...> Date: Fri Jul 22 20:34:29 2011 +0200 Reverted Tag change, added some comments diff --git a/rails/common/parser/Tag.java b/rails/common/parser/Tag.java index a1aa913..ed1c334 100644 --- a/rails/common/parser/Tag.java +++ b/rails/common/parser/Tag.java @@ -318,6 +318,7 @@ public class Tag { String optionValue = gameOptions.get(name); // For backwards compatibility: search for an extended name + // TODO OBSOLETE?? if (optionValue == null) { for (String optName : gameOptions.keySet()) { if (optName != null && optName.startsWith(name)) { @@ -326,7 +327,10 @@ public class Tag { break; } } - // Take the default value + } + + // If not assigned in the previous step, take the default value + if (optionValue == null) { GameOption go = GameOption.getByName(name); optionValue = go != null ? go.getDefaultValue() : ""; log.warn("GameOption " + name + "=" + value |
From: Brett L. <wak...@us...> - 2011-07-21 17:34:15
|
rails/common/parser/Tag.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a7948aad7f7b2010df2988b1076919342d6cb2d8 Author: Brett Lentz <bre...@gm...> Date: Thu Jul 21 10:29:22 2011 -0700 Tag: ignore null gameOptions. diff --git a/rails/common/parser/Tag.java b/rails/common/parser/Tag.java index 7a7d46e..a1aa913 100644 --- a/rails/common/parser/Tag.java +++ b/rails/common/parser/Tag.java @@ -320,7 +320,7 @@ public class Tag { // For backwards compatibility: search for an extended name if (optionValue == null) { for (String optName : gameOptions.keySet()) { - if (optName.startsWith(name)) { + if (optName != null && optName.startsWith(name)) { optionValue = gameOptions.get(optName); log.warn("Option name "+name+" replaced by "+optName); break; |
From: Brett L. <wak...@us...> - 2011-07-21 17:01:49
|
rails/common/parser/Tag.java | 3 --- 1 file changed, 3 deletions(-) New commits: commit 6b7255acdcdfd3217884ae2701975166df7350b8 Author: Brett Lentz <bl...@cl...> Date: Thu Jul 21 09:58:42 2011 -0700 Tag: simplify conditional logic. This is really a spurious commit to test Egit. diff --git a/rails/common/parser/Tag.java b/rails/common/parser/Tag.java index 22c3c0a..7a7d46e 100644 --- a/rails/common/parser/Tag.java +++ b/rails/common/parser/Tag.java @@ -326,9 +326,6 @@ public class Tag { break; } } - } - - if (optionValue == null) { // Take the default value GameOption go = GameOption.getByName(name); optionValue = go != null ? go.getDefaultValue() : ""; |
From: Brett L. <wak...@us...> - 2011-07-21 04:42:08
|
Rebased ref, commits from common ancestor: |
From: Brett L. <wak...@us...> - 2011-07-20 16:33:35
|
Rebased ref, commits from common ancestor: |
From: Brett L. <wak...@us...> - 2011-07-20 16:32:43
|
New branch 'test' available with the following commits: commit 00a605b9975cca83444f1315ac5aedaf290852a1 Author: Brett Lentz <bl...@cl...> Date: Wed Jul 20 09:27:29 2011 -0700 spurious commit. |
From: Brett L. <wak...@us...> - 2011-07-19 20:27:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Rails: An 18xx game moderator.". The branch, master has been updated via e18b0fe55665e87abd3479ac831b127fb583c370 (commit) from fd4a38bce3687b9c5d6642e2984320bca390b07d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e18b0fe55665e87abd3479ac831b127fb583c370 Author: Brett Lentz <bl...@cl...> Date: Tue Jul 19 13:27:24 2011 -0700 Don't forget to parse the Notes. ----------------------------------------------------------------------- Summary of changes: rails/common/parser/GameInfoParser.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) hooks/post-receive -- Rails: An 18xx game moderator. |
From: Erik V. <ev...@us...> - 2011-07-18 20:47:23
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Rails: An 18xx game moderator.". The branch, master has been updated via fd4a38bce3687b9c5d6642e2984320bca390b07d (commit) via df02506a7db3c27332569b699f07382a80af50ee (commit) from e08acba7b4fc400d20516cf09aa9d682431315c8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fd4a38bce3687b9c5d6642e2984320bca390b07d Author: Erik Vos <eri...@xs...> Date: Mon Jul 18 22:01:12 2011 +0200 Set all jars to exported in .classpath commit df02506a7db3c27332569b699f07382a80af50ee Author: Erik Vos <eri...@xs...> Date: Mon Jul 18 21:22:24 2011 +0200 Fixed 1835: at phase 4+4 start, ask no questions if PR already started. ----------------------------------------------------------------------- Summary of changes: .classpath | 32 ++++++++++---------- rails/game/specific/_1835/OperatingRound_1835.java | 21 +++++++------ 2 files changed, 27 insertions(+), 26 deletions(-) hooks/post-receive -- Rails: An 18xx game moderator. |
From: <ste...@us...> - 2011-07-16 06:23:26
|
Revision: 1614 http://rails.svn.sourceforge.net/rails/?rev=1614&view=rev Author: stefanfrey Date: 2011-07-16 06:23:19 +0000 (Sat, 16 Jul 2011) Log Message: ----------- Added TGVmodifier revenue for 1826 support. Updated dynamic modifier and include more doc and text. Modified Paths: -------------- trunk/18xx/LocalisedText.properties trunk/18xx/data/1870/Game.xml trunk/18xx/rails/algorithms/NetworkTrain.java trunk/18xx/rails/algorithms/RevenueAdapter.java trunk/18xx/rails/algorithms/RevenueCalculator.java trunk/18xx/rails/algorithms/RevenueDynamicModifier.java trunk/18xx/rails/game/specific/_1825/DoubleHeadingModifier.java trunk/18xx/rails/game/specific/_1825/TerminateAtMajorModifier.java trunk/18xx/rails/game/specific/_18AL/NamedTrainRevenueModifier.java trunk/18xx/rails/game/specific/_18EU/PullmanRevenueModifier.java Added Paths: ----------- trunk/18xx/rails/game/specific/_1826/ trunk/18xx/rails/game/specific/_1826/TGVModifier.java Modified: trunk/18xx/LocalisedText.properties =================================================================== --- trunk/18xx/LocalisedText.properties 2011-07-09 12:07:23 UTC (rev 1613) +++ trunk/18xx/LocalisedText.properties 2011-07-16 06:23:19 UTC (rev 1614) @@ -236,6 +236,7 @@ DoesNotForm={0} does not form DoesNotHaveTheShares=Does not have the shares Done=Done +DoubleHeadingModifier1825={0} are two {1}-trains running as a {2}-train (double heading). ShortORExecuted=A short OR has been held, in which only the sold privates have paid out. DuplicateTileID=Duplicate tile {0} in Tiles.xml DuplicateTilesetID=Duplicate tile {0} in TileSet.xml @@ -620,6 +621,7 @@ TRAINS=Trains TakeLoanPrompt=Will {0} take a loan of {1}? TakeLoans=Take loan(s) +TGVModifier=TGV trains run on separate tracks. ThisItemIsAuctionedNow=This item is auctioned now TileAlreadyHasToken=Tile {0} already has a base token of company {1} TileColorMissing=Missing color in tile {0} Modified: trunk/18xx/data/1870/Game.xml =================================================================== --- trunk/18xx/data/1870/Game.xml 2011-07-09 12:07:23 UTC (rev 1613) +++ trunk/18xx/data/1870/Game.xml 2011-07-16 06:23:19 UTC (rev 1614) @@ -88,5 +88,9 @@ <Tiles colour="yellow,green,brown,grey"/> <OffBoardRevenue step="3"/> </Phase> + </Component> + <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> + <Modifier class="rails.game.specific._1826.TGVModifier" /> </Component> + </ComponentManager> \ No newline at end of file Modified: trunk/18xx/rails/algorithms/NetworkTrain.java =================================================================== --- trunk/18xx/rails/algorithms/NetworkTrain.java 2011-07-09 12:07:23 UTC (rev 1613) +++ trunk/18xx/rails/algorithms/NetworkTrain.java 2011-07-16 06:23:19 UTC (rev 1614) @@ -15,11 +15,11 @@ private final boolean ignoreMinors; private final int multiplyMajors; private final int multiplyMinors; - private final String trainName; + private String trainName; private final TrainI railsTrain; - public NetworkTrain(int majors, int minors, boolean ignoreMinors, + private NetworkTrain(int majors, int minors, boolean ignoreMinors, int multiplyMajors, int multiplyMinors, String trainName, TrainI train) { this.majors = majors; this.minors = minors; @@ -49,12 +49,18 @@ trainName, railsTrain); } - static NetworkTrain createFromString(String trainString) { + public static NetworkTrain createFromString(String trainString) { String t = trainString.trim(); int cities = 0; int towns = 0; boolean ignoreTowns = false; int multiplyCities = 1; int multiplyTowns = 1; if (t.equals("D")) { log.info("RA: found Diesel train"); cities = 99; + } else if (t.equals("TGV")) { + log.info("RA: found TGV train"); + cities = 3; + ignoreTowns = true; + multiplyCities = 2; + multiplyTowns = 0; } else if (t.contains("+")) { log.info("RA: found Plus train"); cities = Integer.parseInt(t.split("\\+")[0]); // + train @@ -110,6 +116,10 @@ return ignoreMinors; } + public void setTrainName(String name) { + trainName = name; + } + public String getTrainName() { return trainName; } Modified: trunk/18xx/rails/algorithms/RevenueAdapter.java =================================================================== --- trunk/18xx/rails/algorithms/RevenueAdapter.java 2011-07-09 12:07:23 UTC (rev 1613) +++ trunk/18xx/rails/algorithms/RevenueAdapter.java 2011-07-16 06:23:19 UTC (rev 1614) @@ -560,15 +560,31 @@ } public int calculateRevenue() { - return calculateRevenue(0, trains.size() - 1); + // allow dynamic modifiers to have their own revenue calculation method + boolean isModified = false; + int value = 0; + for (RevenueDynamicModifier modifier:dynamicModifiers) { + if (modifier.providesOwnCalculateRevenue()) { + isModified = true; + value += modifier.calculateRevenue(this); + } + } + // if no modifier was used, standard method is to evaluate all trains + if (isModified) { + return value; + } else { + return calculateRevenue(0, trains.size() - 1); + } } public int calculateRevenue(int startTrain, int finalTrain) { - optimalRun = null; if (startTrain < 0 || finalTrain >= trains.size() || startTrain > finalTrain) { return 0; } - rc.initialPredictionRuns(startTrain, finalTrain); + // the optimal run might change + optimalRun = null; + rc.initRuns(startTrain, finalTrain); + rc.executePredictions(startTrain, finalTrain); int value = rc.calculateRevenue(startTrain, finalTrain); return value; } Modified: trunk/18xx/rails/algorithms/RevenueCalculator.java =================================================================== --- trunk/18xx/rails/algorithms/RevenueCalculator.java 2011-07-09 12:07:23 UTC (rev 1613) +++ trunk/18xx/rails/algorithms/RevenueCalculator.java 2011-07-16 06:23:19 UTC (rev 1614) @@ -142,6 +142,7 @@ trainStackPos = new int[nbTrains]; trainBottomActive = new boolean[nbTrains]; trainStartEdge = new int[nbTrains]; + maxCumulatedTrainRevenues = new int[nbTrains]; bonusValue = new int[nbBonuses]; bonusRequiresVertices = new int[nbBonuses]; @@ -324,21 +325,31 @@ log.info("maxCumulatedTrainRevenues = " + Arrays.toString(maxCumulatedTrainRevenues)); } - final void initialPredictionRuns(final int startTrain, final int finalTrain) { - + final void initRuns(final int startTrain, final int finalTrain) { + log.info("RC: init runs from " + startTrain + " to " + finalTrain); if (startTrain > finalTrain) return; this.startTrainSet = startTrain; this.finalTrainSet = finalTrain; - useRevenuePrediction = true; - this.maxCumulatedTrainRevenues = new int[nbTrains]; - for (int i=0; i < nbTrains; i++) { + + // initialize all trains and currentValues + for (int i = startTrain; i < finalTrain; i++) { currentBestRun[i][0] = -1; } + currentBestValue = 0; + + } + final void executePredictions(final int startTrain, final int finalTrain) { + useRevenuePrediction = true; + + if (startTrain > finalTrain) return; + initRevenueValues(startTrain, finalTrain); - if (startTrain == finalTrain) return; + if (startTrain == finalTrain) { + return; + } // start prediction runs nbEvaluations = 0; nbPredictions = 0; nbEdgesTravelled = 0; @@ -380,17 +391,8 @@ final int calculateRevenue(final int startTrain, final int finalTrain) { log.info("RC: calculateRevenue trains from " + startTrain + " to " + finalTrain); - if (!useRevenuePrediction) { - for (int i=0; i < nbTrains; i++) { - currentBestRun[i][0] = -1; - } - } - - this.startTrainSet = startTrain; - this.finalTrainSet = finalTrain; - this.startTrain = startTrain; - this.finalTrainSet = finalTrain; + this.finalTrain = finalTrain; runTrain(startTrain); Modified: trunk/18xx/rails/algorithms/RevenueDynamicModifier.java =================================================================== --- trunk/18xx/rails/algorithms/RevenueDynamicModifier.java 2011-07-09 12:07:23 UTC (rev 1613) +++ trunk/18xx/rails/algorithms/RevenueDynamicModifier.java 2011-07-16 06:23:19 UTC (rev 1614) @@ -3,30 +3,64 @@ import java.util.List; /** - * Classes that change properties of the revenue calculation - * after the actual calculation started implement the dynamic modifier. + * A dynamic modifier allows to change revenue calculation + * during the revenue calculation + * + * For any modfication that only change the setup (e.g. adding bonuses, change train attributes) + * the simpler {@link RevenueStaticModifier} is preferred. * * They have to register themselves to the RevenueManager via the GameManager instance. + * + * Caveats: + * Usually only one instance of a dynamic modifier is needed. + * The interaction between several dynamic modifiers can be complicated. + * + * * @author freystef - * */ public interface RevenueDynamicModifier { - /** after the setup of the revenueAdapter, but before the actual calculation - * if return is false => deactivate */ + /** method called after the setup of the revenueAdapter, but before the actual calculation + * @return true => active, false => deactivate */ public boolean prepareModifier(RevenueAdapter revenueAdapter); - /** returns the value used for prediction */ + /** + * Allows to change the value for the prediction + * If several dynamic modifiers are active simultaneously, their prediction values are added up. + * @return value used to change the prediction + */ public int predictionValue(); - /** returns the value used for evaluation (at the runs supplied) */ + /** + * Allows to change the value for the supplied runs from the revenue calculator + * @param runs Current run of the revenue calculator + * @param optimalRuns true => after optimization, false => during optimization + * @return value used to change the run results + */ public int evaluationValue(List<RevenueTrainRun> runs, boolean optimalRuns); - /** allows to adjust the run list of the optimal train run output */ + /** + * Allows to adjust the run list of the optimal train run output + * @param optimalRuns Optimized run from the revenue calculator + * */ public void adjustOptimalRun(List<RevenueTrainRun> optimalRuns); + + /** + * If the modifier uses its own method for revenue calculation + */ + public boolean providesOwnCalculateRevenue(); + + /** + * Allows to replace the usual calculation process (evaluate all trains simultaneously) + * If several dynamic modifier have their own method, their prediction values are added up. + * @return optimal value + */ + public int calculateRevenue(RevenueAdapter revenueAdpater); - /** returns the results as pretty prints */ - public String prettyPrint(RevenueAdapter adapter); + /** + * Allows to append additional text + * @return String output for display in Rails */ + public String prettyPrint(RevenueAdapter revenueAdapter); } Modified: trunk/18xx/rails/game/specific/_1825/DoubleHeadingModifier.java =================================================================== --- trunk/18xx/rails/game/specific/_1825/DoubleHeadingModifier.java 2011-07-09 12:07:23 UTC (rev 1613) +++ trunk/18xx/rails/game/specific/_1825/DoubleHeadingModifier.java 2011-07-16 06:23:19 UTC (rev 1614) @@ -8,21 +8,23 @@ import rails.algorithms.RevenueAdapter; import rails.algorithms.RevenueDynamicModifier; import rails.algorithms.RevenueTrainRun; +import rails.common.LocalText; +import rails.game.TrainManager; /** - * 1825 modifiers: - * Trains have to start and end in a major station - * Allows two 2-trains to run as a 3-train (double heading) + * Double heading modifier + * Allows two trains to run as a longer train (double heading) */ public class DoubleHeadingModifier implements RevenueDynamicModifier { - private final static String TRAIN_2_NAME = "2"; - private final static String DUALHEAD_NAME = "2&2"; + private final static String TRAIN_SINGLE = "2"; + private final static String DOUBLEHEAD_NAME = "2&2"; + private final static String TRAIN_DOUBLE = "3"; public boolean prepareModifier(RevenueAdapter revenueAdapter) { int nbTrain2 = 0; for (NetworkTrain train:revenueAdapter.getTrains()) { - // checks name of traintype - if (train.getRailsTrainType().getName().equals(TRAIN_2_NAME)) { + // checks name of train + if (train.getTrainName().equals(TRAIN_SINGLE)) { nbTrain2 ++; } } @@ -30,7 +32,8 @@ // add dualhead 3 train for each of a pair of 2-trains boolean hasDualHead = false; while (nbTrain2 >= 2) { - NetworkTrain dualHead = new NetworkTrain(3, 0, false, 1, 1, DUALHEAD_NAME, null); + NetworkTrain dualHead = NetworkTrain.createFromString(TRAIN_DOUBLE); + dualHead.setTrainName(DOUBLEHEAD_NAME); revenueAdapter.addTrain(dualHead); hasDualHead = true; nbTrain2 -= 2; @@ -53,7 +56,7 @@ // find and sort the train2Revenues List<RevenueTrainRun> train2Runs = new ArrayList<RevenueTrainRun>(); for (RevenueTrainRun run:runs) { - if (run.getTrain().getTrainName().equals(TRAIN_2_NAME)) { + if (run.getTrain().getTrainName().equals(TRAIN_SINGLE)) { train2Runs.add(run); } } @@ -64,7 +67,7 @@ // find DualHeads and remove two 2-train revenues for (RevenueTrainRun run:runs) { // only if train has non zero value - if (run.getTrain().getTrainName().equals(DUALHEAD_NAME) && run.getRunValue() !=0) { + if (run.getTrain().getTrainName().equals(DOUBLEHEAD_NAME) && run.getRunValue() !=0) { // two trains get removed index2Runs += 2; } @@ -97,16 +100,25 @@ // remove double heading trains that do not generate value List<RevenueTrainRun> removeDoubleHeading = new ArrayList<RevenueTrainRun>(); for (RevenueTrainRun run:optimalRuns) { - if (run.getTrain().getTrainName().equals(DUALHEAD_NAME) && run.getRunValue() == 0) { + if (run.getTrain().getTrainName().equals(DOUBLEHEAD_NAME) && run.getRunValue() == 0) { removeDoubleHeading.add(run); } } optimalRuns.removeAll(removeDoubleHeading); } + public boolean providesOwnCalculateRevenue() { + // does not + return false; + } + + public int calculateRevenue(RevenueAdapter revenueAdpater) { + // zero does no change + return 0; + } + public String prettyPrint(RevenueAdapter adapter) { - // nothing to print - return null; + return LocalText.getText("DoubleHeadingModifier1825", DOUBLEHEAD_NAME, TRAIN_SINGLE, TRAIN_DOUBLE); } } Modified: trunk/18xx/rails/game/specific/_1825/TerminateAtMajorModifier.java =================================================================== --- trunk/18xx/rails/game/specific/_1825/TerminateAtMajorModifier.java 2011-07-09 12:07:23 UTC (rev 1613) +++ trunk/18xx/rails/game/specific/_1825/TerminateAtMajorModifier.java 2011-07-16 06:23:19 UTC (rev 1614) @@ -48,7 +48,16 @@ run.getRunVertices().clear(); } } + public boolean providesOwnCalculateRevenue() { + // does not + return false; + } + public int calculateRevenue(RevenueAdapter revenueAdpater) { + // zero does no change + return 0; + } + public String prettyPrint(RevenueAdapter adapter) { // nothing to do return null; Added: trunk/18xx/rails/game/specific/_1826/TGVModifier.java =================================================================== --- trunk/18xx/rails/game/specific/_1826/TGVModifier.java (rev 0) +++ trunk/18xx/rails/game/specific/_1826/TGVModifier.java 2011-07-16 06:23:19 UTC (rev 1614) @@ -0,0 +1,82 @@ +package rails.game.specific._1826; + +import java.util.ArrayList; +import java.util.List; + +import rails.algorithms.NetworkTrain; +import rails.algorithms.RevenueAdapter; +import rails.algorithms.RevenueDynamicModifier; +import rails.algorithms.RevenueTrainRun; +import rails.common.LocalText; + +/** + * TGV is a train that runs on independent track (defined in Game 1826) + * implementation allows several tgv trains + * @author freystef + */ +public class TGVModifier implements RevenueDynamicModifier { + + final private String TGV_NAME = "TGV"; + + private int nbTGV = 0; // store the number of tgv + + public boolean prepareModifier(RevenueAdapter revenueAdapter) { + + // separate trains into tgv and others + List<NetworkTrain> allTrains = revenueAdapter.getTrains(); + List<NetworkTrain> tgvTrains = new ArrayList<NetworkTrain>(); + List<NetworkTrain> otherTrains = new ArrayList<NetworkTrain>(); + for (NetworkTrain train:allTrains) { + // checks name of train + if (train.getTrainName().equals(TGV_NAME)) { + tgvTrains.add(train); + } else { + otherTrains.add(train); + } + } + + // change list that tgv trains are the first ones, if there are tgvs ... + nbTGV = tgvTrains.size(); + if (nbTGV != 0) { + allTrains.clear(); + allTrains.addAll(tgvTrains); + allTrains.addAll(otherTrains); + return true; + } else { // ... otherwise deactivate modifier + return false; + } + } + + public int predictionValue() { + // nothing to do here + return 0; + } + + public int evaluationValue(List<RevenueTrainRun> runs, boolean optimalRuns) { + // nothing to do here + return 0; + } + + public void adjustOptimalRun(List<RevenueTrainRun> optimalRuns) { + // nothing to do + } + + public boolean providesOwnCalculateRevenue() { + return true; + } + + public int calculateRevenue(RevenueAdapter revenueAdapter) { + // tgv run separately (see prepare modifier above) + int value = 0; + value = revenueAdapter.calculateRevenue(0, nbTGV-1); + // add the other trains + value += revenueAdapter.calculateRevenue(nbTGV, revenueAdapter.getTrains().size()-1); + return value; + } + + public String prettyPrint(RevenueAdapter adapter) { + return LocalText.getText("TGVModifier"); + } + + +} Property changes on: trunk/18xx/rails/game/specific/_1826/TGVModifier.java ___________________________________________________________________ Added: svn:mime-type + text/plain Modified: trunk/18xx/rails/game/specific/_18AL/NamedTrainRevenueModifier.java =================================================================== --- trunk/18xx/rails/game/specific/_18AL/NamedTrainRevenueModifier.java 2011-07-09 12:07:23 UTC (rev 1613) +++ trunk/18xx/rails/game/specific/_18AL/NamedTrainRevenueModifier.java 2011-07-16 06:23:19 UTC (rev 1614) @@ -118,6 +118,16 @@ // do nothing here (all is done by changing the evaluation value) } + public boolean providesOwnCalculateRevenue() { + // does not + return false; + } + + public int calculateRevenue(RevenueAdapter revenueAdpater) { + // zero does no change + return 0; + } + public String prettyPrint(RevenueAdapter revenueAdapter) { List<RevenueTrainRun> runs = revenueAdapter.getOptimalRun(); StringBuffer prettyPrint = new StringBuffer(); Modified: trunk/18xx/rails/game/specific/_18EU/PullmanRevenueModifier.java =================================================================== --- trunk/18xx/rails/game/specific/_18EU/PullmanRevenueModifier.java 2011-07-09 12:07:23 UTC (rev 1613) +++ trunk/18xx/rails/game/specific/_18EU/PullmanRevenueModifier.java 2011-07-16 06:23:19 UTC (rev 1614) @@ -49,6 +49,15 @@ return maxValue; } + public boolean providesOwnCalculateRevenue() { + // does not + return false; + } + + public int calculateRevenue(RevenueAdapter revenueAdpater) { + // zero does no change + return 0; + } public void adjustOptimalRun(List<RevenueTrainRun> optimalRuns) { // do nothing here (all is done by changing the evaluation value) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-07-09 12:07:30
|
Revision: 1613 http://rails.svn.sourceforge.net/rails/?rev=1613&view=rev Author: stefanfrey Date: 2011-07-09 12:07:23 +0000 (Sat, 09 Jul 2011) Log Message: ----------- Updated ListAndFixSavedFiles to use GameFileIO for saving. Added support to show and save user comments correctly for that class. Modified Paths: -------------- trunk/18xx/rails/util/GameFileIO.java trunk/18xx/rails/util/ListAndFixSavedFiles.java Modified: trunk/18xx/rails/util/GameFileIO.java =================================================================== --- trunk/18xx/rails/util/GameFileIO.java 2011-07-08 17:17:29 UTC (rev 1612) +++ trunk/18xx/rails/util/GameFileIO.java 2011-07-09 12:07:23 UTC (rev 1613) @@ -265,9 +265,12 @@ * requires initSave and setting actions and comments */ public boolean saveGame(File file, boolean displayErrorMessage, String errorMessageKey) { - if (!initSave || gameData.actions == null) return false; + if (!(initSave || dataLoadDone) || gameData.actions == null) { + log.warn("File save not possible due to missing data"); + return false; + } boolean result = false; - + log.info("Trying to save file to " + file.getAbsoluteFile()); try { ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file)); @@ -284,6 +287,7 @@ oos.close(); result = true; + log.info("File save successfull"); } catch (IOException e) { log.error(errorMessageKey, e); if (displayErrorMessage) { Modified: trunk/18xx/rails/util/ListAndFixSavedFiles.java =================================================================== --- trunk/18xx/rails/util/ListAndFixSavedFiles.java 2011-07-08 17:17:29 UTC (rev 1612) +++ trunk/18xx/rails/util/ListAndFixSavedFiles.java 2011-07-09 12:07:23 UTC (rev 1613) @@ -34,9 +34,7 @@ private StringBuffer headerText = new StringBuffer(); - private List<Object> savedObjects = new ArrayList<Object>(512); - private List<PossibleAction> executedActions; - private SortedMap<Integer,String> userComments; + private GameFileIO fileIO; private int vbarPos; @@ -152,7 +150,6 @@ } - @SuppressWarnings("unchecked") private void load() { JFileChooser jfc = new JFileChooser(); @@ -165,15 +162,13 @@ saveDirectory = selectedFile.getParent(); // use GameLoader object to load game - GameFileIO gameLoader = new GameFileIO(); + fileIO = new GameFileIO(); - gameLoader.loadGameData(filepath); - add(gameLoader.getGameDataAsText()); + fileIO.loadGameData(filepath); + add(fileIO.getGameDataAsText()); try{ - gameLoader.initGame(); - gameLoader.loadActionsAndComments(); - executedActions = gameLoader.getActions(); - userComments = gameLoader.getComments(); + fileIO.initGame(); + fileIO.loadActionsAndComments(); setReportText(true); } catch (ConfigurationException e) { @@ -200,9 +195,15 @@ reportText.setText(headerText.toString()); // append actionText int i=0; - for (PossibleAction action : executedActions) { - reportText.append("Action "+(i++)+" "+action.getPlayerName()+": "+action.toString()); + for (PossibleAction action : fileIO.getActions()) { + reportText.append("Action "+i+" "+action.getPlayerName()+": "+action.toString()); reportText.append("\n"); + // check for comments for this action + String comment = fileIO.getComments().get(i); + if (comment!= null) { + reportText.append("Comment to action " + i + ": " + comment + "\n"); + } + i++; } scrollDown(vbarPos); } @@ -228,8 +229,15 @@ if (Util.hasValue(result)) { try { int index = Integer.parseInt(result); - List<PossibleAction> toRemove = executedActions.subList(index, executedActions.size()); - toRemove.clear(); + // delete actions + int size = fileIO.getActions().size(); + fileIO.getActions().subList(index + 1, size).clear(); + // delete comments + for (int id = 0; id < size; id++) { + if (id > index) { + fileIO.getComments().remove(id); + } + } setReportText(false); } catch (NumberFormatException e) { @@ -240,9 +248,17 @@ if (Util.hasValue(result)) { try { int index = Integer.parseInt(result); - PossibleAction action = executedActions.get(index); - executedActions.remove(action); - savedObjects.remove(action); + fileIO.getActions().remove(index); + // delete and renumber in user Comments + SortedMap<Integer, String> newComments = new TreeMap<Integer, String>(); + for (Integer id:fileIO.getComments().keySet()) { + if (id < index) { + newComments.put(id, fileIO.getComments().get(id)); + } else if (id > index) { + newComments.put(id-1, fileIO.getComments().get(id)); + } + } + fileIO.setComments(newComments); setReportText(false); } catch (NumberFormatException e) { log.error("Number format exception for '"+result+"'", e); @@ -265,26 +281,7 @@ } if (jfc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) { File selectedFile = jfc.getSelectedFile(); - filepath = selectedFile.getPath(); - saveDirectory = selectedFile.getParent(); - - try { - try { - ObjectOutputStream oos = - new ObjectOutputStream(new FileOutputStream(new File( - filepath))); - for (Object object : savedObjects) { - oos.writeObject(object); - } - oos.close(); - } catch (IOException e) { - log.error("Save failed", e); - DisplayBuffer.add(LocalText.getText("SaveFailed", e.getMessage())); - } - } catch (Exception e) { - System.out.println ("Error whilst writing file "+filepath); - e.printStackTrace(); - } + fileIO.saveGame(selectedFile, true, "SaveFailed"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wak...@us...> - 2011-07-08 17:17:35
|
Revision: 1612 http://rails.svn.sourceforge.net/rails/?rev=1612&view=rev Author: wakko666 Date: 2011-07-08 17:17:29 +0000 (Fri, 08 Jul 2011) Log Message: ----------- Remove svn:ignore property from 18xx Property Changed: ---------------- trunk/18xx/ Property changes on: trunk/18xx ___________________________________________________________________ Deleted: svn:ignore - *.bat *.txt .cvsignore .classpath .externalToolBuilders 18xx.zip deploy.xml .project zip.xml NewUIstuff.zip COMP.WPS rails.jar rails.jardesc Rails-1.0.1.jar my_my.properties log rails-1.0.1.jar rails*.zip rails-*.jar tools rails-?.*.* jar/* classes/* 18xx_autosave.rails 18xx_autosave.rails.tmp user.profiles o C.properties A.properties B.properties This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-07-08 10:08:11
|
Revision: 1611 http://rails.svn.sourceforge.net/rails/?rev=1611&view=rev Author: evos Date: 2011-07-08 10:08:04 +0000 (Fri, 08 Jul 2011) Log Message: ----------- Added location attribute to SpecialRight Modified Paths: -------------- trunk/18xx/data/1830/CompanyManager.xml trunk/18xx/rails/game/special/SpecialRight.java Modified: trunk/18xx/data/1830/CompanyManager.xml =================================================================== --- trunk/18xx/data/1830/CompanyManager.xml 2011-07-07 19:23:32 UTC (rev 1610) +++ trunk/18xx/data/1830/CompanyManager.xml 2011-07-08 10:08:04 UTC (rev 1611) @@ -26,7 +26,7 @@ <CanUseSpecialProperties/> <SpecialProperties> <SpecialProperty condition="ifOwnedByCompany" when="orTurn" class="rails.game.special.SpecialRight"> - <SpecialRight name="Coalfields" cost="140"/> + <SpecialRight name="Coalfields" cost="140" location="L10"/> </SpecialProperty> </SpecialProperties> </IfOption> Modified: trunk/18xx/rails/game/special/SpecialRight.java =================================================================== --- trunk/18xx/rails/game/special/SpecialRight.java 2011-07-07 19:23:32 UTC (rev 1610) +++ trunk/18xx/rails/game/special/SpecialRight.java 2011-07-08 10:08:04 UTC (rev 1611) @@ -1,7 +1,7 @@ /* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/special/SpecialRight.java,v 1.19 2010/05/05 21:37:18 evos Exp $ */ package rails.game.special; -import java.util.Set; +import java.util.*; import rails.algorithms.NetworkVertex; import rails.algorithms.RevenueAdapter; @@ -19,7 +19,9 @@ protected String rightName; protected String rightDefaultValue; protected String rightValue; - protected int cost; + protected int cost = 0; + protected String locationNames; + protected List<MapHex> locations; @Override public void configureFromXML(Tag tag) throws ConfigurationException { @@ -39,6 +41,8 @@ rightDefaultValue = rightValue = rightTag.getAttributeAsString("defaultValue", null); cost = rightTag.getAttributeAsInteger("cost", 0); + + locationNames = rightTag.getAttributeAsString("location", null); } @Override @@ -47,6 +51,19 @@ // add them to the call list of the RevenueManager gameManager.getRevenueManager().addStaticModifier(this); + + if (locationNames != null) { + locations = new ArrayList<MapHex>(); + MapManager mmgr = gameManager.getMapManager(); + MapHex hex; + for (String hexName : locationNames.split(",")) { + hex = mmgr.getHex(hexName); + if (hex == null) { + throw new ConfigurationException ("Unknown hex '"+hexName+"' for Special Right"); + } + locations.add (hex); + } + } } public boolean isExecutionable() { @@ -75,9 +92,21 @@ return cost; } + public String getLocationNames() { + return locationNames; + } + + public List<MapHex> getLocations() { + return locations; + } + @Override public String toString() { - return "Buy '" + rightName + "' right for " + Bank.format(cost); + StringBuilder b = new StringBuilder(); + b.append(cost > 0 ? "Buy '" : "Get '").append(rightName).append("'"); + if (locationNames != null) b.append(" at ").append(locationNames); + if (cost > 0) b.append(" for ").append(Bank.format(cost)); + return b.toString(); } @Override This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-07-07 19:23:39
|
Revision: 1610 http://rails.svn.sourceforge.net/rails/?rev=1610&view=rev Author: evos Date: 2011-07-07 19:23:32 +0000 (Thu, 07 Jul 2011) Log Message: ----------- Phase management step 2: Moved rusted and released trains from <Train> to <Phase>. This has been implemented in the code, but applied to 18TN and 1856 only (the old method still works). Also split some report lines that started with a newline into a blank line and a line without newline (as per SF). Modified Paths: -------------- trunk/18xx/LocalisedText.properties trunk/18xx/data/1856/Game.xml trunk/18xx/data/18TN/Game.xml trunk/18xx/rails/game/OperatingRound.java trunk/18xx/rails/game/Phase.java trunk/18xx/rails/game/PhaseI.java trunk/18xx/rails/game/PhaseManager.java trunk/18xx/rails/game/Portfolio.java trunk/18xx/rails/game/StockRound.java trunk/18xx/rails/game/TrainManager.java trunk/18xx/rails/game/specific/_1835/PrussianFormationRound.java trunk/18xx/rails/game/specific/_1856/CGRFormationRound.java trunk/18xx/rails/game/specific/_18EU/StartRound_18EU.java Modified: trunk/18xx/LocalisedText.properties =================================================================== --- trunk/18xx/LocalisedText.properties 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/LocalisedText.properties 2011-07-07 19:23:32 UTC (rev 1610) @@ -142,13 +142,13 @@ CompanyDoesNotExist=Company {0} does not exist CompanyDoesNotOwnTrain=Company {0} does not own a {1}-train CompanyDoesNotPayDividend={0} does not pay a dividend -CompanyHasLoans=\n{0} ({1}) has {2} loans of {3}, total is {4} -CompanyHasShares=\n{0} has {1} shares of {2}% each +CompanyHasLoans={0} ({1}) has {2} loans of {3}, total is {4} +CompanyHasShares={0} has {1} shares of {2}% each CompanyHasNoType=Company {0} has no type defined CompanyHasUnknownType=Company {0} has an undefined type {1} CompanyMustOwnATrain={0} must own a train CompanyMustPayLoanInterest={0} must pay {1} loan interest -CompanyOperates=\n{0} ({1}) operates. +CompanyOperates={0} ({1}) operates. CompanyPaysLoanInterest={0} pays {1} as {2}% interest over {3} loans of {4} CompanyPaysOutFull={0} pays out full dividend of {1} CompanyRepaysLoans={0} pays {1} (of {2}) to repay {3} loan(s) of {4} from its treasury @@ -243,15 +243,15 @@ EDIT=Edit EMERGENCY_SHARE_SELLING_TITLE=Rails: Game Status - SELLING SHARES FOR EMERGENCY CASH RAISING END_OF_GAME_CLOSE_ALL_WINDOWS=Close all windows -END_SR=\nAll players have passed, end of SR {0} +END_SR=All players have passed, end of SR {0} EndOfExchangeRound=All minors are closed, end of Exchange Round -EndOfFormationRound=\nEnd of {0} formation round, resuming {1} -EndOfFormationRoundNoInterrupt=\nEnd of {0} formation round +EndOfFormationRound=End of {0} formation round, resuming {1} +EndOfFormationRoundNoInterrupt=End of {0} formation round ENTER_PRICE_OR_CANCEL=Enter a valid price or hit Cancel ERROR=Error EXCHANGED=exchanged EXPORT=Export Map -EndOfOperatingRound=\nEnd of Operating Round {0} +EndOfOperatingRound=End of Operating Round {0} EnterRevenue=Enter the earnings of the operating company EnterSearch=Enter search target EoGFinalRanking=Final ranking @@ -550,7 +550,7 @@ SelectCheapTrain=You can buy a cheaper new train by using {0}. SelectStationForToken={0}, select a station on hex {1} for the {2} home base token SelectStationForTokenOption=Place token in station {0} with tracks to {1} -SelectForAuctioning=\n{0} selects {1} for auctioning +SelectForAuctioning={0} selects {1} for auctioning SELL=Sell SELL_SHARE_LOG={0} sells a {1}% share of {2} to Pool for {3}. SELL_SHARES_LOG={0} sells {1} {2}% shares ({3}%) of {4} to Pool for {5}. Modified: trunk/18xx/data/1856/Game.xml =================================================================== --- trunk/18xx/data/1856/Game.xml 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/data/1856/Game.xml 2011-07-07 19:23:32 UTC (rev 1610) @@ -52,14 +52,20 @@ <Score towns="yes"/> </Defaults> <TrainType name="2" majorStops="2" cost="100" quantity="6"/> - <TrainType name="3" majorStops="3" cost="225" quantity="5" startPhase="2"/> - <TrainType name="4" majorStops="4" cost="350" quantity="4" startPhase="3" - rustedTrain="2"/> - <TrainType name="5" majorStops="5" cost="550" quantity="3" startPhase="4"/> - <TrainType name="6" majorStops="6" cost="700" quantity="2" startPhase="5" - rustedTrain="3" releasedTrain="D"/> - <TrainType name="D" majorStops="99" cost="1100" quantity="-1" startPhase="6" - rustedTrain="4"> + <TrainType name="3" majorStops="3" cost="225" quantity="5"> + <NewPhase phaseName="2"/> + </TrainType> + <TrainType name="4" majorStops="4" cost="350" quantity="4"> + <NewPhase phaseName="3"/> + </TrainType> + <TrainType name="5" majorStops="5" cost="550" quantity="3"> + <NewPhase phaseName="4"/> + </TrainType> + <TrainType name="6" majorStops="6" cost="700" quantity="2"> + <NewPhase phaseName="5"/> + </TrainType> + <TrainType name="D" majorStops="99" cost="1100" quantity="-1"> + <NewPhase phaseName="6"/> <Exchange cost="750"/> </TrainType> </Component> @@ -76,7 +82,7 @@ <Privates sellingAllowed="yes"/> </Phase> <Phase name="3"> - <Tiles colour="yellow,green"/> + <Trains rusted="2"/> </Phase> <Phase name="4"> <Tiles colour="yellow,green,brown"/> @@ -86,10 +92,11 @@ </Phase> <Phase name="5"> <Tiles colour="yellow,green,brown,grey"/> + <Trains rusted="3" released="D"/> <Loans allowed="no"/> </Phase> <Phase name="6"> - <Tiles colour="yellow,green,brown,grey"/> + <Trains rusted="4"/> <OffBoardRevenue step="3"/> </Phase> </Component> Modified: trunk/18xx/data/18TN/Game.xml =================================================================== --- trunk/18xx/data/18TN/Game.xml 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/data/18TN/Game.xml 2011-07-07 19:23:32 UTC (rev 1610) @@ -84,19 +84,17 @@ <NewPhase phaseName="3"/> <NewPhase phaseName="3½" trainIndex="4"/> </TrainType> - <TrainType name="4" majorStops="4" cost="300" quantity="3" obsoleting="yes" - rustedTrain="2"> + <TrainType name="4" majorStops="4" cost="300" quantity="3" obsoleting="yes"> <NewPhase phaseName="4"/> </TrainType> <TrainType name="5" majorStops="5" cost="450" quantity="2"> <NewPhase phaseName="5"/> </TrainType> - <TrainType name="6" majorStops="6" cost="630" quantity="2" rustedTrain="3"> + <TrainType name="6" majorStops="6" cost="630" quantity="2"> <NewPhase phaseName="6"/> <NewPhase phaseName="6½" trainIndex="2"/> - <Sub index="2" rustedTrain="4"/> - </TrainType> - <TrainType name="8" majorStops="8" cost="700" quantity="7" rustedTrain="4"> + </TrainType> + <TrainType name="8" majorStops="8" cost="700" quantity="7"> <NewPhase phaseName="8"/> </TrainType> </Component> @@ -116,10 +114,9 @@ <OperatingRounds number="2"/> </Phase> <Phase name="3½"> - <Tiles colour="yellow,green"/> </Phase> <Phase name="4"> - <Tiles colour="yellow,green"/> + <Trains rusted="2"/> </Phase> <Phase name="5"> <Tiles colour="yellow,green,brown"/> @@ -128,13 +125,12 @@ <OffBoardRevenue step="2"/> </Phase> <Phase name="6"> - <Tiles colour="yellow,green,brown"/> + <Trains rusted="3"/> </Phase> <Phase name="6½"> - <Tiles colour="yellow,green,brown"/> + <Trains rusted="4"/> </Phase> <Phase name="8"> - <Tiles colour="yellow,green,brown"/> </Phase> </Component> </ComponentManager> \ No newline at end of file Modified: trunk/18xx/rails/game/OperatingRound.java =================================================================== --- trunk/18xx/rails/game/OperatingRound.java 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/rails/game/OperatingRound.java 2011-07-07 19:23:32 UTC (rev 1610) @@ -1302,6 +1302,7 @@ protected void initTurn() { log.debug("Starting turn of "+operatingCompany.get().getName()); + ReportBuffer.add(" "); ReportBuffer.add(LocalText.getText("CompanyOperates", operatingCompany.get().getName(), operatingCompany.get().getPresident().getName())); @@ -1645,6 +1646,7 @@ // priv.checkClosingIfExercised(true); //} + ReportBuffer.add(" "); ReportBuffer.add(LocalText.getText("EndOfOperatingRound", thisOrNumber)); // Update the worth increase per player Modified: trunk/18xx/rails/game/Phase.java =================================================================== --- trunk/18xx/rails/game/Phase.java 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/rails/game/Phase.java 2011-07-07 19:23:32 UTC (rev 1610) @@ -45,6 +45,17 @@ /** Items to close if a phase gets activated */ protected List<Closeable> closedObjects = null; + + /** Train types to rust or obsolete if a phase gets activated */ + protected List<TrainCertificateType> rustedTrains; + String rustedTrainNames; + + /** Train types to release (make available for buying) if a phase gets activated */ + protected List<TrainCertificateType> releasedTrains; + String releasedTrainNames; + + private TrainManager trainManager; + private Portfolio lastTrainBuyer; protected String extraInfo = ""; @@ -123,6 +134,8 @@ Tag trainsTag = tag.getChild("Trains"); if (trainsTag != null) { + rustedTrainNames = trainsTag.getAttributeAsString("rusted", null); + releasedTrainNames = trainsTag.getAttributeAsString("released", null); trainTradingAllowed = trainsTag.getAttributeAsBoolean("tradingAllowed", trainTradingAllowed); @@ -159,8 +172,36 @@ } - public void finishConfiguration (GameManagerI gameManager) {} + public void finishConfiguration (GameManagerI gameManager) + throws ConfigurationException { + + trainManager = gameManager.getTrainManager(); + TrainCertificateType type; + + if (rustedTrainNames != null) { + rustedTrains = new ArrayList<TrainCertificateType>(2); + for (String typeName : rustedTrainNames.split(",")) { + type = trainManager.getCertTypeByName(typeName); + if (type == null) { + throw new ConfigurationException (" Unknown rusted train type '"+typeName+"' for phase '"+name+"'"); + } + rustedTrains.add(type); + type.setPermanent(false); + } + } + if (releasedTrainNames != null) { + releasedTrains = new ArrayList<TrainCertificateType>(2); + for (String typeName : releasedTrainNames.split(",")) { + type = trainManager.getCertTypeByName(typeName); + if (type == null) { + throw new ConfigurationException (" Unknown released train type '"+typeName+"' for phase '"+name+"'"); + } + releasedTrains.add(type); + } + } + } + /** Called when a phase gets activated */ public void activate() { log.debug("Phase " + name + " activated"); @@ -170,8 +211,24 @@ object.close(); } } + + if (rustedTrains != null && !rustedTrains.isEmpty()) { + for (TrainCertificateType type : rustedTrains) { + trainManager.rustTrainType(type, lastTrainBuyer); + } + } + + if (releasedTrains != null && !releasedTrains.isEmpty()) { + for (TrainCertificateType type : releasedTrains) { + trainManager.makeTrainAvailable(type); + } + } } + public void setLastTrainBuyer(Portfolio lastTrainBuyer) { + this.lastTrainBuyer = lastTrainBuyer; + } + public String getInfo() { return extraInfo; } @@ -233,6 +290,14 @@ return numberOfOperatingRounds; } + public List<TrainCertificateType> getRustedTrains() { + return rustedTrains; + } + + public List<TrainCertificateType> getReleasedTrains() { + return releasedTrains; + } + /** * @return Returns the offBoardRevenueStep. */ Modified: trunk/18xx/rails/game/PhaseI.java =================================================================== --- trunk/18xx/rails/game/PhaseI.java 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/rails/game/PhaseI.java 2011-07-07 19:23:32 UTC (rev 1610) @@ -39,4 +39,6 @@ public String getParameterAsString (String key); public int getParameterAsInteger (String key); + + public void setLastTrainBuyer(Portfolio lastTrainBuyer); } Modified: trunk/18xx/rails/game/PhaseManager.java =================================================================== --- trunk/18xx/rails/game/PhaseManager.java 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/rails/game/PhaseManager.java 2011-07-07 19:23:32 UTC (rev 1610) @@ -51,10 +51,16 @@ } } - public void finishConfiguration (GameManagerI gameManager) { + public void finishConfiguration (GameManagerI gameManager) + throws ConfigurationException { this.gameManager = gameManager; + + for (Phase phase : phaseList) { + phase.finishConfiguration(gameManager); + } + PhaseI initialPhase = phaseList.get(0); - setPhase(initialPhase); + setPhase(initialPhase, null); } public PhaseI getCurrentPhase() { @@ -69,12 +75,13 @@ return getCurrentPhase().getIndex(); } - public void setPhase(String name) { - setPhase(phaseMap.get(name)); + public void setPhase(String name, Portfolio lastTrainBuyer) { + setPhase(phaseMap.get(name), lastTrainBuyer); } - protected void setPhase(PhaseI phase) { + protected void setPhase(PhaseI phase, Portfolio lastTrainBuyer) { if (phase != null) { + phase.setLastTrainBuyer (lastTrainBuyer); currentPhase.set(phase); // TODO Redundant, should be replaced by phase.activate() Modified: trunk/18xx/rails/game/Portfolio.java =================================================================== --- trunk/18xx/rails/game/Portfolio.java 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/rails/game/Portfolio.java 2011-07-07 19:23:32 UTC (rev 1610) @@ -544,7 +544,9 @@ if (trainsOfType != null && !trainsOfType.isEmpty()) { for (TrainI train : trainsOfType) { if (b.length() > 0) b.append(" "); + if (train.isObsolete()) b.append("["); b.append(train.getName()); + if (train.isObsolete()) b.append("]"); } } } Modified: trunk/18xx/rails/game/StockRound.java =================================================================== --- trunk/18xx/rails/game/StockRound.java 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/rails/game/StockRound.java 2011-07-07 19:23:32 UTC (rev 1610) @@ -1312,6 +1312,7 @@ @Override protected void finishRound () { + ReportBuffer.add(" "); ReportBuffer.add(LocalText.getText("END_SR", String.valueOf(getStockRoundNumber()))); Modified: trunk/18xx/rails/game/TrainManager.java =================================================================== --- trunk/18xx/rails/game/TrainManager.java 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/rails/game/TrainManager.java 2011-07-07 19:23:32 UTC (rev 1610) @@ -308,7 +308,7 @@ String newPhase = boughtType.getStartedPhaseName(); if (newPhase != null) { - gameManager.getPhaseManager().setPhase(newPhase); + gameManager.getPhaseManager().setPhase(newPhase, train.getHolder()); phaseHasChanged = true; } @@ -329,7 +329,7 @@ Phase newPhase; if (newPhases.get(boughtType) != null && (newPhase = newPhases.get(boughtType).get(trainIndex)) != null) { - gameManager.getPhaseManager().setPhase(newPhase); + gameManager.getPhaseManager().setPhase(newPhase, train.getHolder()); phaseHasChanged = true; } Modified: trunk/18xx/rails/game/specific/_1835/PrussianFormationRound.java =================================================================== --- trunk/18xx/rails/game/specific/_1835/PrussianFormationRound.java 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/rails/game/specific/_1835/PrussianFormationRound.java 2011-07-07 19:23:32 UTC (rev 1610) @@ -435,6 +435,7 @@ @Override protected void finishRound() { RoundI interruptedRound = gameManager.getInterruptedRound(); + ReportBuffer.add(" "); if (interruptedRound != null) { ReportBuffer.add(LocalText.getText("EndOfFormationRound", PR_ID, interruptedRound.getRoundName())); Modified: trunk/18xx/rails/game/specific/_1856/CGRFormationRound.java =================================================================== --- trunk/18xx/rails/game/specific/_1856/CGRFormationRound.java 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/rails/game/specific/_1856/CGRFormationRound.java 2011-07-07 19:23:32 UTC (rev 1610) @@ -152,6 +152,8 @@ numberOfLoans, Bank.format(valuePerLoan), Bank.format(numberOfLoans * valuePerLoan)); + ReportBuffer.add(" "); + DisplayBuffer.add(" ", false); ReportBuffer.add(message); DisplayBuffer.add(message, false); @@ -428,6 +430,8 @@ } message = LocalText.getText("CompanyHasShares", cgr.getName(), 100/cgr.getShareUnit(), cgr.getShareUnit()); + DisplayBuffer.add(" "); + ReportBuffer.add(" "); DisplayBuffer.add(message); ReportBuffer.add(message); Modified: trunk/18xx/rails/game/specific/_18EU/StartRound_18EU.java =================================================================== --- trunk/18xx/rails/game/specific/_18EU/StartRound_18EU.java 2011-07-07 12:58:55 UTC (rev 1609) +++ trunk/18xx/rails/game/specific/_18EU/StartRound_18EU.java 2011-07-07 19:23:32 UTC (rev 1610) @@ -244,6 +244,7 @@ setStep(OPEN_STEP); } + ReportBuffer.add(" "); ReportBuffer.add(LocalText.getText("SelectForAuctioning", playerName, item.getName() )); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ev...@us...> - 2011-07-07 12:59:01
|
Revision: 1609 http://rails.svn.sourceforge.net/rails/?rev=1609&view=rev Author: evos Date: 2011-07-07 12:58:55 +0000 (Thu, 07 Jul 2011) Log Message: ----------- Fixed: 1856 THB home hex: if there is a foreign token on L15 when THB starts, home hex was not laid in first OR. Modified Paths: -------------- trunk/18xx/rails/game/PublicCompany.java Modified: trunk/18xx/rails/game/PublicCompany.java =================================================================== --- trunk/18xx/rails/game/PublicCompany.java 2011-07-07 04:56:55 UTC (rev 1608) +++ trunk/18xx/rails/game/PublicCompany.java 2011-07-07 12:58:55 UTC (rev 1609) @@ -1818,9 +1818,24 @@ Map<Integer, List<Track>> tracks = homeHex.getCurrentTile().getTracksPerStationMap(); if (tracks == null || tracks.isEmpty()) { + // No tracks, then it doesn't matter homeCityNumber = 1; } else { - return false; + // Cover the case that there already is another token. + // Allowing this is optional for 1856 Hamilton (THB home) + List<City> cities = homeHex.getCities(); + List<City> openCities = new ArrayList<City>(); + for (City city : cities) { + if (city.hasTokenSlotsLeft()) openCities.add (city); + } + if (openCities.size() == 1) { + // Just one spot: lay the home base there. + homeCityNumber = openCities.get(0).getNumber(); + } else { + // ?? + // TODO Will player be asked?? + return false; + } } } log.debug(name + " lays home base on " + homeHex.getName() + " city " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ste...@us...> - 2011-07-07 04:57:01
|
Revision: 1608 http://rails.svn.sourceforge.net/rails/?rev=1608&view=rev Author: stefanfrey Date: 2011-07-07 04:56:55 +0000 (Thu, 07 Jul 2011) Log Message: ----------- Added support for Rights in Revenue Calculation. Important ToDo: Still hardcoded rights location. Modified Paths: -------------- trunk/18xx/data/1830/Game.xml trunk/18xx/rails/game/PublicCompany.java trunk/18xx/rails/game/special/SpecialRight.java Modified: trunk/18xx/data/1830/Game.xml =================================================================== --- trunk/18xx/data/1830/Game.xml 2011-07-07 04:53:35 UTC (rev 1607) +++ trunk/18xx/data/1830/Game.xml 2011-07-07 04:56:55 UTC (rev 1608) @@ -240,4 +240,7 @@ <Tiles colour="yellow,green,brown"/> </Phase> </Component> + <Component name="RevenueManager" class="rails.algorithms.RevenueManager"> +<!-- Required for coalfield rights '--> + </Component> </ComponentManager> \ No newline at end of file Modified: trunk/18xx/rails/game/PublicCompany.java =================================================================== --- trunk/18xx/rails/game/PublicCompany.java 2011-07-07 04:53:35 UTC (rev 1607) +++ trunk/18xx/rails/game/PublicCompany.java 2011-07-07 04:56:55 UTC (rev 1608) @@ -768,6 +768,8 @@ // Initialize rights here to prevent overhead if not used, // but if rights are used, the GUI needs it from the start. if (rights == null) rights = new HashMapState<String, String>(name+"_Rights"); + // TODO: This is only a workaround for the missing finishConfiguration of special properties (SFY) + sp.finishConfiguration(gameManager); } } } Modified: trunk/18xx/rails/game/special/SpecialRight.java =================================================================== --- trunk/18xx/rails/game/special/SpecialRight.java 2011-07-07 04:53:35 UTC (rev 1607) +++ trunk/18xx/rails/game/special/SpecialRight.java 2011-07-07 04:56:55 UTC (rev 1608) @@ -1,13 +1,19 @@ /* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/game/special/SpecialRight.java,v 1.19 2010/05/05 21:37:18 evos Exp $ */ package rails.game.special; +import java.util.Set; + +import rails.algorithms.NetworkVertex; +import rails.algorithms.RevenueAdapter; +import rails.algorithms.RevenueBonus; +import rails.algorithms.RevenueStaticModifier; import rails.common.LocalText; import rails.common.parser.ConfigurationException; import rails.common.parser.Tag; import rails.game.*; import rails.util.*; -public class SpecialRight extends SpecialProperty { +public class SpecialRight extends SpecialProperty implements RevenueStaticModifier { /** The public company of which a share can be obtained. */ protected String rightName; @@ -35,6 +41,14 @@ cost = rightTag.getAttributeAsInteger("cost", 0); } + @Override + public void finishConfiguration (GameManagerI gameManager) throws ConfigurationException { + super.finishConfiguration(gameManager); + + // add them to the call list of the RevenueManager + gameManager.getRevenueManager().addStaticModifier(this); + } + public boolean isExecutionable() { return originalCompany.getPortfolio().getOwner() instanceof Player; @@ -76,4 +90,18 @@ public String getInfo() { return toMenu(); } + + /** + * modify revenue calculation of the + * TODO: rights is missing a location field, currently hardcoded for 1830 coalfields + */ + public void modifyCalculator(RevenueAdapter revenueAdapter) { + // 1. check operating company if it has the right then it is excluded from the removal + if (revenueAdapter.getCompany().hasRight(rightName)) return; + + // 2. find vertices to hex and remove those + MapHex hex = GameManager.getInstance().getMapManager().getHex("L10"); + Set<NetworkVertex> verticesToRemove = NetworkVertex.getVerticesByHex(revenueAdapter.getVertices(), hex); + revenueAdapter.getGraph().removeAllVertices(verticesToRemove); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |