You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(46) |
Dec
(57) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(51) |
Feb
(10) |
Mar
|
Apr
|
May
(14) |
Jun
|
Jul
(13) |
Aug
(30) |
Sep
(83) |
Oct
(56) |
Nov
(148) |
Dec
(107) |
| 2010 |
Jan
(260) |
Feb
(164) |
Mar
(183) |
Apr
(99) |
May
(160) |
Jun
(40) |
Jul
(33) |
Aug
(48) |
Sep
(22) |
Oct
(24) |
Nov
(1) |
Dec
(12) |
| 2011 |
Jan
(6) |
Feb
(15) |
Mar
(13) |
Apr
(37) |
May
(27) |
Jun
(29) |
Jul
(33) |
Aug
(20) |
Sep
(17) |
Oct
(20) |
Nov
(33) |
Dec
(17) |
| 2012 |
Jan
(39) |
Feb
(38) |
Mar
(20) |
Apr
(21) |
May
(17) |
Jun
(22) |
Jul
(16) |
Aug
(3) |
Sep
(9) |
Oct
(10) |
Nov
|
Dec
|
|
From: <ev...@us...> - 2011-05-11 20:29:38
|
Revision: 1557
http://rails.svn.sourceforge.net/rails/?rev=1557&view=rev
Author: evos
Date: 2011-05-11 20:29:31 +0000 (Wed, 11 May 2011)
Log Message:
-----------
Created ferry tiles -4007...-4009 with blue background.
-4007 included in 18Scan map (the other two tiles exist in 18GL).
Fixed two more 18Scan map issues.
Modified Paths:
--------------
trunk/18xx/data/18Scan/Map.xml
trunk/18xx/data/18Scan/TileSet.xml
trunk/18xx/data/18Scan/Tiles.xml
trunk/18xx/tiles/TileDictionary.18t
trunk/18xx/tiles/TileDictionary.xml
trunk/18xx/tiles/Tiles.xml
trunk/18xx/tiles/svg/tile-10004.svg
Added Paths:
-----------
trunk/18xx/tiles/svg/tile-4007.svg
trunk/18xx/tiles/svg/tile-4008.svg
trunk/18xx/tiles/svg/tile-4009.svg
Modified: trunk/18xx/data/18Scan/Map.xml
===================================================================
--- trunk/18xx/data/18Scan/Map.xml 2011-05-11 16:20:08 UTC (rev 1556)
+++ trunk/18xx/data/18Scan/Map.xml 2011-05-11 20:29:31 UTC (rev 1557)
@@ -54,10 +54,9 @@
<Hex name="G4" tile="-10" city="Malmö" cost="40"/>
<Hex name="G6" tile="0"/>
<Hex name="G8" tile="0"/>
- <Hex name="G12" tile="0"/>
+ <Hex name="G12" tile="-4007" orientation="2"/>
<Hex name="G14" tile="-10" city="Helsinki"/>
<Hex name="G16" tile="-1" city="Lahti"/>
<Hex name="H13" tile="-911" city="Tallinn" value="0,30,60" orientation="4"/>
- <Hex name="H15" tile="0" />
<Hex name="H17" tile="-911" city="Vyborg" value="30,50,80" orientation="3"/>
</Map>
Modified: trunk/18xx/data/18Scan/TileSet.xml
===================================================================
--- trunk/18xx/data/18Scan/TileSet.xml 2011-05-11 16:20:08 UTC (rev 1556)
+++ trunk/18xx/data/18Scan/TileSet.xml 2011-05-11 20:29:31 UTC (rev 1557)
@@ -12,6 +12,7 @@
<Tile id="-911"/>
<Tile id="-912"/>
<Tile id="-4002"/>
+ <Tile id="-4007"/>
<Tile id="-10004"/>
<!-- Yellow Tiles -->
Modified: trunk/18xx/data/18Scan/Tiles.xml
===================================================================
--- trunk/18xx/data/18Scan/Tiles.xml 2011-05-11 16:20:08 UTC (rev 1556)
+++ trunk/18xx/data/18Scan/Tiles.xml 2011-05-11 20:29:31 UTC (rev 1557)
@@ -21,6 +21,9 @@
<Track from="city1" gauge="normal" to="side2"/>
<Track from="city1" gauge="normal" to="side1"/>
</Tile>
+ <Tile colour="fixed" id="-4007" name="Ferry">
+ <Track from="side3" gauge="narrow" to="side4"/>
+ </Tile>
<Tile colour="yellow" id="-10004" name="Stockholm">
<Station id="city1" position="052" slots="1" type="City" value="30"/>
<Station id="city2" position="452" slots="1" type="City" value="30"/>
Modified: trunk/18xx/tiles/TileDictionary.18t
===================================================================
(Binary files differ)
Modified: trunk/18xx/tiles/TileDictionary.xml
===================================================================
--- trunk/18xx/tiles/TileDictionary.xml 2011-05-11 16:20:08 UTC (rev 1556)
+++ trunk/18xx/tiles/TileDictionary.xml 2011-05-11 20:29:31 UTC (rev 1557)
@@ -23628,6 +23628,10 @@
<shape>tsHexagon</shape>
<level>tlMapUpgradableToGreen</level>
<name>Stockholm</name>
+ <category>
+ <value>Y</value>
+ <position>tp3CornerF</position>
+ </category>
<junctions>
<junction>
<junType>jtCity</junType>
@@ -23788,4 +23792,46 @@
</connection>
</connections>
</tile>
+ <tile>
+ <ID>-4007</ID>
+ <shape>tsHexagon</shape>
+ <level>tlMapFixed</level>
+ <name>Ferry</name>
+ <junctions/>
+ <connections>
+ <connection>
+ <conType>ctSmall</conType>
+ <position1>tp4SideD</position1>
+ <position2>tp4SideE</position2>
+ </connection>
+ </connections>
+ </tile>
+ <tile>
+ <ID>-4008</ID>
+ <shape>tsHexagon</shape>
+ <level>tlMapFixed</level>
+ <name>Ferry</name>
+ <junctions/>
+ <connections>
+ <connection>
+ <conType>ctSmall</conType>
+ <position1>tp4SideD</position1>
+ <position2>tp4SideF</position2>
+ </connection>
+ </connections>
+ </tile>
+ <tile>
+ <ID>-4009</ID>
+ <shape>tsHexagon</shape>
+ <level>tlMapFixed</level>
+ <name>Ferry</name>
+ <junctions/>
+ <connections>
+ <connection>
+ <conType>ctSmall</conType>
+ <position1>tp4SideD</position1>
+ <position2>tp4SideA</position2>
+ </connection>
+ </connections>
+ </tile>
</tiles>
Modified: trunk/18xx/tiles/Tiles.xml
===================================================================
--- trunk/18xx/tiles/Tiles.xml 2011-05-11 16:20:08 UTC (rev 1556)
+++ trunk/18xx/tiles/Tiles.xml 2011-05-11 20:29:31 UTC (rev 1557)
@@ -3341,7 +3341,7 @@
<Track from="city1" gauge="normal" to="side4"/>
<Track from="city1" gauge="normal" to="side2"/>
</Tile>
- <Tile colour="green" id="-89015" name="1889 Kouchi F9">
+ <Tile colour="green" id="-89015" name="1889 Kouchi F9">
<Station id="city1" position="0" slots="2" type="City" value="30"/>
<Track from="city1" gauge="normal" to="side0"/>
<Track from="city1" gauge="normal" to="side5"/>
@@ -4173,4 +4173,13 @@
<Track from="city1" gauge="normal" to="side1"/>
<Track from="city1" gauge="normal" to="side2"/>
</Tile>
+ <Tile colour="fixed" id="-4007" name="Ferry">
+ <Track from="side3" gauge="narrow" to="side4"/>
+ </Tile>
+ <Tile colour="fixed" id="-4008" name="Ferry">
+ <Track from="side3" gauge="narrow" to="side5"/>
+ </Tile>
+ <Tile colour="fixed" id="-4009" name="Ferry">
+ <Track from="side3" gauge="narrow" to="side0"/>
+ </Tile>
</Tiles>
\ No newline at end of file
Modified: trunk/18xx/tiles/svg/tile-10004.svg
===================================================================
--- trunk/18xx/tiles/svg/tile-10004.svg 2011-05-11 16:20:08 UTC (rev 1556)
+++ trunk/18xx/tiles/svg/tile-10004.svg 2011-05-11 20:29:31 UTC (rev 1557)
@@ -1,2 +1,2 @@
<?xml version="1.0"?>
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#FFFF00" stroke="#FFFF00" stroke-width="1" stroke-linejoin="round"/><circle cx="147" cy="85" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><circle cx="147" cy="255" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><path d="M 49,85 A 98,98 0 0,0 147,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 147,255 A 98,98 0 0,0 49,255" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 49,85 A 98,98 0 0,0 147,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 147,255 A 98,98 0 0,0 49,255" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><circle cx="147" cy="85" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="294" cy="170" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="294" y="170" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">30</text><circle cx="147" cy="255" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="294" cy="170" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="294" y="170" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">30</text><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#FFFF00" stroke="#FFFF00" stroke-width="1" stroke-linejoin="round"/><circle cx="147" cy="85" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><circle cx="147" cy="255" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><path d="M 49,85 A 98,98 0 0,0 147,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 147,255 A 98,98 0 0,0 49,255" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 49,85 A 98,98 0 0,0 147,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 147,255 A 98,98 0 0,0 49,255" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><circle cx="147" cy="85" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="294" cy="170" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="294" y="170" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">30</text><circle cx="147" cy="255" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="294" cy="170" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="294" y="170" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">30</text><text x="49" y="170" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="TimpaniHeavy" font-size="51">Y</text><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
Added: trunk/18xx/tiles/svg/tile-4007.svg
===================================================================
--- trunk/18xx/tiles/svg/tile-4007.svg (rev 0)
+++ trunk/18xx/tiles/svg/tile-4007.svg 2011-05-11 20:29:31 UTC (rev 1557)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
+<path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#60A0FF" stroke="#6060FF" stroke-width="1" stroke-linejoin="round"/>
+<path d="M 196,340 A 98,98 0 0,0 49,255" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/>
+<path d="M 196,340 A 98,98 0 0,0 49,255" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/>
+<path d="M 196,340 A 98,98 0 0,0 49,255" fill="none" stroke="#FFFFFF" stroke-width="18" stroke-linecap="butt" stroke-linejoin="round" stroke-dasharray="26"/>
+<path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
Added: trunk/18xx/tiles/svg/tile-4008.svg
===================================================================
--- trunk/18xx/tiles/svg/tile-4008.svg (rev 0)
+++ trunk/18xx/tiles/svg/tile-4008.svg 2011-05-11 20:29:31 UTC (rev 1557)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
+<path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#60A0FF" stroke="#60A0FF" stroke-width="1" stroke-linejoin="round"/><path d="M 196,340 A 294,294 0 0,0 49,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,340 A 294,294 0 0,0 49,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,340 A 294,294 0 0,0 49,85" fill="none" stroke="#FFFFFF" stroke-width="18" stroke-linecap="butt" stroke-linejoin="round" stroke-dasharray="26"/><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
Added: trunk/18xx/tiles/svg/tile-4009.svg
===================================================================
--- trunk/18xx/tiles/svg/tile-4009.svg (rev 0)
+++ trunk/18xx/tiles/svg/tile-4009.svg 2011-05-11 20:29:31 UTC (rev 1557)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg">
+<path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#60A0FF" stroke="#60A0FF" stroke-width="1" stroke-linejoin="round"/><path d="M 196,340 L 196,0" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,340 L 196,0" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,340 L 196,0" fill="none" stroke="#FFFFFF" stroke-width="18" stroke-linecap="butt" stroke-linejoin="round" stroke-dasharray="26"/><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-11 16:20:14
|
Revision: 1556
http://rails.svn.sourceforge.net/rails/?rev=1556&view=rev
Author: evos
Date: 2011-05-11 16:20:08 +0000 (Wed, 11 May 2011)
Log Message:
-----------
Added 1830 Wabash variant
Modified Paths:
--------------
trunk/18xx/data/1830/CompanyManager.xml
trunk/18xx/data/1830/Game.xml
trunk/18xx/data/1830/Map.xml
trunk/18xx/data/1830/TileSet.xml
trunk/18xx/data/1830/Tiles.xml
trunk/18xx/data/GamesList.xml
trunk/18xx/rails/game/MapHex.java
trunk/18xx/rails/game/MapManager.java
trunk/18xx/rails/game/StartRound.java
Modified: trunk/18xx/data/1830/CompanyManager.xml
===================================================================
--- trunk/18xx/data/1830/CompanyManager.xml 2011-05-10 10:25:59 UTC (rev 1555)
+++ trunk/18xx/data/1830/CompanyManager.xml 2011-05-11 16:20:08 UTC (rev 1556)
@@ -82,7 +82,7 @@
</Company>
<Company name="C&O" type="Public" tokens="3" fgColour="000000" bgColour="A0E0FF"
longname="Chesapeake & Ohio">
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash">
<Home hex="F6"/>
</IfOption>
<IfOption name="Variant" value="Coalfields,Coalfields&Reading">
@@ -131,6 +131,14 @@
<Certificate shares="1" number="7"/>
</Company>
</IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Company name="WR" type="Public" tokens="2" fgColour="000000" bgColour="FFFFFF"
+ longname="Wabash Railroad">
+ <Home hex="H2"/>
+ <Certificate type="President" shares="2"/>
+ <Certificate shares="1" number="8"/>
+ </Company>
+ </IfOption>
<StartPacket roundClass="rails.game.StartRound_1830">
<Bidding initial="5" minimum="5" increment="1"/>
Modified: trunk/18xx/data/1830/Game.xml
===================================================================
--- trunk/18xx/data/1830/Game.xml 2011-05-10 10:25:59 UTC (rev 1555)
+++ trunk/18xx/data/1830/Game.xml 2011-05-11 16:20:08 UTC (rev 1556)
@@ -15,7 +15,7 @@
<!-- The options in Game.xml are not currently used.
See GamesList.xml for the real ones.
-->
- <GameOption name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading" default="Basegame" />
+ <GameOption name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading,Wabash" default="Basegame" />
<GameOption name="NoMapMode" type="toggle" default="no" />
<GameOption name="RouteAwareness" values="Highlight,Deactivate" default="Deactivate" />
<GameOption name="RevenueCalculation" values="Suggest,Deactivate" default="Deactivate" />
@@ -87,6 +87,13 @@
<Players number="5" cash="480" certLimit="15"/>
<Players number="6" cash="400" certLimit="13"/>
</IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Players number="2" cash="1200" certLimit="29"/>
+ <Players number="3" cash="800" certLimit="22"/>
+ <Players number="4" cash="600" certLimit="17"/>
+ <Players number="5" cash="480" certLimit="15"/>
+ <Players number="6" cash="400" certLimit="13"/>
+ </IfOption>
</Component>
<Component name="Bank" class="rails.game.Bank">
<IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Reading">
@@ -95,6 +102,9 @@
<IfOption name="Variant" value="Coalfields&Reading">
<Bank amount="20000"/>
</IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Bank amount="14000"/>
+ </IfOption>
<Money format="$@"/>
</Component>
<Component name="TileManager" class="rails.game.TileManager"
@@ -124,11 +134,17 @@
<IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Attributes obsoleting="yes"/>
</IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Attributes amount="7"/>
+ </IfOption>
</Train>
<Train name="3" majorStops="3" cost="180" amount="5" startPhase="3">
<IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Attributes obsoleting="yes"/>
</IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Attributes amount="6"/>
+ </IfOption>
</Train>
<Train name="4" majorStops="4" cost="300" amount="4" startPhase="4"
rustedTrain="2">
@@ -138,8 +154,15 @@
<IfOption name="Variant" value="Coalfields&Reading">
<Attributes obsoleting="yes" amount="6"/>
</IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Attributes amount="5"/>
+ </IfOption>
</Train>
- <Train name="5" majorStops="5" cost="450" amount="3" startPhase="5"/>
+ <Train name="5" majorStops="5" cost="450" amount="3" startPhase="5">
+ <IfOption name="Variant" value="Wabash">
+ <Attributes amount="4"/>
+ </IfOption>
+ </Train>
<Train name="6" majorStops="6" cost="630" startPhase="6"
rustedTrain="3" releasedTrain="D">
<IfOption name="WithOptional6Train" value="yes">
@@ -154,27 +177,35 @@
<IfOption name="Variant" value="Coalfields&Reading">
<Attributes amount="4" releasedTrain="7,D"/>
</IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Attributes amount="3"/>
+ </IfOption>
</Train>
<IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Train name="7" majorStops="7" cost="710" amount="2"/>
</IfOption>
- <Train name="D" majorStops="99" startPhase="D" rustedTrain="4">
- <IfOption name="Variant" value="Basegame,Pere Marquette">
- <Attributes cost="1100"/>
+ <IfOption name="Variant" value="Wabash">
+ <Train name="7" majorStops="7" cost="830" amount="-1"/>
+ </IfOption>
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading">
+ <Train name="D" majorStops="99" startPhase="D" rustedTrain="4">
+ <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <Attributes cost="1100"/>
+ <Exchange cost="800"/>
+ </IfOption>
+ <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
+ <Attributes cost="900"/>
+ <Exchange cost="750"/>
+ </IfOption>
+ <IfOption name="UnlimitedTopTrains" value="yes">
+ <Attributes amount="-1"/>
+ </IfOption>
+ <IfOption name="UnlimitedTopTrains" value="no">
+ <Attributes amount="6"/>
+ </IfOption>
<Exchange cost="800"/>
- </IfOption>
- <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
- <Attributes cost="900"/>
- <Exchange cost="750"/>
- </IfOption>
- <IfOption name="UnlimitedTopTrains" value="yes">
- <Attributes amount="-1"/>
- </IfOption>
- <IfOption name="UnlimitedTopTrains" value="no">
- <Attributes amount="6"/>
- </IfOption>
- <Exchange cost="800"/>
- </Train>
+ </Train>
+ </IfOption>
</Component>
<Component name="PhaseManager" class="rails.game.PhaseManager">
<!-- Note: released and rusted trains are now specified per Train
Modified: trunk/18xx/data/1830/Map.xml
===================================================================
--- trunk/18xx/data/1830/Map.xml 2011-05-10 10:25:59 UTC (rev 1555)
+++ trunk/18xx/data/1830/Map.xml 2011-05-11 16:20:08 UTC (rev 1556)
@@ -30,9 +30,14 @@
<Hex name="D14" tile="-102" value="20"/>
<Hex name="D16" tile="0"/>
<Hex name="D18" tile="0"/>
- <Hex name="D20" tile="0"/>
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading">
+ <Hex name="D20" tile="0"/>
+ </IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Hex name="D20" tile="-25007" orientation="3"/>
+ </IfOption>
<Hex name="D22" tile="0" cost="120"/>
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash">
<Hex name="D24" tile="-7" orientation="2"/>
</IfOption>
<IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
@@ -55,6 +60,9 @@
<IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Hex name="F2" tile="-939" orientation="5" value="40,70" city="Chicago"/>
</IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Hex name="F2" tile="0"/>
+ </IfOption>
<Hex name="F4" tile="-10" cost="80"/>
<Hex name="F6" tile="-105" city="Cleveland"/>
<Hex name="F8" tile="0"/>
@@ -63,7 +71,7 @@
<Hex name="F14" tile="0"/>
<Hex name="F16" tile="-10" cost="120"/>
<Hex name="F18" tile="0"/>
- <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Wabash">
<Hex name="F20" tile="-2"/>
</IfOption>
<IfOption name="Variant" value="Coalfields,Coalfields&Reading">
@@ -71,6 +79,10 @@
</IfOption>
<Hex name="F22" tile="-10" cost="80"/>
<Hex name="F24" tile="-3" orientation="2"/>
+ <IfOption name="Variant" value="Wabash">
+ <Hex name="G-1" tile="-903" value="40,70" city="Chicago"/>
+ <Hex name="G1" tile="0"/>
+ </IfOption>
<Hex name="G3" tile="0"/>
<Hex name="G5" tile="0"/>
<Hex name="G7" tile="-2"/>
@@ -80,26 +92,37 @@
<Hex name="G15" tile="0" cost="120"/>
<Hex name="G17" tile="-2"/>
<Hex name="G19" tile="-21" orientation="1" cost="80" city="New York"/>
- <Hex name="H2" tile="0"/>
+ <IfOption name="Variant" value="Wabash">
+ <Hex name="H-2" tile="0"/>
+ <Hex name="H0" tile="0"/>
+ <Hex name="H2" tile="-10"/>
+ </IfOption>
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Coalfields,Coalfields&Reading">
+ <Hex name="H2" tile="0"/>
+ </IfOption>
<Hex name="H4" tile="-10"/>
<Hex name="H6" tile="0"/>
<Hex name="H8" tile="0"/>
<Hex name="H10" tile="-10"/>
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash">
<Hex name="H12" tile="-101" city="Altoona" runThrough="tokenOnly"/>
</IfOption>
<IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Hex name="H12" tile="-30003" pic="-30002" city="Altoona" runThrough="tokenOnly"/>
</IfOption>
- <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Wabash">
<Hex name="H14" tile="0"/>
</IfOption>
<IfOption name="Variant" value="Reading,Coalfields&Reading">
<Hex name="H14" tile="-30007" pic="-30006" city="Reading" runThrough="tokenOnly"/>
</IfOption>
-
<Hex name="H16" tile="-10"/>
<Hex name="H18" tile="-20" label="OO"/>
+ <IfOption name="Variant" value="Wabash">
+ <Hex name="I-3" tile="-902" orientation="5" value="30,60" city="West"/>
+ <Hex name="I-1" tile="0"/>
+ <Hex name="I1" tile="0"/>
+ </IfOption>
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Hex name="I1" tile="-901" orientation="5" value="30,60" city="Gulf"/>
</IfOption>
@@ -115,6 +138,11 @@
<Hex name="I15" tile="-11" label="B" city="Baltimore"/>
<Hex name="I17" tile="0" cost="80"/>
<Hex name="I19" tile="-3" orientation="2"/>
+ <IfOption name="Variant" value="Wabash">
+ <Hex name="J-2" tile="-902" orientation="5" value="30,60" city="West"/>
+ <Hex name="J0" tile="0"/>
+ <Hex name="J2" tile="-10" city="Cincinnati"/>
+ </IfOption>
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Hex name="J2" tile="-902" orientation="5" value="30,60" city="Gulf"/>
</IfOption>
@@ -127,7 +155,7 @@
<Hex name="J10" tile="0" cost="120"/>
<Hex name="J12" tile="0" cost="120"/>
<Hex name="J14" tile="-10" cost="80" city="Washington"/>
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash">
<Hex name="K13" tile="-902" orientation="4" value="30,40" city="Deep South"/>
<Hex name="K15" tile="-104" orientation="3"/>
</IfOption>
Modified: trunk/18xx/data/1830/TileSet.xml
===================================================================
--- trunk/18xx/data/1830/TileSet.xml 2011-05-10 10:25:59 UTC (rev 1555)
+++ trunk/18xx/data/1830/TileSet.xml 2011-05-11 16:20:08 UTC (rev 1556)
@@ -16,7 +16,7 @@
<Upgrade id="57"/>
</Tile>
<Tile id="-11"><!-- B yellow -->
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Wabash">
<Upgrade id="53"/>
</IfOption>
<IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
@@ -40,6 +40,7 @@
<Tile id="-903"/>
<Tile id="-908"/><!-- Coalfields: K1 -->
<Tile id="-939"/><!-- Coalfields: Chicago -->
+ <Tile id="-25007"/><!-- Wabash: D20-->
<Tile id="-30001"/><!-- Coalfields: N of Boston -->
<Tile id="-30003" pic="-30002"/><!-- Coalfields: Altoona -->
<Tile id="-30004"/><!-- Coalfields: Coalfields -->
@@ -82,6 +83,9 @@
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Attributes quantity="4"/>
</IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Attributes quantity="5"/>
+ </IfOption>
<IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Attributes quantity="6"/>
</IfOption>
@@ -96,7 +100,7 @@
<!-- Green tiles -->
<Tile id="14">
- <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading,Wabash">
<Attributes quantity="3"/>
</IfOption>
<IfOption name="Variant" value="Coalfields,Coalfields&Reading">
@@ -105,13 +109,15 @@
<Upgrade id="63" />
</Tile>
<Tile id="15" quantity="2">
- <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
- <Attributes quantity="2"/>
- </IfOption>
- <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading,Wabash">
<Attributes quantity="3"/>
</IfOption>
- <Upgrade id="63" />
+ <IfOption name="Variant" value="Wabash">
+ <Upgrade id="63,448"/>
+ </IfOption>
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Coalfields&Reading">
+ <Upgrade id="63" />
+ </IfOption>
</Tile>
<Tile id="16" quantity="1">
<Upgrade id="43,70" />
@@ -217,4 +223,7 @@
<IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Tile id="1717" extId="G17" quantity="1" />
</IfOption>
+ <IfOption name="Variant" value="Wabash">
+ <Tile id="448" quantity="2" />
+ </IfOption>
</TileManager>
\ No newline at end of file
Modified: trunk/18xx/data/1830/Tiles.xml
===================================================================
--- trunk/18xx/data/1830/Tiles.xml 2011-05-10 10:25:59 UTC (rev 1555)
+++ trunk/18xx/data/1830/Tiles.xml 2011-05-11 16:20:08 UTC (rev 1556)
@@ -93,6 +93,13 @@
<Track from="side3" gauge="normal" to="side2"/>
<Track from="side2" gauge="normal" to="side1"/>
</Tile>
+ <Tile colour="fixed" id="-25007" name="Bournemouth">
+ <Station id="city1" position="0" slots="1" type="City" value="20"/>
+ <Station id="city2" position="0" slots="1" type="City" value="20"/>
+ <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="-30001" name="N of Boston">
<Track from="side3" gauge="normal" to="side5"/>
<Track from="side3" gauge="normal" to="side4"/>
@@ -433,4 +440,11 @@
<Track from="city1" gauge="normal" to="side3"/>
<Track from="city1" gauge="normal" to="side4"/>
</Tile>
+ <Tile colour="brown" id="448" name="1889 dc K brown">
+ <Station id="city1" position="0" slots="2" type="City" value="40"/>
+ <Track from="city1" gauge="normal" to="side0"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ <Track from="city1" gauge="normal" to="side3"/>
+ </Tile>
</Tiles>
\ No newline at end of file
Modified: trunk/18xx/data/GamesList.xml
===================================================================
--- trunk/18xx/data/GamesList.xml 2011-05-10 10:25:59 UTC (rev 1555)
+++ trunk/18xx/data/GamesList.xml 2011-05-11 16:20:08 UTC (rev 1556)
@@ -28,7 +28,7 @@
- optionally, a default value (only affects a toggle;
in a dropdown the first item is always the default).
-->
- <Option name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading" default="Basegame" />
+ <Option name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading,Wabash" default="Basegame" />
<Option name="RouteAwareness" values="Highlight,Deactivate" default="Highlight" />
<Option name="RevenueCalculation" values="Suggest,Deactivate" default="Suggest" />
<Option name="NoMapMode" type="toggle" default="no" />
Modified: trunk/18xx/rails/game/MapHex.java
===================================================================
--- trunk/18xx/rails/game/MapHex.java 2011-05-10 10:25:59 UTC (rev 1555)
+++ trunk/18xx/rails/game/MapHex.java 2011-05-11 16:20:08 UTC (rev 1556)
@@ -205,8 +205,8 @@
if (getTileOrientation() == MapHex.EW) {
// Tiles with flat EW sides, letters go vertically.
// Most common case.
- // Tested for 1830 and 1870.
- x = (column + (letterAHasEvenNumbers() ? 1 : 0)) / 2;
+ // Tested for 1830 and 1870. OK with 1830 Wabash and 1825R2 (negative column numbers)
+ x = (column + 8 + (letterAHasEvenNumbers() ? 1 : 0)) / 2 - 4; // Divisor must be >0
y = row;
} else {
// Tiles with flat NS sides, letters go vertically.
@@ -389,6 +389,16 @@
public int getY() {
return y;
}
+
+ /** Add an X offset. Required to avoid negative coordinate values, as arise in 1830 Wabash. */
+ public void addX (int offset) {
+ x += offset;
+ }
+
+ /** Add an Y offset. Required to avoid negative coordinate values. */
+ public void addY (int offset) {
+ y += offset;
+ }
/**
* @return Returns the preprintedTileId.
Modified: trunk/18xx/rails/game/MapManager.java
===================================================================
--- trunk/18xx/rails/game/MapManager.java 2011-05-10 10:25:59 UTC (rev 1555)
+++ trunk/18xx/rails/game/MapManager.java 2011-05-11 16:20:08 UTC (rev 1556)
@@ -97,18 +97,35 @@
minRow = Math.min(minRow, hex.getRow());
maxCol = Math.max(maxCol, hex.getColumn());
maxRow = Math.max(maxRow, hex.getRow());
+ //log.debug("+++ Hex "+hex.getName()+" x="+hex.getX()+" y="+hex.getY()+" row="+hex.getRow()+" col="+hex.getColumn());
int[] tileCosts = hex.getTileCostAsArray();
for (int i=0; i<tileCosts.length; i++){
possibleTileCosts.add(tileCosts[i]);
}
}
log.debug("Possible tileCosts on map are "+possibleTileCosts);
+
+ int xOffset = 0;
+ int yOffset = 0;
+ if (minX < 0) {
+ xOffset = -minX;
+ maxX += xOffset;
+ minX = 0;
+ }
+ if (minY < 0) {
+ yOffset = -minY;
+ maxY += yOffset;
+ minY = 0;
+ }
hexes = new MapHex[1 + maxX][1 + maxY];
for (String hexName : mHexes.keySet()) {
hex = mHexes.get(hexName);
+ if (xOffset > 0) hex.addX(xOffset);
+ if (yOffset > 0) hex.addY(yOffset);
hexes[hex.getX()][hex.getY()] = hex;
+ //log.debug("--- Hex "+hex.getName()+" x="+hex.getX()+" y="+hex.getY()+" row="+hex.getRow()+" col="+hex.getColumn());
}
}
Modified: trunk/18xx/rails/game/StartRound.java
===================================================================
--- trunk/18xx/rails/game/StartRound.java 2011-05-10 10:25:59 UTC (rev 1555)
+++ trunk/18xx/rails/game/StartRound.java 2011-05-11 16:20:08 UTC (rev 1556)
@@ -150,7 +150,7 @@
return result;
}
- /** Stub to allow start packets cleanups in subclasses */
+ /** Stub to allow start packet cleanups in subclasses */
protected void startPacketChecks() {
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-10 10:26:05
|
Revision: 1555
http://rails.svn.sourceforge.net/rails/?rev=1555&view=rev
Author: evos
Date: 2011-05-10 10:25:59 +0000 (Tue, 10 May 2011)
Log Message:
-----------
Added stub startPacketChecks() to allow cleaning up in subclasses (for 1880)
Modified Paths:
--------------
trunk/18xx/rails/game/StartRound.java
Modified: trunk/18xx/rails/game/StartRound.java
===================================================================
--- trunk/18xx/rails/game/StartRound.java 2011-05-08 19:52:44 UTC (rev 1554)
+++ trunk/18xx/rails/game/StartRound.java 2011-05-10 10:25:59 UTC (rev 1555)
@@ -136,6 +136,8 @@
DisplayBuffer.add(LocalText.getText("UnexpectedAction",
action.toString()));
}
+
+ startPacketChecks();
if (startPacket.areAllSold()) {
/*
@@ -148,8 +150,11 @@
return result;
}
+ /** Stub to allow start packets cleanups in subclasses */
+ protected void startPacketChecks() {
+ return;
+ }
-
/*----- Processing player actions -----*/
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-08 19:52:50
|
Revision: 1554
http://rails.svn.sourceforge.net/rails/?rev=1554&view=rev
Author: evos
Date: 2011-05-08 19:52:44 +0000 (Sun, 08 May 2011)
Log Message:
-----------
18Scan Map fix
Modified Paths:
--------------
trunk/18xx/data/18Scan/Map.xml
Modified: trunk/18xx/data/18Scan/Map.xml
===================================================================
--- trunk/18xx/data/18Scan/Map.xml 2011-05-08 19:43:14 UTC (rev 1553)
+++ trunk/18xx/data/18Scan/Map.xml 2011-05-08 19:52:44 UTC (rev 1554)
@@ -1,62 +1,63 @@
-<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" letterOrientation="horizontal" even="A">
+<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" letterOrientation="vertical" even="A">
<!-- Hex name="" tile="" orientation="" value="" impassable="" label="" cost="" value="" port="yes/no" -->
- <Hex name="A6" tile="-912" city="Kiel" value="20,30,50" orientation="5"/>
- <Hex name="B5" tile="0"/>
- <Hex name="B7" tile="-912" city="Stettin" value="10,30,60" orientation="5"/>
- <Hex name="C6" tile="-10" city="Odense-Copenhagen" cost="40"/>
- <Hex name="D1" tile="-911" city="Newcastle" value="20,50,80"/>
- <Hex name="D3" tile="-10" city="Stavauger"/>
- <Hex name="D5" tile="-10" city="Århus" impassable="E5"/>
- <Hex name="D7" tile="-10" city="Malmö" cost="40"/>
- <Hex name="E2" tile="-10" city="Bergen" impassable="D3"/>
- <Hex name="E4" tile="-1" city="Kristiansand" impassable="D5"/>
- <Hex name="E6" tile="0" impassable="D5"/>
- <Hex name="F1" tile="0" cost="60"/>
- <Hex name="F3" tile="0" cost="60"/>
- <Hex name="F5" tile="-10" city="Göteborg" impassable="D4"/>
- <Hex name="F7" tile="0"/>
- <Hex name="G2" tile="0" cost="60"/>
- <Hex name="G4" tile="-10" city="Oslo"/>
- <Hex name="G6" tile="-1" city="Norrköping"/>
- <Hex name="H1" tile="0" cost="60"/>
- <Hex name="H3" tile="0" cost="60"/>
- <Hex name="H5" tile="0"/>
- <Hex name="H7" tile="0"/>
- <Hex name="I2" tile="0" cost="60"/>
- <Hex name="I4" tile="0"/>
- <Hex name="I6" tile="0"/>
- <Hex name="J1" tile="0" cost="60"/>
- <Hex name="J3" tile="0" cost="60"/>
- <Hex name="J5" tile="-1" city="Gävle"/>
- <Hex name="K2" tile="-10" city="Trondheim" cost="60"/>
- <Hex name="K4" tile="0"/>
- <Hex name="K6" tile="-10004" city="Stockholm" impassable="M6"/>
- <Hex name="L3" tile="-1" city="Östersund"/>
- <Hex name="L5" tile="0" impassable="N5,M6"/>
- <Hex name="L7" tile="0"/>
- <Hex name="M2" tile="0" cost="60"/>
- <Hex name="M4" tile="0" impassable="N5"/>
- <Hex name="M6" tile="-10" city="Turku"/>
- <Hex name="M8" tile="-911" city="Tallinn" value="0,30,60" orientation="4"/>
- <Hex name="N1" tile="0" cost="60"/>
- <Hex name="N3" tile="0"/>
- <Hex name="N5" tile="0"/>
- <Hex name="N7" tile="-10" city="Helsinki"/>
- <Hex name="O2" tile="0" cost="60"/>
- <Hex name="O4" tile="-10" city="Umeå" impassable="N5,P5"/>
- <Hex name="O6" tile="-10" city="Tampere"/>
- <Hex name="P1" tile="0" cost="60"/>
- <Hex name="P3" tile="0"/>
- <Hex name="P5" tile="0"/>
- <Hex name="P7" tile="-1" city="Lahti"/>
- <Hex name="Q2" tile="0" cost="60"/>
- <Hex name="Q4" tile="0" impassable="S4,P5,R5"/>
- <Hex name="Q6" tile="0" city="Tampere"/>
- <Hex name="Q8" tile="-911" city="Vyborg" value="30,50,80" orientation="3"/>
- <Hex name="R1" tile="-10" city="Narvik" cost="60"/>
- <Hex name="R3" tile="-1" city="Lulea"/>
- <Hex name="R5" tile="0"/>
- <Hex name="S2" tile="-10" city="Gällivare"/>
- <Hex name="S4" tile="-1" city="Oulu"/>
- <Hex name="T1" tile="-4002" city="Kiruna" value="10,50,10" orientation="2"/>
+ <Hex name="A4" tile="-911" city="Newcastle" value="20,50,80"/>
+ <Hex name="A6" tile="0" cost="60"/>
+ <Hex name="A8" tile="0" cost="60"/>
+ <Hex name="A10" tile="0" cost="60"/>
+ <Hex name="A14" tile="0" cost="60"/>
+ <Hex name="A16" tile="0" cost="60"/>
+ <Hex name="A18" tile="-10" city="Narvik" cost="60"/>
+ <Hex name="A20" tile="-4002" city="Kiruna" value="10,50,10" orientation="2"/>
+ <Hex name="B5" tile="-10" city="Bergen" impassable="C4"/>
+ <Hex name="B7" tile="0" cost="60"/>
+ <Hex name="B9" tile="0" cost="60"/>
+ <Hex name="B11" tile="-10" city="Trondheim" cost="60"/>
+ <Hex name="B13" tile="0" cost="60"/>
+ <Hex name="B15" tile="0" cost="60"/>
+ <Hex name="B17" tile="0" cost="60"/>
+ <Hex name="B19" tile="-10" city="Gällivare"/>
+ <Hex name="C4" tile="-10" city="Stavanger" impassable="B5"/>
+ <Hex name="C6" tile="0" cost="60"/>
+ <Hex name="C8" tile="0" cost="60"/>
+ <Hex name="C10" tile="0" cost="60"/>
+ <Hex name="C12" tile="-1" city="Östersund"/>
+ <Hex name="C14" tile="0" cost="60"/>
+ <Hex name="C16" tile="0" cost="60"/>
+ <Hex name="C18" tile="-1" city="Lulea"/>
+ <Hex name="D5" tile="-1" city="Kristiansand" impassable="E4,E6"/>
+ <Hex name="D7" tile="-10" city="Oslo"/>
+ <Hex name="D9" tile="0"/>
+ <Hex name="D11" tile="0"/>
+ <Hex name="D13" tile="0" impassable="E14"/>
+ <Hex name="D15" tile="-10" city="Umeå" impassable="E14,E16"/>
+ <Hex name="D17" tile="0" impassable="E16,E18,D19"/>
+ <Hex name="D19" tile="-1" city="Oulu" impassable="D17"/>
+ <Hex name="E2" tile="0"/>
+ <Hex name="E4" tile="-10" city="Århus" impassable="F5,E6,D5"/>
+ <Hex name="E6" tile="-10" city="Göteborg" impassable="E4,D5"/>
+ <Hex name="E8" tile="0"/>
+ <Hex name="E10" tile="-1" city="Gävle"/>
+ <Hex name="E12" tile="0" impassable="E14,F13"/>
+ <Hex name="E14" tile="0" impassable="E12,D13,D15"/>
+ <Hex name="E16" tile="0"/>
+ <Hex name="E18" tile="0"/>
+ <Hex name="F1" tile="-912" city="Kiel" value="20,30,50" orientation="5"/>
+ <Hex name="F3" tile="-10" city="Odense-Copenhagen" cost="40"/>
+ <Hex name="F5" tile="0" impassable="E4"/>
+ <Hex name="F7" tile="-1" city="Norrköping"/>
+ <Hex name="F9" tile="0"/>
+ <Hex name="F11" tile="-10004" city="Stockholm" impassable="F13"/>
+ <Hex name="F13" tile="-10" city="Turku"/>
+ <Hex name="F15" tile="-10" city="Tampere"/>
+ <Hex name="F17" tile="0"/>
+ <Hex name="G2" tile="-912" city="Stettin" value="10,30,60" orientation="5"/>
+ <Hex name="G4" tile="-10" city="Malmö" cost="40"/>
+ <Hex name="G6" tile="0"/>
+ <Hex name="G8" tile="0"/>
+ <Hex name="G12" tile="0"/>
+ <Hex name="G14" tile="-10" city="Helsinki"/>
+ <Hex name="G16" tile="-1" city="Lahti"/>
+ <Hex name="H13" tile="-911" city="Tallinn" value="0,30,60" orientation="4"/>
+ <Hex name="H15" tile="0" />
+ <Hex name="H17" tile="-911" city="Vyborg" value="30,50,80" orientation="3"/>
</Map>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-08 19:43:21
|
Revision: 1553
http://rails.svn.sourceforge.net/rails/?rev=1553&view=rev
Author: evos
Date: 2011-05-08 19:43:14 +0000 (Sun, 08 May 2011)
Log Message:
-----------
1880 changes
Added Paths:
-----------
trunk/18xx/data/1880/CompanyManager.xml
Added: trunk/18xx/data/1880/CompanyManager.xml
===================================================================
--- trunk/18xx/data/1880/CompanyManager.xml (rev 0)
+++ trunk/18xx/data/1880/CompanyManager.xml 2011-05-08 19:43:14 UTC (rev 1553)
@@ -0,0 +1,212 @@
+<?xml version="1.0"?>
+<!-- 1880 CompanyManager.xml -->
+<CompanyManager>
+
+ <CompanyType name="Investor" class="rails.game.specific._1880.Investor_1880">
+ <ShareUnit percentage="100"/>
+ <Certificate type="President" shares="1"/>
+ <StockPrice market="no"/>
+ <BaseTokens>
+ <HomeBase lay="whenFloated"/>
+ </BaseTokens>
+ <Payout split="no"/>
+ </CompanyType>
+
+ <CompanyType name="Minor" class="rails.game.PublicCompany">
+ <ShareUnit percentage="100"/>
+ <Certificate type="President" shares="1"/>
+ <StockPrice market="no"/>
+ <BaseTokens>
+ <HomeBase lay="whenFloated"/>
+ </BaseTokens>
+ <Payout split="no"/>
+ <Trains number="1" mandatory="no"/>
+ </CompanyType>
+
+ <CompanyType name="Private" class="rails.game.PrivateCompany"/>
+
+ <CompanyType name="Major" class="rails.game.PublicCompany"
+ capitalisation="incremental">
+ <Capitalisation Type="incremental"/>
+ <TileLays>
+ <Number colour="yellow" phase="A2,B1,B2,B3,C1,C2,C3,D1,D2,D3"
+ number="2"/>
+ </TileLays>
+ <Float percentage="60"/>
+ <StockPrice par="yes"/>
+ <ShareUnit percentage="10"/>
+ <Certificate type="President" shares="2"/>
+ <Certificate shares="1" number="8"/>
+ <BaseTokens>
+ <LayCost method="sequence" cost="0,40,100"/>
+ </BaseTokens>
+ <Capitalisation type="incremental"/>
+ <Trains number="4,4,4,3,3,3,3,3,2,2,2"/>
+ <CanUseSpecialProperties/>
+ </CompanyType>
+
+ <Company name="WR" longname="Woosong Railway" type="Private" basePrice="5"
+ revenue="0">
+
+ <!--SpecialProperty condition="ifOwnedByPlayer" Phasenwechsel-Freie Lok -->
+ <ClosingConditions>
+ <Phase>4</Phase>
+ <SpecialProperties condition="ifExercised"/>
+ </ClosingConditions>
+ </Company>
+ <Company name="KR" longname="Kaiping Railway" type="Private" basePrice="10"
+ revenue="5">
+ <ClosingConditions>
+ <Phase>4</Phase>
+ </ClosingConditions>
+ </Company>
+ <Company name="YC" longname="Yanda Ferry
+ Company" type="Private"
+ basePrice="25" revenue="10">
+ <!-- SpecialProperty condition="ifOwnedByPlayer" when="revenuecalcStep" revenue="10" -->
+ </Company>
+ <Company name="TL" longname="Taiwan Western Line" type="Private" basePrice="45"
+ revenue="15">
+ <!-- SpecialProperty condition="ifOwnedByPlayer" when="revenuecalcStep" revenue="20" -->
+ </Company>
+ <Company name="CC" longname="Chinese Rivers Ferry
+ Company" type="Private"
+ basePrice="70" revenue="20">
+ <SpecialProperty condition="ifOwnedByPlayer" when="tileLayingStep"
+ class="rails.game.special.SpecialTileLay">
+ <SpecialTileLay location="M15" extra="no" free="yes"/>
+ </SpecialProperty>
+ </Company>
+ <Company name="JO" longname="Jeme Tien Yow Engineer Office" type="Private"
+ basePrice="70" revenue="20">
+ <SpecialProperty condition="ifOwnedByPlayer" when="tileLayingStep"
+ class="rails.game.specific._1880.BuildingPermit">
+ </SpecialProperty>
+ </Company>
+ <Company name="IG" longname="Imperial Qing Government" type="Private"
+ basePrice="160">
+ <Info key="ComesWithPresidency" parm="BCR,20"/>
+ </Company>
+ <Company name="RC" longname="Rocket Company" type="Private" basePrice="70"
+ revenue="0">
+ <SpecialProperty condition="ifOwnedByPlayer" when="trainBuyingStep"
+ class="rails.game.special.SpecialTrainBuy"/>
+ <!-- Kostenfreie Lok bei Phasenwechsel durch Lokkauf -->
+ <!-- Can exchange Certificate for actual train in one phase 2,2+3,3,3+3,4
+ as soon as train has been bought -->
+ <!-- The train can be moved upon purchase into one company owned by the
+ owner of the certificate --> <!-- Company must have space for the new train, but can hand back an older
+ train to bank (2+2,3,3+3) -->
+ <ClosingConditions>
+ <Phase>5</Phase>
+ <SpecialProperties condition="ifExercised"/>
+ </ClosingConditions>
+ </Company>
+ <Company name="BCR" longname="Baocheng Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="0000FF">
+ <Home hex="M3"/>
+ </Company>
+ <Company name="JHA" longname="Jingha Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="F8" city="1"/>
+ </Company>
+ <Company name="JHU" longname="Jinghu
+ Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="F8" city="2"/>
+ </Company>
+ <Company name="JGG" longname="Jingguang Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="F8" city="3"/>
+ </Company>
+ <Company name="JLR" longname="Jinglan Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="F8" city="4"/>
+ </Company>
+ <Company name="BZU" longname="Binzhou
+ Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="B8"/>
+ </Company>
+ <Company name="LHR" longname="Longhai Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="J2"/>
+ </Company>
+ <Company name="SCR" longname="Schichang Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="N12"/>
+ </Company>
+ <Company name="CKR" longname="Chengkun Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="O5"/>
+ </Company>
+ <Company name="NXR" longname="Ningxi
+ Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="J6"/>
+ </Company>
+ <Company name="HKR" longname="Hukun Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="K15"/>
+ </Company>
+ <Company name="NJR" longname="Najiang Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="K13"/>
+ </Company>
+ <Company name="QSR" longname="Qinshen
+ Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="D12"/>
+ </Company>
+ <Company name="WNR" longname="Wunan Railway" type="Major" tokens="3"
+ fgColour="FFFFFF" bgColour="FF0000">
+ <Home hex="L10"/>
+ </Company>
+ <Company name="1" longname="Chinese Eastern Railway" type="Minor" price="0"
+ tokens="1">
+ <Home hex="A3" city="1"/>
+ </Company>
+ <Company name="2" longname="South Manchuria Railway" type="Minor" price="0"
+ tokens="1">
+ <Home hex="E13" city="1"/>
+ </Company>>
+ <Company name="3" longname="Zeng Tai Railway" type="Minor" price="0" tokens="1">
+ <Home hex="H6" city="1"/>
+ </Company>
+ <Company name="4" longname="Schantung-Eisenbahngesellschaft" type="Minor"
+ price="0" tokens="1">
+ <Home hex="H14" city="1"/>
+ </Company>
+ <Company name="5" longname="Kowloon-Canton Railway" type="Minor" price="0"
+ tokens="1">
+ <Home hex="Q15" city="1"/>
+ </Company>
+ <Company name="6" longname="Macau Hafen" type="Minor" price="0" tokens="1">
+ <Home hex="P12" city="1"/>
+ </Company>
+ <Company name="7" longname="Kunming-Hekou Railway" type="Minor" price="0"
+ tokens="1">
+ <Home hex="Q7" city="1"/>
+ </Company>
+
+ <StartPacket roundClass="rails.game.specific._1880.StartRound_1880">
+ <Bidding initial="0" minimum="0" increment="5"/>
+ <Item name="WR" type="Private" basePrice="5"/>
+ <Item name="KR" type="Private" basePrice="10"/>
+ <Item name="YC" type="Private" basePrice="25"/>
+ <Item name="TL" type="Private" basePrice="45"/>
+ <Item name="CC" type="Private" basePrice="70"/>
+ <Item name="JO" type="Private" basePrice="100"/>
+ <Item name="IG" type="Private" basePrice="160">
+ <SubItem name="BCR" type="Major" president="yes"/>
+ </Item>
+ <Item name="RC" type="Private" basePrice="50"/>
+ <Item name="1" type="Minor" basePrice="0"/>
+ <Item name="2" type="Minor" basePrice="0"/>
+ <Item name="3" type="Minor" basePrice="0"/>
+ <Item name="4" type="Minor" basePrice="0"/>
+ <Item name="5" type="Minor" basePrice="0"/>
+ <Item name="6" type="Minor" basePrice="0"/>
+ <Item name="7" type="Minor" basePrice="0"/>
+ </StartPacket>
+ </CompanyManager>
\ No newline at end of file
Property changes on: trunk/18xx/data/1880/CompanyManager.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-08 19:40:19
|
Revision: 1552
http://rails.svn.sourceforge.net/rails/?rev=1552&view=rev
Author: evos
Date: 2011-05-08 19:40:13 +0000 (Sun, 08 May 2011)
Log Message:
-----------
Removed Paths:
-------------
trunk/18xx/data/1880/CompanyManager.xml
Deleted: trunk/18xx/data/1880/CompanyManager.xml
===================================================================
--- trunk/18xx/data/1880/CompanyManager.xml 2011-05-08 19:08:40 UTC (rev 1551)
+++ trunk/18xx/data/1880/CompanyManager.xml 2011-05-08 19:40:13 UTC (rev 1552)
@@ -1,204 +0,0 @@
-<?xml version="1.0"?>
-<!-- 1880 CompanyManager.xml -->
-<CompanyManager>
-
- <CompanyType name="Investor" class="rails.game.specific._1880.Investor_1880">
- <ShareUnit percentage="100" />
- <Certificate type="President" shares="1" />
- <StockPrice market="no" />
- <BaseTokens>
- <HomeBase lay="whenFloated" />
- </BaseTokens>
- <Payout split="no" />
- </CompanyType>
-
-<CompanyType name="Minor" class="rails.game.PublicCompany">
- <ShareUnit percentage="100"/>
- <Certificate type="President" shares="1"/>
- <StockPrice market="no"/>
- <BaseTokens>
- <HomeBase lay="whenFloated"/>
- </BaseTokens>
- <Payout split="no"/>
- <Trains number="1" mandatory="no"/>
- </CompanyType>
-
- <CompanyType name="Private" class="rails.game.PrivateCompany" />
-
-
- <CompanyType name="Major" class="rails.game.PublicCompany" capitalisation="incremental" >
- <Capitalisation Type="incremental" />
- <TileLays>
- <Number colour="yellow" phase="A2,B1,B2,B3,C1,C2,C3,D1,D2,D3" number="2" />
- </TileLays>
- <Float percentage="60" />
- <StockPrice par="yes" />
- <ShareUnit percentage="10" />
- <Certificate type="President" shares="2" />
- <Certificate shares="1" number="8" />
- <BaseTokens>
- <LayCost method="sequence" cost="0,40,100" />
- </BaseTokens>
- <Capitalisation type="incremental" />
- <Trains number="4,4,4,3,3,3,3,3,2,2,2" />
- <CanUseSpecialProperties />
- </CompanyType>
-
- <Company name="WR" longname="Woosong Railway" type="Private"
- basePrice="5" revenue="0">
- <!--SpecialProperty condition="ifOwnedByPlayer" Phasenwechsel-Freie Lok -->
- <ClosingConditions>
- <Phase>4</Phase>
- <SpecialProperties condition="ifExercised" />
- </ClosingConditions>
- </Company>
- <Company name="KR" longname="Kaiping Railway" type="Private"
- basePrice="10" revenue="5">
- <ClosingConditions>
- <Phase>4</Phase>
- </ClosingConditions>
- </Company>
- <Company name="YC" longname="Yanda Ferry
- Company" type="Private"
- basePrice="25" revenue="10"> <!-- SpecialProperty condition="ifOwnedByPlayer" when="revenuecalcStep" revenue="10" -->
- </Company>
- <Company name="TL" longname="Taiwan Western Line" type="Private"
- basePrice="45" revenue="15"> <!-- SpecialProperty condition="ifOwnedByPlayer" when="revenuecalcStep" revenue="20" -->
- </Company>
- <Company name="CC" longname="Chinese Rivers Ferry
- Company"
- type="Private" basePrice="70" revenue="20">
- <SpecialProperty condition="ifOwnedByPlayer"
- when="tileLayingStep" class="rails.game.special.SpecialTileLay">
- <SpecialTileLay location="M15" extra="no" free="yes" />
- </SpecialProperty>
- </Company>
- <Company name="JO" longname="Jeme Tien Yow Engineer Office"
- type="Private" basePrice="70" revenue="20">
- <SpecialProperty condition="ifOwnedByPlayer" when="tileLayingStep"
- class="rails.game.specific._1880.BuildingPermit">
- </SpecialProperty>
- </Company>
- <Company name="IG" longname="Imperial Qing Government" type="Private"
- basePrice="160">
- <Info key="ComesWithPresidency" parm="BCR,20" />
- </Company>
- <Company name="RC" longname="Rocket Company" type="Private"
- basePrice="70" revenue="0">
- <SpecialProperty condition="ifOwnedByPlayer" when="trainBuyingStep" class="rails.game.special.SpecialTrainBuy" />
- <!-- Kostenfreie Lok bei Phasenwechsel durch Lokkauf -->
- <!-- Can exchange Certificate for actual train in one phase 2,2+3,3,3+3,4
- as soon as train has been bought -->
- <!-- The train can be moved upon purchase into one company owned by the
- owner of the certificate --> <!-- Company must have space for the new train, but can hand back an older
- train to bank (2+2,3,3+3) -->
- <ClosingConditions>
- <Phase>5</Phase>
- <SpecialProperties condition="ifExercised" />
- </ClosingConditions>
- </Company>
- <Company name="BCR" longname="Baocheng Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="0000FF">
- <Home hex="M3" />
- </Company>
- <Company name="JHA" longname="Jingha Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="F8" city="1"/>
- </Company>
- <Company name="JHU" longname="Jinghu
- Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="F8" city="2"/>
- </Company>
- <Company name="JGG" longname="Jingguang Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="F8" city="3"/>
- </Company>
- <Company name="JLR" longname="Jinglan Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="F8" city="4"/>
- </Company>
- <Company name="BZU" longname="Binzhou
- Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="B8" />
- </Company>
- <Company name="LHR" longname="Longhai Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="J2" />
- </Company>
- <Company name="SCR" longname="Schichang Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="N12" />
- </Company>
- <Company name="CKR" longname="Chengkun Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="O5" />
- </Company>
- <Company name="NXR" longname="Ningxi
- Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="J6" />
- </Company>
- <Company name="HKR" longname="Hukun Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="K15" />
- </Company>
- <Company name="NJR" longname="Najiang Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="K13" />
- </Company>
- <Company name="QSR" longname="Qinshen
- Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="D12" />
- </Company>
- <Company name="WNR" longname="Wunan Railway" type="Major"
- tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="L10" />
- </Company>
- <Company name="1" longname="Chinese Eastern Railway" type="Minor" price="0" tokens="1" >
- <Home hex="A3" city="1" />
- </Company>
- <Company name="2" longname="South Manchuria Railway" type="Minor" price="0" tokens="1" >
- <Home hex="E13" city="1" />
- </Company>>
- <Company name="3" longname="Zeng Tai Railway" type="Minor" price="0" tokens="1" >
- <Home hex="H6" city="1" />
- </Company>
- <Company name="4" longname="Schantung-Eisenbahngesellschaft"
- type="Minor" price="0" tokens="1" >
- <Home hex="H14" city="1" />
- </Company>
- <Company name="5" longname="Kowloon-Canton Railway" type="Minor" price="0" tokens="1" >
- <Home hex="Q15" city="1" />
- </Company>
- <Company name="6" longname="Macau Hafen" type="Minor" price="0" tokens="1" >
- <Home hex="P12" city="1" />
- </Company>
- <Company name="7" longname="Kunming-Hekou Railway" type="Minor" price="0" tokens="1" >
- <Home hex="Q7" city="1" />
- </Company>
-
- <StartPacket roundClass="rails.game.specific._1880.StartRound_1880">
- <Bidding initial="0" minimum="0" increment="5" />
- <Item name="WR" type="Private" basePrice="5"/>
- <Item name="KR" type="Private" basePrice="10"/>
- <Item name="YC" type="Private" basePrice="25"/>
- <Item name="TL" type="Private" basePrice="45"/>
- <Item name="CC" type="Private" basePrice="70"/>
- <Item name="JO" type="Private" basePrice="100"/>
- <Item name="IG" type="Private" basePrice="160">
- <SubItem name="BCR" type="Major" president="yes"/>
- </Item>
- <Item name="RC" type="Private" basePrice="50"/>
- <Item name="1" type="Minor" basePrice="0"/>
- <Item name="2" type="Minor" basePrice="0"/>
- <Item name="3" type="Minor" basePrice="0"/>
- <Item name="4" type="Minor" basePrice="0"/>
- <Item name="5" type="Minor" basePrice="0"/>
- <Item name="6" type="Minor" basePrice="0"/>
- <Item name="7" type="Minor" basePrice="0"/>
- </StartPacket>
-
-</CompanyManager>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-08 19:08:51
|
Revision: 1551
http://rails.svn.sourceforge.net/rails/?rev=1551&view=rev
Author: evos
Date: 2011-05-08 19:08:40 +0000 (Sun, 08 May 2011)
Log Message:
-----------
1880 changes
Modified Paths:
--------------
trunk/18xx/data/1880/CompanyManager.xml
trunk/18xx/data/1880/Game.xml
trunk/18xx/data/1880/StockMarket.xml
trunk/18xx/rails/game/GameManager.java
trunk/18xx/rails/game/GameManagerI.java
trunk/18xx/rails/game/Player.java
Added Paths:
-----------
trunk/18xx/rails/game/specific/_1880/Investor_1880.java
trunk/18xx/rails/game/specific/_1880/StartRound_1880.java
Property Changed:
----------------
trunk/18xx/tiles/
Modified: trunk/18xx/data/1880/CompanyManager.xml
===================================================================
--- trunk/18xx/data/1880/CompanyManager.xml 2011-05-08 15:55:50 UTC (rev 1550)
+++ trunk/18xx/data/1880/CompanyManager.xml 2011-05-08 19:08:40 UTC (rev 1551)
@@ -2,7 +2,7 @@
<!-- 1880 CompanyManager.xml -->
<CompanyManager>
- <CompanyType name="Investor" class="rails.game.PublicCompany">
+ <CompanyType name="Investor" class="rails.game.specific._1880.Investor_1880">
<ShareUnit percentage="100" />
<Certificate type="President" shares="1" />
<StockPrice market="no" />
@@ -12,13 +12,24 @@
<Payout split="no" />
</CompanyType>
+<CompanyType name="Minor" class="rails.game.PublicCompany">
+ <ShareUnit percentage="100"/>
+ <Certificate type="President" shares="1"/>
+ <StockPrice market="no"/>
+ <BaseTokens>
+ <HomeBase lay="whenFloated"/>
+ </BaseTokens>
+ <Payout split="no"/>
+ <Trains number="1" mandatory="no"/>
+ </CompanyType>
+
<CompanyType name="Private" class="rails.game.PrivateCompany" />
<CompanyType name="Major" class="rails.game.PublicCompany" capitalisation="incremental" >
<Capitalisation Type="incremental" />
<TileLays>
- <Number colour="yellow" phase="2,3,4,5,6,7,8" number="2" />
+ <Number colour="yellow" phase="A2,B1,B2,B3,C1,C2,C3,D1,D2,D3" number="2" />
</TileLays>
<Float percentage="60" />
<StockPrice par="yes" />
@@ -29,32 +40,10 @@
<LayCost method="sequence" cost="0,40,100" />
</BaseTokens>
<Capitalisation type="incremental" />
- <Trains number="4,4,3,3,3,3,2,2" />
+ <Trains number="4,4,4,3,3,3,3,3,2,2,2" />
<CanUseSpecialProperties />
</CompanyType>
- <Company Name="A1" longname="Chinese Eastern Railway" type="Investor" tokens="1" >
- <Home hex="A3" city="1" />
- </Company>
- <Company Name="A2" longname="South Manchuria Railway" type="Investor" tokens="1" >
- <Home hex="E13" city="1" />
- </Company>>
- <Company Name="A3" longname="Zeng Tai Railway" type="Investor" tokens="1" >
- <Home hex="H6" city="1" />
- </Company>
- <Company Name="A4" longname="Schantung-Eisenbahngesellschaft"
- type="Investor" tokens="1" >
- <Home hex="H14" city="1" />
- </Company>
- <Company Name="A5" longname="Kowloon-Canton Railway" type="Investor" tokens="1" >
- <Home hex="Q15" city="1" />
- </Company>
- <Company Name="A6" longname="Macau Hafen" type="Investor" tokens="1" >
- <Home hex="P12" city="1" />
- </Company>
- <Company Name="A7" longname="Kunming-Hekou Railway" type="Investor" tokens="1" >
- <Home hex="Q7" city="1" />
- </Company>
<Company name="WR" longname="Woosong Railway" type="Private"
basePrice="5" revenue="0">
<!--SpecialProperty condition="ifOwnedByPlayer" Phasenwechsel-Freie Lok -->
@@ -114,20 +103,20 @@
</Company>
<Company name="JHA" longname="Jingha Railway" type="Major"
tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="F8" />
+ <Home hex="F8" city="1"/>
</Company>
<Company name="JHU" longname="Jinghu
Railway" type="Major"
tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="F8" />
+ <Home hex="F8" city="2"/>
</Company>
<Company name="JGG" longname="Jingguang Railway" type="Major"
tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="F8" />
+ <Home hex="F8" city="3"/>
</Company>
<Company name="JLR" longname="Jinglan Railway" type="Major"
tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="F8" />
+ <Home hex="F8" city="4"/>
</Company>
<Company name="BZU" longname="Binzhou
Railway" type="Major"
@@ -153,32 +142,63 @@
</Company>
<Company name="HKR" longname="Hukun Railway" type="Major"
tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="K14" />
+ <Home hex="K15" />
</Company>
<Company name="NJR" longname="Najiang Railway" type="Major"
tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="K12" />
+ <Home hex="K13" />
</Company>
<Company name="QSR" longname="Qinshen
Railway" type="Major"
tokens="3" fgColour="FFFFFF" bgColour="FF0000">
- <Home hex="D13" />
+ <Home hex="D12" />
</Company>
<Company name="WNR" longname="Wunan Railway" type="Major"
tokens="3" fgColour="FFFFFF" bgColour="FF0000">
<Home hex="L10" />
</Company>
- <StartPacket roundClass="rails.game.StartRound_1880">
- <Bidding initial="5" minimum="5" increment="5" />
- <Item name="WR" type="Private" />
- <Item name="KR" type="Private" />
- <Item name="YC" type="Private" />
- <Item name="TL" type="Private" />
- <Item name="CC" type="Public" />
- <Item name="JO" type="Private" />
- <Item name="IG" type="Private">
- <SubItem name="BCR" type="Public" />
- <Item name="RC" type="Private" />
+ <Company name="1" longname="Chinese Eastern Railway" type="Minor" price="0" tokens="1" >
+ <Home hex="A3" city="1" />
+ </Company>
+ <Company name="2" longname="South Manchuria Railway" type="Minor" price="0" tokens="1" >
+ <Home hex="E13" city="1" />
+ </Company>>
+ <Company name="3" longname="Zeng Tai Railway" type="Minor" price="0" tokens="1" >
+ <Home hex="H6" city="1" />
+ </Company>
+ <Company name="4" longname="Schantung-Eisenbahngesellschaft"
+ type="Minor" price="0" tokens="1" >
+ <Home hex="H14" city="1" />
+ </Company>
+ <Company name="5" longname="Kowloon-Canton Railway" type="Minor" price="0" tokens="1" >
+ <Home hex="Q15" city="1" />
+ </Company>
+ <Company name="6" longname="Macau Hafen" type="Minor" price="0" tokens="1" >
+ <Home hex="P12" city="1" />
+ </Company>
+ <Company name="7" longname="Kunming-Hekou Railway" type="Minor" price="0" tokens="1" >
+ <Home hex="Q7" city="1" />
+ </Company>
+
+ <StartPacket roundClass="rails.game.specific._1880.StartRound_1880">
+ <Bidding initial="0" minimum="0" increment="5" />
+ <Item name="WR" type="Private" basePrice="5"/>
+ <Item name="KR" type="Private" basePrice="10"/>
+ <Item name="YC" type="Private" basePrice="25"/>
+ <Item name="TL" type="Private" basePrice="45"/>
+ <Item name="CC" type="Private" basePrice="70"/>
+ <Item name="JO" type="Private" basePrice="100"/>
+ <Item name="IG" type="Private" basePrice="160">
+ <SubItem name="BCR" type="Major" president="yes"/>
</Item>
+ <Item name="RC" type="Private" basePrice="50"/>
+ <Item name="1" type="Minor" basePrice="0"/>
+ <Item name="2" type="Minor" basePrice="0"/>
+ <Item name="3" type="Minor" basePrice="0"/>
+ <Item name="4" type="Minor" basePrice="0"/>
+ <Item name="5" type="Minor" basePrice="0"/>
+ <Item name="6" type="Minor" basePrice="0"/>
+ <Item name="7" type="Minor" basePrice="0"/>
</StartPacket>
+
</CompanyManager>
\ No newline at end of file
Modified: trunk/18xx/data/1880/Game.xml
===================================================================
--- trunk/18xx/data/1880/Game.xml 2011-05-08 15:55:50 UTC (rev 1550)
+++ trunk/18xx/data/1880/Game.xml 2011-05-08 19:08:40 UTC (rev 1551)
@@ -55,46 +55,61 @@
<Train name="10" majorStops="10" cost="1000" amount="-1"/>
</Component>
<Component name="PhaseManager" class="rails.game.PhaseManager">
- <Phase name="1">
+ <Phase name="A1">
<Tiles colour="yellow"/>
<OperatingRounds number="-1"/>
<Float percentage="20"/>
<Trains tradingAllowed="yes"/>
<Stocks avail="5"/>
</Phase>
- <Phase name="2">
+ <Phase name="A2">
+ <Tiles colour="yellow"/>
+
+ </Phase>
+ <Phase name="B1">
<Tiles colour="yellow,green"/>
- <OffBoardRevenue step="2"/>
<Float percentage="30"/>
<Stocks avail="10"/>
+ <OffBoardRevenue step="2"/>
</Phase>
- <Phase name="3">
+ <Phase name="B2">
<Tiles colour="yellow,green"/>
-
+ <OffBoardRevenue step="2"/>
</Phase>
- <Phase name="4">
+ <Phase name="B3">
<Tiles colour="yellow,green"/>
+ <OffBoardRevenue step="2"/>
<Privates close="yes"/>
<Investors active="no"/>
<Communists active="yes"/>
<Float percentage="40"/>
</Phase>
- <Phase name="5">
+ <Phase name="C1">
<Tiles colour="yellow,green,brown"/>
<OffBoardRevenue step="3"/>
</Phase>
- <Phase name="6">
+ <Phase name="C2">
<Tiles colour="yellow,green,brown"/>
+ <Comunists active="no"/>
<Float percentage="60"/>
- <Comunists active="no"/>
+ <OffBoardRevenue step="3"/>
</Phase>
- <Phase name="7">
+ <Phase name="C3">
<Tiles colour="yellow,green,brown"/>
+ <OffBoardRevenue step="3"/>
</Phase>
- <Phase name="8">
+ <Phase name="D1">
<Tiles colour="yellow,green,brown,grey"/>
<OffBoardRevenue step="4"/>
</Phase>
+ <Phase name="D2">
+ <Tiles colour="yellow,green,brown,grey"/>
+ <OffBoardRevenue step="4"/>
+ </Phase>
+ <Phase name="D3">
+ <Tiles colour="yellow,green,brown,grey"/>
+ <OffBoardRevenue step="4"/>
+ </Phase>
<Component name="RevenueManager" class="rails.algorithms.RevenueManager">
<Modifier class="rails.game.specific._1880.OffBoardRevenueModifier" />
<Modifier class="rails.game.specific._1880.ExpressTrainRevenueModifier" />
Modified: trunk/18xx/data/1880/StockMarket.xml
===================================================================
--- trunk/18xx/data/1880/StockMarket.xml 2011-05-08 15:55:50 UTC (rev 1550)
+++ trunk/18xx/data/1880/StockMarket.xml 2011-05-08 19:08:40 UTC (rev 1551)
@@ -31,19 +31,19 @@
<StockSpace name="C9" price="60" />
<StockSpace name="D1" price="105" />
<StockSpace name="D2" price="100" >
- <Startspace />
+ <StartSpace />
</StockSpace>
<StockSpace name="D3" price="95" />
<StockSpace name="D4" price="90" >
- <Startspace />
+ <StartSpace />
</StockSpace>
<StockSpace name="D5" price="85" />
<StockSpace name="D6" price="80" >
- <Startspace />
+ <StartSpace />
</StockSpace>
<StockSpace name="D7" price="75" />
<StockSpace name="D8" price="70" >
- <Startspace />
+ <StartSpace />
</StockSpace>
<StockSpace name="D9" price="65" />
<StockSpace name="E1" price="110" />
Modified: trunk/18xx/rails/game/GameManager.java
===================================================================
--- trunk/18xx/rails/game/GameManager.java 2011-05-08 15:55:50 UTC (rev 1550)
+++ trunk/18xx/rails/game/GameManager.java 2011-05-08 19:08:40 UTC (rev 1551)
@@ -1896,5 +1896,31 @@
skipNextDone = true;
skippedStep = step;
}
+
+ /**
+ *
+ *@param ascending Boolean to determine if the playerlist will be sorted in ascending or descending order based on their cash
+ *@return Returns the player at index position 0 that is either the player with the most or least cash depending on sort order.
+ */
+ public Player reorderPlayersByCash (boolean ascending) {
+
+ final boolean _ascending = ascending;
+ Collections.sort (players, new Comparator<Player>() {
+ public int compare (Player p1, Player p2) {
+ return _ascending ? p1.getCash() - p2.getCash() : p2.getCash() - p1.getCash();
+ }
+ });
+
+ Player player;
+ for (int i=0; i<players.size(); i++) {
+ player = players.get(i);
+ player.setIndex (i);
+ playerNames.set (i, player.getName());
+ log.debug("New player "+i+" is "+player.getName() +" (cash="+Bank.format(player.getCash())+")");
+ }
+
+ return players.get(0);
+ }
+
}
Modified: trunk/18xx/rails/game/GameManagerI.java
===================================================================
--- trunk/18xx/rails/game/GameManagerI.java 2011-05-08 15:55:50 UTC (rev 1550)
+++ trunk/18xx/rails/game/GameManagerI.java 2011-05-08 19:08:40 UTC (rev 1551)
@@ -210,4 +210,7 @@
public boolean isReloading();
public void setReloading(boolean reloading);
public void setSkipDone (GameDef.OrStep step);
+
+ public Player reorderPlayersByCash(boolean high);
+ //public void reorderPlayersByCash(boolean high);
}
\ No newline at end of file
Modified: trunk/18xx/rails/game/Player.java
===================================================================
--- trunk/18xx/rails/game/Player.java 2011-05-08 15:55:50 UTC (rev 1550)
+++ trunk/18xx/rails/game/Player.java 2011-05-08 19:08:40 UTC (rev 1551)
@@ -200,6 +200,10 @@
return index;
}
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
public void setBankrupt () {
bankrupt.set(true);
}
Added: trunk/18xx/rails/game/specific/_1880/Investor_1880.java
===================================================================
--- trunk/18xx/rails/game/specific/_1880/Investor_1880.java (rev 0)
+++ trunk/18xx/rails/game/specific/_1880/Investor_1880.java 2011-05-08 19:08:40 UTC (rev 1551)
@@ -0,0 +1,69 @@
+/**
+ *
+ */
+package rails.game.specific._1880;
+
+import rails.game.PublicCompany;
+
+/**
+ * @author Martin 2011/04/11
+ *
+ */
+public class Investor_1880 extends PublicCompany {
+/*
+ * Investors in 1880 get chosen at start after the initial starting package is sold out. They get one share from a new company
+ * TODO: Make sure that dividends aren't accumulated on the investors
+
+*/
+ protected boolean canOwnShare=true;
+
+ protected int maxPercofShares=1;
+
+ protected boolean hasStockPrice=false;
+
+ protected boolean hasParPrice=false;
+
+ protected PublicCompany linkedCompany; // An Investor is always linked to a (exactly one) Public Major Company..
+
+ /* Investors in 1880 operate with the newest train model on lease from the bank for zero costs.
+ */
+ protected boolean canBorrowTrain=true;
+
+
+ /**
+ *
+ */
+ public Investor_1880() {
+ super();
+ }
+
+ public boolean canOwnShare(){
+ return canOwnShare;
+ }
+
+ public int maxPercofShares(){
+ return maxPercofShares;
+ }
+ public boolean hasStockPrice(){
+ return hasStockPrice;
+ }
+
+ public boolean hasParPrice(){
+ return hasParPrice;
+ }
+
+ public PublicCompany getLinkedCompany(){
+ return linkedCompany;
+ }
+
+ public boolean setLinkedCompany(PublicCompany linkedCompany){
+ if (linkedCompany != null){
+ //Check if Company is valid i.e. not Closed maybe check if theres already the President sold and just the president...
+ if(!linkedCompany.isClosed()){
+ this.linkedCompany=linkedCompany;
+ return true;}
+ }
+ return false;
+ }
+
+}
Property changes on: trunk/18xx/rails/game/specific/_1880/Investor_1880.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/18xx/rails/game/specific/_1880/StartRound_1880.java
===================================================================
--- trunk/18xx/rails/game/specific/_1880/StartRound_1880.java (rev 0)
+++ trunk/18xx/rails/game/specific/_1880/StartRound_1880.java 2011-05-08 19:08:40 UTC (rev 1551)
@@ -0,0 +1,384 @@
+/**
+ *
+ */
+package rails.game.specific._1880;
+
+import rails.game.*;
+import rails.game.action.*;
+import rails.game.state.IntegerState;
+import rails.game.state.State;
+import rails.game.state.ArrayListState;
+import rails.util.LocalText;
+
+
+
+/**
+ * @author Martin
+ *
+ */
+public class StartRound_1880 extends StartRound {
+
+ private final State startingPlayer =
+ new State("StartingPlayer", Player.class);
+
+ private final IntegerState currentBuyPrice =
+ new IntegerState("CurrentBuyPrice", 0);
+
+ private final IntegerState initialItemRound =
+ new IntegerState("InitialItemRound",0);
+
+ private final State currentItem =
+ new State("CurrentItem", StartItem.class);
+
+ private final IntegerState currentStartRoundPhase =
+ new IntegerState("CurrentStartRoundPhase",0);
+
+ private final IntegerState investorChosen =
+ new IntegerState("InvestorChosen",0);
+
+ /** A company in need for a par price. */
+ PublicCompanyI companyNeedingPrice = null;
+
+
+ /**
+ * @param gameManager
+ */
+ public StartRound_1880(GameManagerI gameManager) {
+ super(gameManager);
+ hasBasePrices=true;
+ hasBidding=true;
+
+ }
+ @Override
+ public void start() {
+ super.start();
+
+ // crude fix for StartItem hardcoded SetMinimumbid ignoring the initial value out of the XMLs....
+ for (StartItem item : startPacket.getItems()) {
+ item.setMinimumBid(item.getBasePrice());
+ }
+ startingPlayer.set(getCurrentPlayer());
+ setPossibleActions();
+
+ }
+
+ @Override
+ public boolean setPossibleActions() {
+
+ possibleActions.clear();
+
+ StartItem item = startPacket.getFirstUnsoldItem();
+
+
+ //Need Logic to check for all Type Minor/Investor Certificate
+ if ( (item.getType()!=null ) && (item.getType().equals("Private"))) {
+
+ currentBuyPrice.set(item.getMinimumBid());
+
+ if (currentPlayer == startPlayer) ReportBuffer.add("");
+
+ if (currentItem == null || currentItem.get() != item ) { // we haven't seen this item before
+ numPasses.set(0); // new round so cancel all previous passes !
+ currentItem.set(item);
+ item.setStatus(StartItem.BIDDABLE);
+ item.setStatus(StartItem.BUYABLE);
+ auctionItemState.set(item);
+ initialItemRound.set(0);
+ } else {
+ initialItemRound.add(1);
+ }
+
+
+
+ Player currentPlayer = getCurrentPlayer();
+
+ if (item.getStatus() == StartItem.NEEDS_SHARE_PRICE) { //still necessary ??
+ /* This status is set in buy() if a share price is missing */
+ setPlayer(item.getBidder());
+ possibleActions.add(new BuyStartItem(item, item.getBid(), false, true));
+ return true;
+ // No more actions
+ }
+ if ((item.getBidder() == currentPlayer) && (numPasses.intValue() == getNumberOfPlayers()-1)){ // Current Player is highest Bidder & all others have passed
+ if (item.needsPriceSetting() != null ){
+ BuyStartItem possibleAction = new BuyStartItem(item,item.getBid(), true, true);
+ possibleActions.add(possibleAction);
+ return true;
+ // No more actions// no further Actions possible
+ }else{
+ BuyStartItem possibleAction = new BuyStartItem(item,item.getBid(),true);
+ possibleActions.add(possibleAction);
+ return true;
+ // No more actions// no further Actions possible
+ }
+ }
+
+ if (currentPlayer.getCash() >= item.getMinimumBid()) {
+ //Kann bieten
+ if (item.getBid() == 0) { // erster Spieler noch keiner sonst geboten.
+ BidStartItem possibleAction =
+ new BidStartItem(item, item.getBasePrice(),
+ 0, true);
+ possibleActions.add(possibleAction); // Player can offer a bid
+ possibleActions.add(new NullAction(NullAction.PASS));
+ return true;
+ } else {
+ BidStartItem possibleAction =
+ new BidStartItem(item, item.getMinimumBid(),
+ startPacket.getModulus(), true);
+ possibleActions.add(possibleAction); // Player can offer a bid
+ possibleActions.add(new NullAction(NullAction.PASS));
+ return true;
+ }
+ } else {
+ // Can't bid: Autopass
+ numPasses.add(1);
+ return false;
+ }
+ } else { // Item is not a private ! should be a major or minor in 1880 special rules apply.
+ //Check if all players own a minor/investor already then declare Startinground over...
+ if (currentStartRoundPhase.intValue() == 0) { //first time a non Private gets called up; initialize the rest of items to BUYABLE
+ // Priority Deal goes to the player with the smallest wallet...
+ gameManager.setCurrentPlayer(gameManager.reorderPlayersByCash(true));
+ //setCurrentPlayerIndex(0); //lowest or highest Player is always at the start of the player list after reordering !
+ //Send Message that Playerorder has Changed !...
+ currentPlayer=getCurrentPlayer();
+ currentStartRoundPhase.set(1);
+ startingPlayer.set(currentPlayer);
+ gameManager.setPriorityPlayer((Player) startingPlayer.get()); // Method doesn't exist in Startround ???
+ }
+ if (investorChosen.intValue() == getNumberOfPlayers()) {
+ for ( StartItem item1 : itemsToSell) {
+ if (!item1.isSold()){
+ item1.setStatus(StartItem.UNAVAILABLE);
+ item1.setStatus(StartItem.SOLD);
+
+ }
+ }
+ finishRound();
+ return false;
+ } else {
+ for ( StartItem item1 : itemsToSell) {
+ if (!item1.isSold()){
+ item1.setStatus(StartItem.BUYABLE);
+ BuyStartItem possibleAction = new BuyStartItem(item1, 0, false);
+ possibleActions.add(possibleAction);
+ }
+ }
+ investorChosen.add(1);
+ return true;
+ }
+
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see rails.game.StartRound#bid(java.lang.String, rails.game.action.BidStartItem)
+ */
+ @Override
+ protected boolean bid(String playerName, BidStartItem bidItem) {
+ StartItem item = bidItem.getStartItem();
+ String errMsg = null;
+ Player player = getCurrentPlayer();
+ int bidAmount = bidItem.getActualBid();
+
+ while (true) {
+
+ // Check player
+ if (!playerName.equals(player.getName())) {
+ errMsg = LocalText.getText("WrongPlayer", playerName, player.getName());
+ break;
+ }
+ // Check item
+ boolean validItem = false;
+ for (StartItemAction activeItem : possibleActions.getType(StartItemAction.class)) {
+ if (bidItem.equalsAsOption(activeItem)) {
+ validItem = true;
+ break;
+ }
+
+ }
+ if (!validItem) {
+ errMsg = LocalText.getText("ActionNotAllowed",
+ bidItem.toString());
+ break;
+ }
+
+ // Is the item buyable?
+ if (bidItem.getStatus() != StartItem.BUYABLE) {
+ errMsg = LocalText.getText("NotForSale");
+ break;
+ }
+
+ // Bid must be at least 5 above last bid
+ if (bidAmount < item.getMinimumBid()) {
+ errMsg = LocalText.getText("BidTooLow", ""
+ + item.getMinimumBid());
+ break;
+ }
+
+ // Bid must be a multiple of the modulus
+ if (bidAmount % startPacket.getModulus() != 0) {
+ errMsg = LocalText.getText("BidMustBeMultipleOf",
+ bidAmount,
+ startPacket.getMinimumIncrement());
+ break;
+ }
+
+ // Has the buyer enough cash?
+ if (bidAmount > player.getCash()) {
+ errMsg = LocalText.getText("BidTooHigh", Bank.format(bidAmount));
+ break;
+ }
+
+ break;
+ }
+
+ if (errMsg != null) {
+ DisplayBuffer.add(LocalText.getText("InvalidBid",
+ playerName,
+ item.getName(),
+ errMsg ));
+ return false;
+ }
+
+ moveStack.start(false);
+
+ item.setBid(bidAmount, player);
+ ReportBuffer.add(LocalText.getText("BID_ITEM_LOG",
+ playerName,
+ Bank.format(bidAmount),
+ item.getName(),
+ Bank.format(player.getCash()) ));
+ setNextBiddingPlayer(item);
+ return true;
+
+ }
+
+ /* (non-Javadoc)
+ * @see rails.game.StartRound#pass(java.lang.String)
+ */
+ @Override
+ protected boolean pass(String playerName) {
+ String errMsg = null;
+ Player player = getCurrentPlayer();
+ StartItem auctionItem = (StartItem) auctionItemState.get();
+
+ while (true) {
+
+ // Check player
+ if (!playerName.equals(player.getName())) {
+ errMsg = LocalText.getText("WrongPlayer", playerName, player.getName());
+ break;
+ }
+ break;
+ }
+
+ if (errMsg != null) {
+ DisplayBuffer.add(LocalText.getText("InvalidPass",
+ playerName,
+ errMsg ));
+ return false;
+ }
+
+ ReportBuffer.add(LocalText.getText("PASSES", playerName));
+
+ moveStack.start(false);
+
+ numPasses.add(1);
+
+ if (numPasses.intValue() >= numPlayers) {
+ // All players have passed.
+ ReportBuffer.add(LocalText.getText("ALL_PASSED"));
+ // It the first item has not been sold yet, reduce its price by
+ // 5.
+ if (auctionItem.getIndex() < 2) {
+ auctionItem.reduceBasePriceBy(5);
+ auctionItem.setMinimumBid(auctionItem.getBasePrice());
+ ReportBuffer.add(LocalText.getText(
+ "ITEM_PRICE_REDUCED",
+ auctionItem.getName(),
+ Bank.format(startPacket.getFirstItem().getBasePrice()) ));
+ numPasses.set(0);
+ if (auctionItem.getBasePrice() == 0) {
+ assignItem((Player)startingPlayer.get(),
+ auctionItem, 0, 0);
+ setNextStartingPlayer();
+ // startPacket.getFirstItem().getName());
+ return true;
+ }
+ } else {
+ numPasses.set(0);
+ //gameManager.nextRound(this);
+ finishRound();
+
+ }
+ }
+ // if ((numPasses.intValue() >= auctionItem.getBidders() - 1) &&
+ if ((auctionItem.getBidders() >0) && (numPasses.intValue()== getNumberOfPlayers()-1)) {
+ // All but the highest bidder have passed.
+ int price = auctionItem.getBid();
+
+ log.debug("Highest bidder is "
+ + auctionItem.getBidder().getName());
+ if (auctionItem.needsPriceSetting() != null) {
+ auctionItem.setStatus(StartItem.NEEDS_SHARE_PRICE);
+ } else {
+ assignItem(auctionItem.getBidder(), auctionItem, price, 0);
+ }
+ auctionItemState.set(null);
+ numPasses.set(0);
+ setNextStartingPlayer();
+ return true;
+ } else {
+ // More than one left: find next bidder
+
+ if (auctionItem.getIndex()>1){
+ auctionItem.setBid(-1, player);
+ setNextBiddingPlayer(auctionItem,
+ getCurrentPlayerIndex());
+ }else {
+ auctionItem.setBid(-1, player);
+ setNextPlayer();
+ }
+
+
+ }
+
+
+
+ return true;
+
+
+ }
+
+ private void setNextBiddingPlayer(StartItem item, int currentIndex) {
+ for (int i = currentIndex + 1; i < currentIndex
+ + gameManager.getNumberOfPlayers(); i++) {
+ if (item.getBid(gameManager.getPlayerByIndex(i)) >=0) {
+ setCurrentPlayerIndex(i);
+ break;
+ }
+ }
+ }
+
+ private void setNextBiddingPlayer(StartItem item) {
+
+ setNextBiddingPlayer(item, getCurrentPlayerIndex());
+ }
+
+ @Override
+ public String getHelp() {
+ return "1880 Start Round help text";
+ }
+
+ private void setNextStartingPlayer(){
+ int i;
+ Player player;
+ player = (Player) startingPlayer.get();
+ i= player.getIndex();
+ startingPlayer.set(gameManager.getPlayerByIndex(i+1));
+ setCurrentPlayerIndex(i+1 % getNumberOfPlayers());
+ }
+
+}
Property changes on: trunk/18xx/rails/game/specific/_1880/StartRound_1880.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Property changes on: trunk/18xx/tiles
___________________________________________________________________
Modified: svn:ignore
- Copy of TileDictionary.18t
handmade
TDwithID
TDwoID
xml
tileimages.xml
Copy (2) of TileDictionary.18t
Copy (3) of TileDictionary.18t
Rails18xx.ini
UserGridStyle.ini
UserTileStyle.ini
*.exe
o
TDindex.pl
TDindex.txt
TileDictionary - kopie.xml
TileDictionary - kopie.18t
+ Copy of TileDictionary.18t
handmade
TDwithID
TDwoID
xml
tileimages.xml
Copy (2) of TileDictionary.18t
Copy (3) of TileDictionary.18t
Rails18xx.ini
UserGridStyle.ini
UserTileStyle.ini
*.exe
o
TDindex.pl
TDindex.txt
TileDictionary - kopie.xml
TileDictionary - kopie.18t
fix.bat
tilexml.bat
tileset.bat
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-08 15:55:56
|
Revision: 1550
http://rails.svn.sourceforge.net/rails/?rev=1550&view=rev
Author: evos
Date: 2011-05-08 15:55:50 +0000 (Sun, 08 May 2011)
Log Message:
-----------
18Scan initial XML files
Added Paths:
-----------
trunk/18xx/tiles/svg/tile1121.svg
Added: trunk/18xx/tiles/svg/tile1121.svg
===================================================================
--- trunk/18xx/tiles/svg/tile1121.svg (rev 0)
+++ trunk/18xx/tiles/svg/tile1121.svg 2011-05-08 15:55:50 UTC (rev 1550)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#38AC00" stroke="#38AC00" stroke-width="1" stroke-linejoin="round"/><text x="245" y="318" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Arial" font-size="34">1121</text><circle cx="196" cy="170" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><path d="M 196,170 L 49,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 343,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 196,340" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 49,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 343,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 196,340" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><circle cx="196" cy="170" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="49" cy="170" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="49" y="170" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">50</text><text x="196" y="85" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="TimpaniHeavy" font-size="51">COP</text><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-08 15:55:10
|
Revision: 1549
http://rails.svn.sourceforge.net/rails/?rev=1549&view=rev
Author: evos
Date: 2011-05-08 15:55:04 +0000 (Sun, 08 May 2011)
Log Message:
-----------
Removed Paths:
-------------
trunk/18xx/tiles/svg/tile1121.svg
Deleted: trunk/18xx/tiles/svg/tile1121.svg
===================================================================
--- trunk/18xx/tiles/svg/tile1121.svg 2011-05-08 15:47:53 UTC (rev 1548)
+++ trunk/18xx/tiles/svg/tile1121.svg 2011-05-08 15:55:04 UTC (rev 1549)
@@ -1,2 +0,0 @@
-<?xml version="1.0"?>
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#38AC00" stroke="#38AC00" stroke-width="1" stroke-linejoin="round"/><text x="245" y="318" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Arial" font-size="34">1121</text><circle cx="196" cy="170" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><path d="M 196,170 L 49,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 343,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 196,340" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 49,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 343,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 196,340" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><circle cx="196" cy="170" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="49" cy="170" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="49" y="170" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">50</text><text x="196" y="85" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="TimpaniHeavy" font-size="51">COP</text><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-08 15:47:59
|
Revision: 1548
http://rails.svn.sourceforge.net/rails/?rev=1548&view=rev
Author: evos
Date: 2011-05-08 15:47:53 +0000 (Sun, 08 May 2011)
Log Message:
-----------
18Scan initial XML files
Modified Paths:
--------------
trunk/18xx/tiles/TileDictionary.18t
Modified: trunk/18xx/tiles/TileDictionary.18t
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-08 15:37:57
|
Revision: 1547
http://rails.svn.sourceforge.net/rails/?rev=1547&view=rev
Author: evos
Date: 2011-05-08 15:37:49 +0000 (Sun, 08 May 2011)
Log Message:
-----------
18Scan initial XML files
Modified Paths:
--------------
trunk/18xx/data/GamesList.xml
trunk/18xx/tiles/TileDictionary.xml
trunk/18xx/tiles/Tiles.xml
trunk/18xx/tools/ConvertTilesXML.java
trunk/18xx/tools/MakeGameTileSets.java
Added Paths:
-----------
trunk/18xx/data/18Scan/
trunk/18xx/data/18Scan/CompanyManager.xml
trunk/18xx/data/18Scan/Game.xml
trunk/18xx/data/18Scan/Map.xml
trunk/18xx/data/18Scan/StockMarket.xml
trunk/18xx/data/18Scan/TileSet.xml
trunk/18xx/data/18Scan/Tiles.xml
trunk/18xx/tiles/svg/tile-10004.svg
trunk/18xx/tiles/svg/tile1121.svg
trunk/18xx/tiles/svg/tile1584.svg
trunk/18xx/tiles/svg/tile403.svg
Removed Paths:
-------------
trunk/18xx/rails/util/ConvertTilesXML.java
trunk/18xx/rails/util/MakeGameTileSets.java
Added: trunk/18xx/data/18Scan/CompanyManager.xml
===================================================================
--- trunk/18xx/data/18Scan/CompanyManager.xml (rev 0)
+++ trunk/18xx/data/18Scan/CompanyManager.xml 2011-05-08 15:37:49 UTC (rev 1547)
@@ -0,0 +1,34 @@
+<?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">
+ <PoolPaysOut/>
+ <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="P1" type="Private" basePrice="20" revenue="5"
+ longname="Private 1"></Company>
+
+
+ <StartPacket roundClass="rails.game.StartRound_1830">
+ <Bidding initial="5" minimum="5" increment="1"/>
+ <Item name="P1" type="Private" basePrice="20"/>
+
+
+ </StartPacket>
+</CompanyManager>
\ No newline at end of file
Property changes on: trunk/18xx/data/18Scan/CompanyManager.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/18xx/data/18Scan/Game.xml
===================================================================
--- trunk/18xx/data/18Scan/Game.xml (rev 0)
+++ trunk/18xx/data/18Scan/Game.xml 2011-05-08 15:37:49 UTC (rev 1547)
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<ComponentManager>
+ <Component name="GameManager" class="rails.game.GameManager">
+ <Game name="18Scan"/>
+ <GameParameters>
+ <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>
+ </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="900" certLimit="18"/>
+ <Players number="3" cash="600" certLimit="12"/>
+ <Players number="4" cash="450" certLimit="9"/>
+ </Component>
+ <Component name="Bank" class="rails.game.Bank">
+ <Bank amount="6000"/>
+ </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>
+ <Train name="2" majorStops="2" cost="100" amount="5"/>
+ <Train name="3" majorStops="3" cost="180" amount="4" startPhase="3"/>
+ <Train name="4" majorStops="4" cost="300" amount="3" startPhase="4"
+ rustedTrain="2" />
+ <Train name="5" majorStops="5" cost="450" amount="2" startPhase="5"/>
+ <Train name="6" majorStops="6" cost="630" amount="2" startPhase="6"
+ rustedTrain="3"/>
+ <Train name="8" majorStops="8" cost="800" startPhase="8"
+ rustedTrain="4">
+ <IfOption name="UnlimitedTopTrains" value="yes">
+ <Attributes amount="-1"/>
+ </IfOption>
+ <IfOption name="UnlimitedTopTrains" value="no">
+ <Attributes amount="5"/>
+ </IfOption>
+ </Train>
+ </Component>
+ <Component name="PhaseManager" class="rails.game.PhaseManager">
+ <Phase name="2" >
+ <Tiles colour="yellow"/>
+ <OperatingRounds number="1"/>
+ <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"/>
+ </Phase>
+ </Component>
+ <Component name="RevenueManager" class="rails.algorithms.RevenueManager">
+ </Component>
+</ComponentManager>
\ No newline at end of file
Property changes on: trunk/18xx/data/18Scan/Game.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/18xx/data/18Scan/Map.xml
===================================================================
--- trunk/18xx/data/18Scan/Map.xml (rev 0)
+++ trunk/18xx/data/18Scan/Map.xml 2011-05-08 15:37:49 UTC (rev 1547)
@@ -0,0 +1,62 @@
+<Map mapClass="rails.ui.swing.hexmap.EWHexMap" tileOrientation="EW" letterOrientation="horizontal" even="A">
+ <!-- Hex name="" tile="" orientation="" value="" impassable="" label="" cost="" value="" port="yes/no" -->
+ <Hex name="A6" tile="-912" city="Kiel" value="20,30,50" orientation="5"/>
+ <Hex name="B5" tile="0"/>
+ <Hex name="B7" tile="-912" city="Stettin" value="10,30,60" orientation="5"/>
+ <Hex name="C6" tile="-10" city="Odense-Copenhagen" cost="40"/>
+ <Hex name="D1" tile="-911" city="Newcastle" value="20,50,80"/>
+ <Hex name="D3" tile="-10" city="Stavauger"/>
+ <Hex name="D5" tile="-10" city="Århus" impassable="E5"/>
+ <Hex name="D7" tile="-10" city="Malmö" cost="40"/>
+ <Hex name="E2" tile="-10" city="Bergen" impassable="D3"/>
+ <Hex name="E4" tile="-1" city="Kristiansand" impassable="D5"/>
+ <Hex name="E6" tile="0" impassable="D5"/>
+ <Hex name="F1" tile="0" cost="60"/>
+ <Hex name="F3" tile="0" cost="60"/>
+ <Hex name="F5" tile="-10" city="Göteborg" impassable="D4"/>
+ <Hex name="F7" tile="0"/>
+ <Hex name="G2" tile="0" cost="60"/>
+ <Hex name="G4" tile="-10" city="Oslo"/>
+ <Hex name="G6" tile="-1" city="Norrköping"/>
+ <Hex name="H1" tile="0" cost="60"/>
+ <Hex name="H3" tile="0" cost="60"/>
+ <Hex name="H5" tile="0"/>
+ <Hex name="H7" tile="0"/>
+ <Hex name="I2" tile="0" cost="60"/>
+ <Hex name="I4" tile="0"/>
+ <Hex name="I6" tile="0"/>
+ <Hex name="J1" tile="0" cost="60"/>
+ <Hex name="J3" tile="0" cost="60"/>
+ <Hex name="J5" tile="-1" city="Gävle"/>
+ <Hex name="K2" tile="-10" city="Trondheim" cost="60"/>
+ <Hex name="K4" tile="0"/>
+ <Hex name="K6" tile="-10004" city="Stockholm" impassable="M6"/>
+ <Hex name="L3" tile="-1" city="Östersund"/>
+ <Hex name="L5" tile="0" impassable="N5,M6"/>
+ <Hex name="L7" tile="0"/>
+ <Hex name="M2" tile="0" cost="60"/>
+ <Hex name="M4" tile="0" impassable="N5"/>
+ <Hex name="M6" tile="-10" city="Turku"/>
+ <Hex name="M8" tile="-911" city="Tallinn" value="0,30,60" orientation="4"/>
+ <Hex name="N1" tile="0" cost="60"/>
+ <Hex name="N3" tile="0"/>
+ <Hex name="N5" tile="0"/>
+ <Hex name="N7" tile="-10" city="Helsinki"/>
+ <Hex name="O2" tile="0" cost="60"/>
+ <Hex name="O4" tile="-10" city="Umeå" impassable="N5,P5"/>
+ <Hex name="O6" tile="-10" city="Tampere"/>
+ <Hex name="P1" tile="0" cost="60"/>
+ <Hex name="P3" tile="0"/>
+ <Hex name="P5" tile="0"/>
+ <Hex name="P7" tile="-1" city="Lahti"/>
+ <Hex name="Q2" tile="0" cost="60"/>
+ <Hex name="Q4" tile="0" impassable="S4,P5,R5"/>
+ <Hex name="Q6" tile="0" city="Tampere"/>
+ <Hex name="Q8" tile="-911" city="Vyborg" value="30,50,80" orientation="3"/>
+ <Hex name="R1" tile="-10" city="Narvik" cost="60"/>
+ <Hex name="R3" tile="-1" city="Lulea"/>
+ <Hex name="R5" tile="0"/>
+ <Hex name="S2" tile="-10" city="Gällivare"/>
+ <Hex name="S4" tile="-1" city="Oulu"/>
+ <Hex name="T1" tile="-4002" city="Kiruna" value="10,50,10" orientation="2"/>
+</Map>
Property changes on: trunk/18xx/data/18Scan/Map.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/18xx/data/18Scan/StockMarket.xml
===================================================================
--- trunk/18xx/data/18Scan/StockMarket.xml (rev 0)
+++ trunk/18xx/data/18Scan/StockMarket.xml 2011-05-08 15:37:49 UTC (rev 1547)
@@ -0,0 +1,95 @@
+<StockMarket type="rectangular">
+
+ <StockSpace name="A1" price="82" />
+ <StockSpace name="A2" price="75" />
+ <StockSpace name="A3" price="70"/>
+ <StockSpace name="A4" price="65"/>
+ <StockSpace name="A5" price="60"/>
+ <StockSpace name="A6" price="50"/>
+ <StockSpace name="A7" price="40"/>
+
+ <StockSpace name="B1" price="90" />
+ <StockSpace name="B2" price="82" />
+ <StockSpace name="B3" price="75" />
+ <StockSpace name="B4" price="70"/>
+ <StockSpace name="B5" price="65"/>
+ <StockSpace name="B6" price="60"/>
+ <StockSpace name="B7" price="50"/>
+
+ <StockSpace name="C1" price="100" />
+ <StockSpace name="C2" price="90" />
+ <StockSpace name="C3" price="82" />
+ <StockSpace name="C4" price="75"/>
+ <StockSpace name="C5" price="70">
+ <StartSpace />
+ </StockSpace>
+ <StockSpace name="C6" price="65"/>
+ <StockSpace name="C7" price="60"/>
+
+ <StockSpace name="D1" price="110" />
+ <StockSpace name="D2" price="100" />
+ <StockSpace name="D3" price="90"/>
+ <StockSpace name="D4" price="82">
+ <StartSpace />
+ </StockSpace>
+ <StockSpace name="D5" price="75" >
+ <StartSpace />
+ </StockSpace>
+ <StockSpace name="D6" price="70"/>
+ <StockSpace name="D7" price="65"/>
+
+ <StockSpace name="E1" price="122" />
+ <StockSpace name="E2" price="110"/>
+ <StockSpace name="E3" price="100" >
+ <StartSpace />
+ </StockSpace>
+ <StockSpace name="E4" price="90" >
+ <StartSpace />
+ </StockSpace>
+ <StockSpace name="E5" price="82" />
+ <StockSpace name="E6" price="75"/>
+
+ <StockSpace name="F1" price="135"/>
+ <StockSpace name="F2" price="122" />
+ <StockSpace name="F3" price="110" />
+ <StockSpace name="F4" price="100" />
+ <StockSpace name="F5" price="90" />
+
+ <StockSpace name="G1" price="150" />
+ <StockSpace name="G2" price="135" />
+ <StockSpace name="G3" price="122" />
+ <StockSpace name="G4" price="110" />
+
+ <StockSpace name="H1" price="165" />
+ <StockSpace name="H2" price="150" />
+ <StockSpace name="H3" price="135" />
+ <StockSpace name="H4" price="122" />
+
+ <StockSpace name="I1" price="180" />
+ <StockSpace name="I2" price="165" />
+ <StockSpace name="I3" price="150" />
+
+ <StockSpace name="J1" price="200" />
+ <StockSpace name="J2" price="180" />
+ <StockSpace name="J3" price="165" />
+
+ <StockSpace name="K1" price="220" />
+ <StockSpace name="K2" price="200" />
+ <StockSpace name="K3" price="180" />
+
+ <StockSpace name="L1" price="245" />
+ <StockSpace name="L2" price="220" />
+
+ <StockSpace name="M1" price="270" />
+ <StockSpace name="M2" price="245" />
+
+ <StockSpace name="N1" price="300" />
+ <StockSpace name="N2" price="270" />
+
+ <StockSpace name="O1" price="330" />
+
+ <StockSpace name="P1" price="360"/>
+
+ <StockSpace name="Q1" price="400"/>
+
+</StockMarket>
Property changes on: trunk/18xx/data/18Scan/StockMarket.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/18xx/data/18Scan/TileSet.xml
===================================================================
--- trunk/18xx/data/18Scan/TileSet.xml (rev 0)
+++ trunk/18xx/data/18Scan/TileSet.xml 2011-05-08 15:37:49 UTC (rev 1547)
@@ -0,0 +1,78 @@
+<TileManager tiles="Tiles.xml">
+ <!-- Preprinted Tiles-->
+ <Tile id="0">
+ <Upgrade id="8,9"/>
+ </Tile>
+ <Tile id="-1">
+ <Upgrade id="58"/>
+ </Tile>
+ <Tile id="-10">
+ <Upgrade id="5"/>
+ </Tile>
+ <Tile id="-911"/>
+ <Tile id="-912"/>
+ <Tile id="-4002"/>
+ <Tile id="-10004"/>
+
+ <!-- Yellow Tiles -->
+ <Tile id="5">
+ <Upgrade id="15"/>
+ </Tile>
+ <Tile id="8">
+ <Upgrade id="80,81,82,83"/>
+ </Tile>
+ <Tile id="9">
+ <Upgrade id="82,83"/>
+ </Tile>
+ <Tile id="58">
+ <Upgrade id="141,142,143,144"/>
+ </Tile>
+ <Tile id="403">
+ <Upgrade id="1121"/>
+ </Tile>
+
+ <!-- Green Tiles -->
+ <Tile id="15"/>
+ <Tile id="80">
+ <Upgrade id="545,546"/>
+ </Tile>
+ <Tile id="81">
+ <Upgrade id="546"/>
+ </Tile>
+ <Tile id="82">
+ <Upgrade id="544,545,546"/>
+ </Tile>
+ <Tile id="83">
+ <Upgrade id="544,545,546"/>
+ </Tile>
+ <Tile id="1121" extId="121">
+ <Upgrade id="1584"/>
+ </Tile>
+ <Tile id="141">
+ <Upgrade id="145,146,147"/>
+ </Tile>
+ <Tile id="142">
+ <Upgrade id="145,146,147"/>
+ </Tile>
+ <Tile id="143">
+ <Upgrade id="146,147"/>
+ </Tile>
+ <Tile id="144">
+ <Upgrade id="147"/>
+ </Tile>
+ <Tile id="622">
+ <Upgrade id="623"/>
+ </Tile>
+
+ <!-- Brown Tiles -->
+ <Tile id="145"/>
+ <Tile id="146"/>
+ <Tile id="147"/>
+ <Tile id="544"/>
+ <Tile id="545"/>
+ <Tile id="546"/>
+ <Tile id="582"/>
+ <Tile id="1584" extId="584"/>
+ <Tile id="623"/>
+
+</TileManager>
Property changes on: trunk/18xx/data/18Scan/TileSet.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/18xx/data/18Scan/Tiles.xml
===================================================================
--- trunk/18xx/data/18Scan/Tiles.xml (rev 0)
+++ trunk/18xx/data/18Scan/Tiles.xml 2011-05-08 15:37:49 UTC (rev 1547)
@@ -0,0 +1,186 @@
+<?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="-10" name="1 city">
+ <Station id="city1" position="302" slots="1" type="City"/>
+ </Tile>
+ <Tile colour="red" id="-911" name="OMCity-1">
+ <Station id="city1" position="0" slots="1" type="OffMapCity"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ </Tile>
+ <Tile colour="red" id="-912" name="OMCity-2">
+ <Station id="city1" position="0" slots="1" type="OffMapCity"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ </Tile>
+ <Tile colour="red" id="-4002" name="Port-2">
+ <Station id="city1" position="0" type="OffMapCity"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ </Tile>
+ <Tile colour="yellow" id="-10004" name="Stockholm">
+ <Station id="city1" position="052" slots="1" type="City" value="30"/>
+ <Station id="city2" position="452" slots="1" type="City" value="30"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ <Track from="city2" gauge="normal" to="side4"/>
+ </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="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="58" name="58">
+ <Station id="city1" position="401" type="Town" value="10"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ <Track from="city1" gauge="normal" to="side3"/>
+ </Tile>
+ <Tile colour="yellow" id="403" name="Copenhagen">
+ <Station id="city1" position="001" slots="1" type="City" value="30"/>
+ <Station id="city2" position="303" type="Town" value="10"/>
+ <Track from="city1" gauge="normal" to="city2"/>
+ <Track from="city2" gauge="normal" to="side3"/>
+ </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="80" name="80">
+ <Track from="side1" gauge="normal" to="side2"/>
+ <Track from="side1" gauge="normal" to="side3"/>
+ <Track from="side2" gauge="normal" to="side3"/>
+ </Tile>
+ <Tile colour="green" id="81" name="81">
+ <Track from="side0" gauge="normal" to="side2"/>
+ <Track from="side0" gauge="normal" to="side4"/>
+ <Track from="side2" gauge="normal" to="side4"/>
+ </Tile>
+ <Tile colour="green" id="82" name="82">
+ <Track from="side0" gauge="normal" to="side2"/>
+ <Track from="side0" gauge="normal" to="side5"/>
+ <Track from="side2" gauge="normal" to="side5"/>
+ </Tile>
+ <Tile colour="green" id="83" name="83">
+ <Track from="side2" gauge="normal" to="side4"/>
+ <Track from="side2" gauge="normal" to="side5"/>
+ <Track from="side4" gauge="normal" to="side5"/>
+ </Tile>
+ <Tile colour="green" id="1121" name="Copenhagen">
+ <Station id="city1" position="0" slots="1" type="City" value="50"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ <Track from="city1" gauge="normal" to="side3"/>
+ </Tile>
+ <Tile colour="green" id="141" name="141">
+ <Station id="city1" position="0" type="Town" value="10"/>
+ <Track from="city1" gauge="normal" to="side0"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ </Tile>
+ <Tile colour="green" id="142" name="142">
+ <Station id="city1" position="0" type="Town" value="10"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ <Track from="city1" gauge="normal" to="side4"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ </Tile>
+ <Tile colour="green" id="143" name="143">
+ <Station id="city1" position="0" type="Town" value="10"/>
+ <Track from="city1" gauge="normal" to="side0"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ </Tile>
+ <Tile colour="green" id="144" name="144">
+ <Station id="city1" position="0" type="Town" value="10"/>
+ <Track from="city1" gauge="normal" to="side0"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ <Track from="city1" gauge="normal" to="side4"/>
+ </Tile>
+ <Tile colour="green" id="622" name="622">
+ <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="145" name="145">
+ <Station id="city1" position="0" type="Town" value="20"/>
+ <Track from="city1" gauge="normal" to="side0"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ <Track from="city1" gauge="normal" to="side3"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ </Tile>
+ <Tile colour="brown" id="146" name="146">
+ <Station id="city1" position="0" type="Town" value="20"/>
+ <Track from="city1" gauge="normal" to="side0"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ </Tile>
+ <Tile colour="brown" id="147" name="147">
+ <Station id="city1" position="0" type="Town" value="20"/>
+ <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="544" name="544">
+ <Track from="side1" gauge="normal" to="side4"/>
+ <Track from="side1" gauge="normal" to="side3"/>
+ <Track from="side0" gauge="normal" to="side3"/>
+ <Track from="side0" gauge="normal" to="side4"/>
+ <Track from="side4" gauge="normal" to="side3"/>
+ <Track from="side0" gauge="normal" to="side1"/>
+ </Tile>
+ <Tile colour="brown" id="545" name="545">
+ <Track from="side0" gauge="normal" to="side3"/>
+ <Track from="side0" gauge="normal" to="side4"/>
+ <Track from="side4" gauge="normal" to="side3"/>
+ <Track from="side0" gauge="normal" to="side5"/>
+ <Track from="side5" gauge="normal" to="side3"/>
+ <Track from="side5" gauge="normal" to="side4"/>
+ </Tile>
+ <Tile colour="brown" id="546" name="546">
+ <Track from="side0" gauge="normal" to="side3"/>
+ <Track from="side1" gauge="normal" to="side3"/>
+ <Track from="side5" gauge="normal" to="side3"/>
+ <Track from="side5" gauge="normal" to="side1"/>
+ <Track from="side1" gauge="normal" to="side0"/>
+ <Track from="side0" gauge="normal" to="side5"/>
+ </Tile>
+ <Tile colour="brown" id="582" name="582">
+ <Station id="city1" position="0" slots="2" type="City" value="50"/>
+ <Track from="city1" gauge="normal" to="side3"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ <Track from="city1" gauge="normal" to="side0"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ </Tile>
+ <Tile colour="brown" id="1584" name="Copenhagen">
+ <Station id="city1" position="0" slots="3" type="City" value="60"/>
+ <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"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ </Tile>
+ <Tile colour="brown" id="623" name="623">
+ <Station id="city1" position="0" slots="2" type="City" value="50"/>
+ <Track from="city1" gauge="normal" to="side0"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ <Track from="city1" gauge="normal" to="side3"/>
+ <Track from="city1" gauge="normal" to="side4"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ </Tile>
+</Tiles>
\ No newline at end of file
Property changes on: trunk/18xx/data/18Scan/Tiles.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/18xx/data/GamesList.xml
===================================================================
--- trunk/18xx/data/GamesList.xml 2011-05-06 19:27:33 UTC (rev 1546)
+++ trunk/18xx/data/GamesList.xml 2011-05-08 15:37:49 UTC (rev 1547)
@@ -304,6 +304,11 @@
All aspects not present in 1880 have not been implemented yet.</Description>
<Players minimum="3" maximum="7"/>
</Game>
+ <Game name="18Scan">
+ <Note>Prototype</Note>
+ <Description>18Scan</Description>
+ <Players minimum="2" maximum="4" />
+ </Game>
<Credits>Rails is a computer implementation of a number of railroad board games,
Deleted: trunk/18xx/rails/util/ConvertTilesXML.java
===================================================================
--- trunk/18xx/rails/util/ConvertTilesXML.java 2011-05-06 19:27:33 UTC (rev 1546)
+++ trunk/18xx/rails/util/ConvertTilesXML.java 2011-05-08 15:37:49 UTC (rev 1547)
@@ -1,424 +0,0 @@
-/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/util/ConvertTilesXML.java,v 1.10 2010/04/30 15:22:42 evos Exp $*/
-package rails.util;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.w3c.dom.*;
-
-import rails.game.ConfigurationException;
-
-/**
- * Convert an XML tile dictionary, as created by Marco Rocci's Tile Designer, to
- * an XML file for use in Rails 18xx. <p> The default names are:
- */
-public class ConvertTilesXML {
-
- private static List<String> directories = new ArrayList<String>();
- private static String inputFilePath = "TileDictionary.xml";
- private static String handmadeFilePath = "HandmadeTiles.xml";
- private static String outputFilePath = "Tiles.xml";
-
- private static Map<String, String> colourMap, gaugeMap, sidesMap, cityMap;
- private static Map<String, String[]> stationMap;
- private static Map<String, String> junctionPosition;
-
- private static Map<Integer, Element> handmadeTiles
- = new HashMap<Integer, Element>();
-
- /** Maps non-edge non-station junctions to tracks ending there. */
- private static Map<String, List<Element>> unresolvedTrack;
-
- /** Maps tracks to edge/station junctions */
- private static Map<Element, String> resolvedTrack;
-
- private static Pattern namePattern = Pattern.compile("^(\\d+)(/.*)?");
- Document outputDoc;
- Element outputJunction;
- String tileNo;
- String colour;
-
- static {
- colourMap = new HashMap<String, String>();
- colourMap.put("tlYellow", "yellow");
- colourMap.put("tlGreen", "green");
- colourMap.put("tlBrown", "brown");
- colourMap.put("tlGray", "gray");
- colourMap.put("tlOffMap", "red");
- colourMap.put("tlMapFixed", "fixed");
- colourMap.put("tlMapUpgradableToYellow", "white");
- colourMap.put("tlMapUpgradableToGreen", "yellow");
- colourMap.put("tlMapUpgradableToBrown", "green");
-
- stationMap = new HashMap<String, String[]>();
- stationMap.put("jtWhistlestop", new String[] { "Town", "0" });
- stationMap.put("jtCity", new String[] { "City", "1" });
- stationMap.put("jtDoubleCity", new String[] { "City", "2" });
- stationMap.put("jtTripleCity", new String[] { "City", "3" });
- stationMap.put("jtQuadrupleCity", new String[] { "City", "4" });
- stationMap.put("jtNone", new String[] { "", "0" });
- // Note: an additional station type is "Pass".
-
- gaugeMap = new HashMap<String, String>();
- gaugeMap.put("ctNormal", "normal");
- gaugeMap.put("ctSmall", "narrow");
- gaugeMap.put("ctUniversal", "dual");
- gaugeMap.put("ctTunnel", "normal");
- gaugeMap.put("ctMountain", "normal");
- // 1841 Pass: Station type is changed to Pass.
-
- sidesMap = new HashMap<String, String>();
- sidesMap.put("tp4SideA", "side0");
- sidesMap.put("tp4SideB", "side1");
- sidesMap.put("tp4SideC", "side2");
- sidesMap.put("tp4SideD", "side3");
- sidesMap.put("tp4SideE", "side4");
- sidesMap.put("tp4SideF", "side5");
-
- cityMap = new HashMap<String, String>();
- cityMap.put("tpCenter", "0");
- cityMap.put("tp1SideA", "001");
- cityMap.put("tp1CornerA", "551");
- cityMap.put("tp1SideB", "101");
- cityMap.put("tp1CornerB", "051");
- cityMap.put("tp1SideC", "201");
- cityMap.put("tp1CornerC", "151");
- cityMap.put("tp1SideD", "301");
- cityMap.put("tp1CornerD", "251");
- cityMap.put("tp1SideE", "401");
- cityMap.put("tp1CornerE", "351");
- cityMap.put("tp1SideF", "501");
- cityMap.put("tp1CornerF", "451");
- cityMap.put("tp2SideA", "002");
- cityMap.put("tp2CornerA", "552");
- cityMap.put("tp2SideB", "102");
- cityMap.put("tp2CornerB", "052");
- cityMap.put("tp2SideC", "202");
- cityMap.put("tp2CornerC", "152");
- cityMap.put("tp2SideD", "302");
- cityMap.put("tp2CornerD", "252");
- cityMap.put("tp2SideE", "402");
- cityMap.put("tp2CornerE", "352");
- cityMap.put("tp2SideF", "502");
- cityMap.put("tp2CornerF", "452");
- cityMap.put("tp3SideA", "003");
- cityMap.put("tp3CornerA", "553");
- cityMap.put("tp3SideB", "103");
- cityMap.put("tp3CornerB", "053");
- cityMap.put("tp3SideC", "203");
- cityMap.put("tp3CornerC", "153");
- cityMap.put("tp3SideD", "303");
- cityMap.put("tp3CornerD", "253");
- cityMap.put("tp3SideE", "403");
- cityMap.put("tp3CornerE", "353");
- cityMap.put("tp3SideF", "503");
- cityMap.put("tp3CornerF", "453");
- cityMap.put("tpCurve1RightA", "006");
- cityMap.put("tpCurve2RightA", "007");
- cityMap.put("tpCurve2LeftA", "008");
- cityMap.put("tpCurve1LeftA", "009");
- cityMap.put("tpCurve1RightB", "106");
- cityMap.put("tpCurve2RightB", "107");
- cityMap.put("tpCurve2LeftB", "108");
- cityMap.put("tpCurve1LeftB", "109");
- cityMap.put("tpCurve1RightC", "206");
- cityMap.put("tpCurve2RightC", "207");
- cityMap.put("tpCurve2LeftC", "208");
- cityMap.put("tpCurve1LeftC", "209");
- cityMap.put("tpCurve1RightD", "306");
- cityMap.put("tpCurve2RightD", "307");
- cityMap.put("tpCurve2LeftD", "308");
- cityMap.put("tpCurve1LeftD", "309");
- cityMap.put("tpCurve1RightE", "406");
- cityMap.put("tpCurve2RightE", "407");
- cityMap.put("tpCurve2LeftE", "408");
- cityMap.put("tpCurve1LeftE", "409");
- cityMap.put("tpCurve1RightF", "506");
- cityMap.put("tpCurve2RightF", "507");
- cityMap.put("tpCurve2LeftF", "508");
- cityMap.put("tpCurve1LeftF", "509");
-
- }
-
- public static void main(String[] args) {
-
- if (args != null) {
- if (args.length > 0) inputFilePath = args[0];
- if (args.length > 1) outputFilePath = args[1];
- }
-
- try {
- new ConvertTilesXML();
- } catch (ConfigurationException e) {
- e.printStackTrace();
- }
-
- }
-
- private ConvertTilesXML() throws ConfigurationException {
-
- int tileId;
-
- directories.add("tiles");
-
- Tag handmadeTopTag =
- Tag.findTopTagInFile(handmadeFilePath, directories, "Tiles");
- for (Tag tag : handmadeTopTag.getChildren("Tile")) {
- tileId = tag.getAttributeAsInteger("id");
- handmadeTiles.put(tileId, tag.getElement());
- }
-
- Tag inputTopElement =
- Tag.findTopTagInFile(inputFilePath, directories, "tiles");
-
- try {
- DocumentBuilderFactory factory =
- DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = factory.newDocumentBuilder();
- DOMImplementation impl = builder.getDOMImplementation();
- outputDoc = impl.createDocument(null, "Tiles", null);
-
- convertXML(inputTopElement, outputDoc);
-
- TransformerFactory.newInstance().newTransformer().transform(
- new DOMSource(outputDoc),
- new StreamResult(new FileOutputStream(new File(
- outputFilePath))));
-
- } catch (Exception e) {
- throw new ConfigurationException("Document build error", e);
- }
-
- }
-
- private void convertXML(Tag inputTag, Document outputDoc)
- throws ConfigurationException {
-
- for (Tag tag : inputTag.getChildren("tile")) {
- int tileId = Integer.parseInt(tag.getChild("ID").getText());
- if (handmadeTiles.containsKey(tileId)) {
- Element outputTile = handmadeTiles.get(tileId);
- Node dup = outputDoc.importNode(outputTile, true);
- outputDoc.getDocumentElement().appendChild(dup);
- System.out.println("Copied handmade tile #"+tileId);
- } else {
- Element inputTile = tag.getElement();
- Element outputTile = outputDoc.createElement("Tile");
- outputDoc.getDocumentElement().appendChild(outputTile);
- convertTile(inputTile, outputTile);
- }
- }
-
- }
-
- private void convertTile(Element inputTile, Element outputTile)
- throws ConfigurationException {
-
- String id =
- inputTile.getElementsByTagName("ID").item(0).getFirstChild().getNodeValue();
- System.out.println(id);
- tileNo = id;
- outputTile.setAttribute("id", id);
- // int intId;
- try {
- Integer.parseInt(id);
- } catch (NumberFormatException e) {
- throw new ConfigurationException("Non-numeric ID: " + id, e);
- }
-
- String level =
- inputTile.getElementsByTagName("level").item(0).getFirstChild().getNodeValue();
- colour = colourMap.get(level);
- if (colour == null) {
- throw new ConfigurationException("Unknown level: " + level);
- } else {
- outputTile.setAttribute("colour", colour);
- }
-
- String name =
- inputTile.getElementsByTagName("name").item(0).getFirstChild().getNodeValue();
- Matcher m = namePattern.matcher(name);
- if (m.matches()) {
- outputTile.setAttribute("name", m.group(1));
- } else
- outputTile.setAttribute("name", name);
- // The below does not work for "B+"
- /*
- * if (intId > 0) { throw new ConfigurationException("Tile with ID=" +
- * id + " has a name not starting with a number: " + name); }
- */
-
- /*
- * Create map to hold the station 'identifiers', which are referred to
- * in the track definitions.
- */
- junctionPosition = new HashMap<String, String>();
- outputJunction = null;
-
- Element junctions =
- (Element) inputTile.getElementsByTagName("junctions").item(0);
- NodeList children = junctions.getElementsByTagName("junction");
- for (int i = 0; i < children.getLength(); i++) {
- Element inputJunction = (Element) children.item(i);
- outputJunction = outputDoc.createElement("Station");
- outputTile.appendChild(outputJunction);
-
- convertJunction(i, inputJunction, outputJunction);
- }
-
- unresolvedTrack = new HashMap<String, List<Element>>();
- resolvedTrack = new HashMap<Element, String>();
-
- Element connections =
- (Element) inputTile.getElementsByTagName("connections").item(0);
- children = connections.getElementsByTagName("connection");
- for (int i = 0; i < children.getLength(); i++) {
- Element inputConnection = (Element) children.item(i);
- convertConnection(inputConnection, outputTile);
- }
-
- String end1, end2;
- for (String key : unresolvedTrack.keySet()) {
- List<Element> list = unresolvedTrack.get(key);
- Element[] ends = list.toArray(new Element[0]);
- if (ends.length <= 1) {
- throw new ConfigurationException("Loose end " + ends[0]
- + " in tile " + tileNo);
- }
- for (int i = 1; i < ends.length; i++) {
- end1 = resolvedTrack.get(ends[i]);
- if (end1 == null) {
- throw new ConfigurationException("Loose end " + ends[i]
- + " in tile " + tileNo);
- }
- for (int j = 0; j < i; j++) {
- end2 = resolvedTrack.get(ends[j]);
- if (end2 == null) {
- throw new ConfigurationException("Loose end " + ends[j]
- + " in tile " + tileNo);
- }
- Element outputConnection = outputDoc.createElement("Track");
- outputConnection.setAttribute("gauge",
- ends[i].getAttribute("gauge"));
- outputConnection.setAttribute("from", end1);
- outputConnection.setAttribute("to", end2);
- outputTile.appendChild(outputConnection);
-
- }
- }
- }
- }
-
- private void convertJunction(int i, Element inputJunction,
- Element outputJunction) throws ConfigurationException {
-
- String cityId = "city" + (i + 1);
- outputJunction.setAttribute("id", cityId);
-
- String type =
- inputJunction.getElementsByTagName("junType").item(0).getFirstChild().getNodeValue();
-
- String[] station = (stationMap.get(type));
- if (station == null) {
- throw new ConfigurationException("Unknown junction type: " + type);
- } else {
- station = station.clone();
- }
-
- /*
- * Off-map cities have the special type "OffMapCity" which does not
- * allow driving through. Original type "town" indicates that no token
- * can be placed.
- */
- if (colour.equals("red")) {
- if (station[0].equals("Town")) station[1] = "0";
- station[0] = "OffMapCity";
- }
-
- outputJunction.setAttribute("type", station[0]);
- if (!station[1].equals("0")) {
- outputJunction.setAttribute("slots", station[1]);
- }
-
- // Junction revenue
- Element revenue =
- (Element) inputJunction.getElementsByTagName("revenue").item(0);
- if (revenue != null) {
- String value =
- revenue.getElementsByTagName("value").item(0).getFirstChild().getNodeValue();
- outputJunction.setAttribute("value", value);
- }
-
- // Junction position
- String junctionPos =
- inputJunction.getElementsByTagName("position").item(0).getFirstChild().getNodeValue();
- junctionPosition.put(junctionPos, cityId);
- String jName = cityMap.get(junctionPos);
- if (Util.hasValue(jName)) {
- outputJunction.setAttribute("position", jName);
- } else {
- throw new ConfigurationException("Unknown position: " + junctionPos);
- }
- }
-
- private void convertConnection(Element inputConnection, Element outputTile)
- throws ConfigurationException {
-
- String type =
- inputConnection.getElementsByTagName("conType").item(0).getFirstChild().getNodeValue();
- String gauge = gaugeMap.get(type);
- Element outputConnection;
- if (gauge == null) {
- throw new ConfigurationException("Unknown gauge type: " + type);
- } else {
- outputConnection = outputDoc.createElement("Track");
- outputConnection.setAttribute("gauge", gauge);
- }
-
- // 1841 special: A pass is not a track type but a station type.
- if (type.equals("ctMountain"))
- outputJunction.setAttribute("type", "pass");
-
- boolean fromOK =
- convertTrackEnd(inputConnection, outputConnection, "position1",
- "from");
- boolean toOK =
- convertTrackEnd(inputConnection, outputConnection, "position2",
- "to");
-
- if (fromOK && toOK) outputTile.appendChild(outputConnection);
-
- }
-
- private boolean convertTrackEnd(Element inputConnection,
- Element outputConnection, String inputName, String outputName)
- throws ConfigurationException {
-
- String position =
- inputConnection.getElementsByTagName(inputName).item(0).getFirstChild().getNodeValue();
-
- String end = sidesMap.get(position);
- if (end == null) end = junctionPosition.get(position);
- if (end != null) {
- outputConnection.setAttribute(outputName, end);
- resolvedTrack.put(outputConnection, end);
- return true;
- } else {
- if (!unresolvedTrack.containsKey(position)) {
- unresolvedTrack.put(position, new ArrayList<Element>());
- }
- (unresolvedTrack.get(position)).add(outputConnection);
- return false;
- }
- }
-
-}
Deleted: trunk/18xx/rails/util/MakeGameTileSets.java
===================================================================
--- trunk/18xx/rails/util/MakeGameTileSets.java 2011-05-06 19:27:33 UTC (rev 1546)
+++ trunk/18xx/rails/util/MakeGameTileSets.java 2011-05-08 15:37:49 UTC (rev 1547)
@@ -1,176 +0,0 @@
-/* $Header: /Users/blentz/rails_rcs/cvs/18xx/rails/util/MakeGameTileSets.java,v 1.9 2010/01/31 22:22:37 macfreek Exp $*/
-package rails.util;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.util.*;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.w3c.dom.*;
-
-import rails.game.ConfigurationException;
-
-/**
- * Convert an XML tile dictionary, as created by Marco Rocci's Tile Designer, to
- * an XML file for use in Rails 18xx.
- */
-public class MakeGameTileSets {
-
- private static List<String> directories = new ArrayList<String>();
- private static String tilesFilePath = "Tiles.xml";
-
- public static void main(String[] args) {
-
- try {
- if (args.length == 0) {
-
- System.out.println("Provide rails.game name(s) for which to create"
- + " tile sets as argument(s).\nALL implies all games below the data directory.");
-
- } else if (args[0].equalsIgnoreCase("ALL")) {
-
- List<String> games = new ArrayList<String>();
-
- File gamesDir = new File("data");
- if (gamesDir.exists() && gamesDir.isDirectory()) {
- File[] files = gamesDir.listFiles();
- for (int i = 0; i < files.length; i++) {
- if (files[i].isDirectory()
- && !files[i].getName().equalsIgnoreCase("CVS")) {
- games.add(files[i].getName());
- }
- }
- }
-
- new MakeGameTileSets(games.toArray(new String[0]));
-
- } else {
-
- new MakeGameTileSets(args);
-
- }
-
- } catch (ConfigurationException e) {
- e.printStackTrace();
- }
-
- }
-
- private MakeGameTileSets(String[] games) throws ConfigurationException {
-
- directories.add("tiles");
- Element inputTopElement =
- Tag.findTopTagInFile(tilesFilePath, directories, "Tiles").getElement();
-
- Map<String, Element> tileMap = new HashMap<String, Element>();
- Element tileSpec;
- String tileName;
- NodeList tList = inputTopElement.getElementsByTagName("Tile");
- for (int i = 0; i < tList.getLength(); i++) {
- tileSpec = (Element) tList.item(i);
- tileName = tileSpec.getAttribute("id");
- tileMap.put(tileName, tileSpec);
- }
-
- for (int i = 0; i < games.length; i++) {
- System.out.println("Preparing "+games[i]);
- makeTileSet(games[i], tileMap);
-
- }
- System.out.println("Done");
- }
-
- private void makeTileSet(String gameName, Map tileMap)
- throws ConfigurationException {
-
- directories.clear();
- directories.add("data/" + gameName);
-
- // Open and read the tile set for this rails.game
- String tileSetPath = "TileSet.xml";
- Element tileSet =
- Tag.findTopTagInFile(tileSetPath, directories, "TileManager").getElement();
- if (tileSet == null) return;
- NodeList tiles = tileSet.getElementsByTagName("Tile");
- Map<String, Object> tilesInSet = new HashMap<String, Object>();
-
- // Also open and read the map tiles.
- String mapPath = "Map.xml";
- Element mapHexes =
- Tag.findTopTagInFile(mapPath, directories, "Map").getElement();
- NodeList hexes = mapHexes.getElementsByTagName("Hex");
-
- String tilesPath = "data/" + gameName + "/Tiles.xml";
- Document outputDoc;
- String tileName;
-
- try {
- DocumentBuilderFactory factory =
- DocumentBuilderFactory.newInstance();
- DocumentBuilder builder = factory.newDocumentBuilder();
- DOMImplementation impl = builder.getDOMImplementation();
- outputDoc = impl.createDocument(null, "Tiles", null);
-
- // Scan the TileSet
- for (int i = 0; i < tiles.getLength(); i++) {
-
- tileName = ((Element) tiles.item(i)).getAttribute("id");
- // Save the tile in a Map so that we can check completeness
- // later.
- // If we already have it, skip
- if (tilesInSet.containsKey(tileName)) continue;
- tilesInSet.put(tileName, null);
-
- System.out.println("Tile "+tileName);
-
- // Get the Tile specification
- Element tileSpec = (Element) tileMap.get(tileName);
- if (tileSpec != null) {
- // Copy it to the subset document
- Element copy =
- (Element) outputDoc.importNode(
- ((Element) tileMap.get(tileName)), true);
- outputDoc.getDocumentElement().appendChild(copy);
- } else {
- System.out.println("ERROR: specified " + gameName
- + " tile " + tileName
- + " not found in Tiles.xml.");
- }
- }
-
- // Scan the map, and add any missing tiles, with a warning.
- for (int i = 0; i < hexes.getLength(); i++) {
-
- tileName = ((Element) hexes.item(i)).getAttribute("tile");
- // Does the preprinted tile occur in TileSet?
- if (tilesInSet.containsKey(tileName)) continue;
-
- // No, warn and add it to the tiles document.
- System.out.println("WARNING: " + gameName
- + " preprinted map tile " + tileName
- + " does not occur in TileSet!");
-
- // Copy it to the subset document
- Element copy =
- (Element) outputDoc.importNode(
- ((Element) tileMap.get(tileName)), true);
- outputDoc.getDocumentElement().appendChild(copy);
-
- }
-
- TransformerFactory.newInstance().newTransformer().transform(
- new DOMSource(outputDoc),
- new StreamResult(new FileOutputStream(new File(tilesPath))));
-
- } catch (Exception e) {
- throw new ConfigurationException("Document build error", e);
- }
-
- }
-
-}
Modified: trunk/18xx/tiles/TileDictionary.xml
===================================================================
--- trunk/18xx/tiles/TileDictionary.xml 2011-05-06 19:27:33 UTC (rev 1546)
+++ trunk/18xx/tiles/TileDictionary.xml 2011-05-08 15:37:49 UTC (rev 1547)
@@ -6576,7 +6576,7 @@
<name>121</name>
<category>
<value>Lon/Bar</value>
- <position>tp3CornerF</position>
+ <position>tp2SideD</position>
</category>
<junctions>
<junction>
@@ -23623,4 +23623,169 @@
</connection>
</connections>
</tile>
-</tiles>
\ No newline at end of file
+ <tile>
+ <ID>-10004</ID>
+ <shape>tsHexagon</shape>
+ <level>tlMapUpgradableToGreen</level>
+ <name>Stockholm</name>
+ <junctions>
+ <junction>
+ <junType>jtCity</junType>
+ <position>tp2CornerA</position>
+ <revenue>
+ <value>30</value>
+ <position>tp2CornerC</position>
+ </revenue>
+ </junction>
+ <junction>
+ <junType>jtCity</junType>
+ <position>tp2CornerE</position>
+ <revenue>
+ <value>30</value>
+ <position>tp2CornerC</position>
+ </revenue>
+ </junction>
+ </junctions>
+ <connections>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp2CornerA</position1>
+ <position2>tp4SideF</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp2CornerE</position1>
+ <position2>tp4SideE</position2>
+ </connection>
+ </connections>
+ </tile>
+ <tile>
+ <ID>403</ID>
+ <shape>tsHexagon</shape>
+ <level>tlYellow</level>
+ <name>Copenhagen</name>
+ <category>
+ <value>COP</value>
+ <position>tp2CornerC</position>
+ </category>
+ <junctions>
+ <junction>
+ <junType>jtCity</junType>
+ <position>tp1SideA</position>
+ <revenue>
+ <value>30</value>
+ <position>tp3CornerA</position>
+ </revenue>
+ </junction>
+ <junction>
+ <junType>jtWhistlestop</junType>
+ <position>tp3SideD</position>
+ <revenue>
+ <value>10</value>
+ <position>tp3CornerE</position>
+ </revenue>
+ </junction>
+ </junctions>
+ <connections>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp1SideA</position1>
+ <position2>tp3SideD</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp3SideD</position1>
+ <position2>tp4SideD</position2>
+ </connection>
+ </connections>
+ </tile>
+ <tile>
+ <ID>1121</ID>
+ <shape>tsHexagon</shape>
+ <level>tlGreen</level>
+ <name>Copenhagen</name>
+ <category>
+ <value>COP</value>
+ <position>tp2SideA</position>
+ </category>
+ <junctions>
+ <junction>
+ <junType>jtCity</junType>
+ <position>tpCenter</position>
+ <revenue>
+ <value>50</value>
+ <position>tp3CornerF</position>
+ </revenue>
+ </junction>
+ </junctions>
+ <connections>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tpCenter</position1>
+ <position2>tp4SideF</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tpCenter</position1>
+ <position2>tp4SideB</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tpCenter</position1>
+ <position2>tp4SideD</position2>
+ </connection>
+ </connections>
+ </tile>
+ <tile>
+ <ID>1584</ID>
+ <shape>tsHexagon</shape>
+ <level>tlBrown</level>
+ <name>Copenhagen</name>
+ <category>
+ <value>COP</value>
+ <position>tp3CornerB</position>
+ </category>
+ <junctions>
+ <junction>
+ <junType>jtTripleCity</junType>
+ <position>tpCenter</position>
+ <revenue>
+ <value>60</value>
+ <position>tp3CornerA</position>
+ </revenue>
+ </junction>
+ </junctions>
+ <connections>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tpCenter</position1>
+ <position2>tp4SideD</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tpCenter</position1>
+ <position2>tp4SideE</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tpCenter</position1>
+ <position2>tp4SideF</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tpCenter</position1>
+ <position2>tp4SideA</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tpCenter</position1>
+ <position2>tp4SideB</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tpCenter</position1>
+ <position2>tp4SideC</position2>
+ </connection>
+ </connections>
+ </tile>
+</tiles>
Modified: trunk/18xx/tiles/Tiles.xml
===================================================================
--- trunk/18xx/tiles/Tiles.xml 2011-05-06 19:27:33 UTC (rev 1546)
+++ trunk/18xx/tiles/Tiles.xml 2011-05-08 15:37:49 UTC (rev 1547)
@@ -3341,7 +3341,7 @@
<Track from="city1" gauge="normal" to="side4"/>
<Track from="city1" gauge="normal" to="side2"/>
</Tile>
- <Tile colour="green" id="-89015" name="1889 Kouchi F9">
+ <Tile colour="green" id="-89015" name="1889 Kouchi F9">
<Station id="city1" position="0" slots="2" type="City" value="30"/>
<Track from="city1" gauge="normal" to="side0"/>
<Track from="city1" gauge="normal" to="side5"/>
@@ -4146,4 +4146,31 @@
<Track from="side1" gauge="normal" to="city1"/>
<Track from="side2" gauge="normal" to="city1"/>
</Tile>
+ <Tile colour="yellow" id="-10004" name="Stockholm">
+ <Station id="city1" position="052" slots="1" type="City" value="30"/>
+ <Station id="city2" position="452" slots="1" type="City" value="30"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ <Track from="city2" gauge="normal" to="side4"/>
+ </Tile>
+ <Tile colour="yellow" id="403" name="Copenhagen">
+ <Station id="city1" position="001" slots="1" type="City" value="30"/>
+ <Station id="city2" position="303" type="Town" value="10"/>
+ <Track from="city1" gauge="normal" to="city2"/>
+ <Track from="city2" gauge="normal" to="side3"/>
+ </Tile>
+ <Tile colour="green" id="1121" name="Copenhagen">
+ <Station id="city1" position="0" slots="1" type="City" value="50"/>
+ <Track from="city1" gauge="normal" to="side5"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ <Track from="city1" gauge="normal" to="side3"/>
+ </Tile>
+ <Tile colour="brown" id="1584" name="Copenhagen">
+ <Station id="city1" position="0" slots="3" type="City" value="60"/>
+ <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"/>
+ <Track from="city1" gauge="normal" to="side1"/>
+ <Track from="city1" gauge="normal" to="side2"/>
+ </Tile>
</Tiles>
\ No newline at end of file
Added: trunk/18xx/tiles/svg/tile-10004.svg
===================================================================
--- trunk/18xx/tiles/svg/tile-10004.svg (rev 0)
+++ trunk/18xx/tiles/svg/tile-10004.svg 2011-05-08 15:37:49 UTC (rev 1547)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#FFFF00" stroke="#FFFF00" stroke-width="1" stroke-linejoin="round"/><circle cx="147" cy="85" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><circle cx="147" cy="255" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><path d="M 49,85 A 98,98 0 0,0 147,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 147,255 A 98,98 0 0,0 49,255" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 49,85 A 98,98 0 0,0 147,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 147,255 A 98,98 0 0,0 49,255" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><circle cx="147" cy="85" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="294" cy="170" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="294" y="170" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">30</text><circle cx="147" cy="255" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="294" cy="170" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="294" y="170" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">30</text><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
Added: trunk/18xx/tiles/svg/tile1121.svg
===================================================================
--- trunk/18xx/tiles/svg/tile1121.svg (rev 0)
+++ trunk/18xx/tiles/svg/tile1121.svg 2011-05-08 15:37:49 UTC (rev 1547)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#38AC00" stroke="#38AC00" stroke-width="1" stroke-linejoin="round"/><text x="245" y="318" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Arial" font-size="34">1121</text><circle cx="196" cy="170" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><path d="M 196,170 L 49,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 343,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 196,340" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 49,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 343,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 196,340" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><circle cx="196" cy="170" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="49" cy="170" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="49" y="170" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">50</text><text x="196" y="85" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="TimpaniHeavy" font-size="51">COP</text><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
Added: trunk/18xx/tiles/svg/tile1584.svg
===================================================================
--- trunk/18xx/tiles/svg/tile1584.svg (rev 0)
+++ trunk/18xx/tiles/svg/tile1584.svg 2011-05-08 15:37:49 UTC (rev 1547)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#B46301" stroke="#B46301" stroke-width="1" stroke-linejoin="round"/><text x="245" y="318" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Arial" font-size="34">1584</text><polygon points="145,90 247,90 291,167 240,255 152,255 101,167" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><circle cx="145" cy="141" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><circle cx="247" cy="141" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><circle cx="196" cy="229" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><path d="M 196,170 L 196,340" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 49,255" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 49,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 196,0" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 343,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 343,255" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,170 L 196,340...
[truncated message content] |
|
From: <ev...@us...> - 2011-05-06 19:27:43
|
Revision: 1546
http://rails.svn.sourceforge.net/rails/?rev=1546&view=rev
Author: evos
Date: 2011-05-06 19:27:33 +0000 (Fri, 06 May 2011)
Log Message:
-----------
Added runTo and runThrough properties and getters to MapHex.
Possible values: "yes", "no" and "tokenOnly" (values of a new enum MapHex.Run).
These new properties are intended to facilitate certain special cases as the names indicate.
As an example, runThrough="tokenOnly" has been specified for 1830 Altoona and for the Reading home city in the 1830 Reading variant.
Note: These properties are not actually used yet by any code.
Modified Paths:
--------------
trunk/18xx/data/1830/Map.xml
trunk/18xx/rails/game/MapHex.java
Modified: trunk/18xx/data/1830/Map.xml
===================================================================
--- trunk/18xx/data/1830/Map.xml 2011-05-05 20:42:00 UTC (rev 1545)
+++ trunk/18xx/data/1830/Map.xml 2011-05-06 19:27:33 UTC (rev 1546)
@@ -86,16 +86,16 @@
<Hex name="H8" tile="0"/>
<Hex name="H10" tile="-10"/>
<IfOption name="Variant" value="Basegame,Pere Marquette">
- <Hex name="H12" tile="-101" city="Altoona"/>
+ <Hex name="H12" tile="-101" city="Altoona" runThrough="tokenOnly"/>
</IfOption>
<IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
- <Hex name="H12" tile="-30003" pic="-30002" city="Altoona"/>
+ <Hex name="H12" tile="-30003" pic="-30002" city="Altoona" runThrough="tokenOnly"/>
</IfOption>
<IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields">
<Hex name="H14" tile="0"/>
</IfOption>
<IfOption name="Variant" value="Reading,Coalfields&Reading">
- <Hex name="H14" tile="-30007" pic="-30006" city="Reading"/>
+ <Hex name="H14" tile="-30007" pic="-30006" city="Reading" runThrough="tokenOnly"/>
</IfOption>
<Hex name="H16" tile="-10"/>
Modified: trunk/18xx/rails/game/MapHex.java
===================================================================
--- trunk/18xx/rails/game/MapHex.java 2011-05-05 20:42:00 UTC (rev 1545)
+++ trunk/18xx/rails/game/MapHex.java 2011-05-06 19:27:33 UTC (rev 1546)
@@ -12,6 +12,7 @@
import rails.game.model.ModelObject;
import rails.game.move.Moveable;
import rails.game.move.TileMove;
+
import rails.game.state.BooleanState;
import rails.util.*;
@@ -115,6 +116,35 @@
/** Any open sides against which track may be laid even at board edges (1825) */
protected boolean[] openHexSides;
+
+ /** Run-through status of any "city"-type stations on the hex (whether visible or not).
+ * Indicates whether or not a single train can run through such stations, i.e. both enter and leave it.
+ * Has no meaning if no "city"-type stations exist on this hex.
+ * <p>Values (see Run below for definitions):
+ * <br>- "yes" (default for all except off-map hexes) means that trains of all companies
+ * may run through this station, unless it is completely filled with foreign base tokens.
+ * <br>- "tokenOnly" means that trains may only run through the station if it contains a base token of the operating company.
+ * <br>- "no" (default for off-map hexes) means that no train may run through this hex.
+ */
+ protected Run runThroughAllowed = null;
+
+ /** Run-to status of any "city"-type stations on the hex (whether visible or not).
+ * Indicates whether or not a single train can run from or to such stations, i.e. either enter or leave it.
+ * Has no meaning if no "city"-type stations exist on this hex.
+ * <p>Values (see Run below for definitions):
+ * <br>- "yes" (default) means that trains of all companies may run to/from this station.
+ * <br>- "tokenOnly" means that trains may only access the station if it contains a base token of the operating company.
+ * <br>- "no" would mean that the hex is inaccessible (like 18AL Birmingham in the early game),
+ * but this option is not yet useful as there is no provision yet to change this setting
+ * in an undoable way (no state variable).
+ */
+ protected Run runToAllowed = null;
+
+ public enum Run {
+ YES,
+ NO,
+ TOKENONLY
+ }
protected MapManager mapManager = null;
@@ -225,6 +255,24 @@
if (openHexSides == null) openHexSides = new boolean[6];
openHexSides[side%6] = true;
}
+
+ String runThroughString = tag.getAttributeAsString("runThrough");
+ if (Util.hasValue(runThroughString)) {
+ try {
+ runThroughAllowed = Run.valueOf(runThroughString.toUpperCase());
+ } catch (IllegalArgumentException e) {
+ throw new ConfigurationException ("Illegal value for MapHex runThrough property: "+runThroughString, e);
+ }
+ }
+
+ String runToString = tag.getAttributeAsString("runTo");
+ if (Util.hasValue(runToString)) {
+ try {
+ runToAllowed = Run.valueOf(runToString.toUpperCase());
+ } catch (IllegalArgumentException e) {
+ throw new ConfigurationException ("Illegal value for MapHex runTo property: "+runToString, e);
+ }
+ }
}
public void finishConfiguration (GameManagerI gameManager) {
@@ -240,6 +288,13 @@
cities.add(c);
mCities.put(c.getNumber(), c);
}
+
+ if (runThroughAllowed == null) {
+ runThroughAllowed = currentTile.getColourName().equalsIgnoreCase("red") ? Run.NO : Run.YES;
+ }
+ if (runToAllowed == null) {
+ runToAllowed = Run.YES;
+ }
}
public void addImpassableSide (int orientation) {
@@ -1239,4 +1294,12 @@
return endpoints;
}
+ public Run isRunThroughAllowed() {
+ return runThroughAllowed;
+ }
+
+ public Run isRunToAllowed() {
+ return runToAllowed;
+ }
+
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-05 20:42:06
|
Revision: 1545
http://rails.svn.sourceforge.net/rails/?rev=1545&view=rev
Author: evos
Date: 2011-05-05 20:42:00 +0000 (Thu, 05 May 2011)
Log Message:
-----------
Train exchange fix (caused by typo when completing delayed train obsolescence)
Modified Paths:
--------------
trunk/18xx/rails/game/OperatingRound.java
Modified: trunk/18xx/rails/game/OperatingRound.java
===================================================================
--- trunk/18xx/rails/game/OperatingRound.java 2011-05-04 19:10:44 UTC (rev 1544)
+++ trunk/18xx/rails/game/OperatingRound.java 2011-05-05 20:42:00 UTC (rev 1545)
@@ -1805,7 +1805,7 @@
TrainI oldTrain =
operatingCompany.get().getPortfolio().getTrainOfType(
exchangedTrain.getType());
- train.moveTo(train.isObsolete() ? scrapHeap : pool);
+ oldTrain.moveTo(train.isObsolete() ? scrapHeap : pool);
ReportBuffer.add(LocalText.getText("ExchangesTrain",
companyName,
exchangedTrain.getName(),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-04 19:10:51
|
Revision: 1544
http://rails.svn.sourceforge.net/rails/?rev=1544&view=rev
Author: evos
Date: 2011-05-04 19:10:44 +0000 (Wed, 04 May 2011)
Log Message:
-----------
Autosave/load improvements and fixes.
Also fixed a few bugs introduced by the new capability for companies to have more than one home base.
Modified Paths:
--------------
trunk/18xx/rails/game/OperatingRound.java
trunk/18xx/rails/game/PublicCompany.java
trunk/18xx/rails/game/specific/_1856/CGRFormationRound.java
trunk/18xx/rails/ui/swing/ActionPerformer.java
trunk/18xx/rails/ui/swing/AutoSaveLoadDialog.java
trunk/18xx/rails/ui/swing/GameStatus.java
trunk/18xx/rails/ui/swing/GameUIManager.java
trunk/18xx/rails/ui/swing/ORUIManager.java
trunk/18xx/rails/ui/swing/StatusWindow.java
trunk/18xx/rails/ui/swing/elements/Caption.java
trunk/18xx/rails/ui/swing/elements/CheckBoxDialog.java
trunk/18xx/rails/ui/swing/elements/MessageDialog.java
trunk/18xx/rails/ui/swing/elements/RadioButtonDialog.java
trunk/18xx/rails/ui/swing/gamespecific/_1835/StatusWindow_1835.java
trunk/18xx/rails/ui/swing/gamespecific/_1856/StatusWindow_1856.java
trunk/18xx/rails/ui/swing/gamespecific/_18EU/GameStatus_18EU.java
trunk/18xx/rails/ui/swing/gamespecific/_18EU/GameUIManager_18EU.java
Modified: trunk/18xx/rails/game/OperatingRound.java
===================================================================
--- trunk/18xx/rails/game/OperatingRound.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/game/OperatingRound.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -1958,6 +1958,8 @@
// Check if any more companies must discard trains,
// otherwise continue train buying
if (!checkForExcessTrains()) {
+ // Trains may have been discarded by other players
+ setCurrentPlayer (operatingCompany.get().getPresident());
stepObject.set(GameDef.OrStep.BUY_TRAIN);
}
Modified: trunk/18xx/rails/game/PublicCompany.java
===================================================================
--- trunk/18xx/rails/game/PublicCompany.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/game/PublicCompany.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -812,8 +812,8 @@
* @param homeHex The homeHex to set.
*/
public void setHomeHex(MapHex homeHex) {
- if (homeHexes == null) homeHexes = new ArrayList<MapHex>(1);
- homeHexes.set(0, homeHex);
+ homeHexes = new ArrayList<MapHex>(1);
+ homeHexes.add(homeHex);
}
/**
Modified: trunk/18xx/rails/game/specific/_1856/CGRFormationRound.java
===================================================================
--- trunk/18xx/rails/game/specific/_1856/CGRFormationRound.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/game/specific/_1856/CGRFormationRound.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -526,13 +526,14 @@
for (PublicCompanyI comp : mergingCompanies) {
// Exchange home tokens and collect non-home tokens
+ List<MapHex> homeHexes = comp.getHomeHexes();
for (TokenI token :comp.getTokens()) {
if (token instanceof BaseToken) {
bt = (BaseToken) token;
if (!bt.isPlaced()) continue;
city = (City) bt.getHolder();
hex = city.getHolder();
- if (hex == comp.getHomeHexes()) {
+ if (homeHexes != null && homeHexes.contains(hex)) {
homeTokens.add(bt);
} else {
nonHomeTokens.add(bt);
Modified: trunk/18xx/rails/ui/swing/ActionPerformer.java
===================================================================
--- trunk/18xx/rails/ui/swing/ActionPerformer.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/ActionPerformer.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -10,4 +10,6 @@
public boolean process(PossibleAction action);
public boolean processImmediateAction();
+
+ //public void deactivate();
}
Modified: trunk/18xx/rails/ui/swing/AutoSaveLoadDialog.java
===================================================================
--- trunk/18xx/rails/ui/swing/AutoSaveLoadDialog.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/AutoSaveLoadDialog.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -129,7 +129,8 @@
}
interval = ((Integer) intervalSpinner.getValue()).intValue();
} else if (arg0.getSource().equals(cancelButton)) {
- status = -1;
+ //status = -1;
+ // Better change nothing?
}
this.setVisible(false);
this.dispose();
Modified: trunk/18xx/rails/ui/swing/GameStatus.java
===================================================================
--- trunk/18xx/rails/ui/swing/GameStatus.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/GameStatus.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -675,7 +675,9 @@
int index = 0;
if (options.size() > 1) {
if (startCompany) {
- RadioButtonDialog dialog = new RadioButtonDialog (gameUIManager,
+ RadioButtonDialog dialog = new RadioButtonDialog (
+ gameUIManager,
+ parent,
LocalText.getText("PleaseSelect"),
LocalText.getText("WHICH_START_PRICE",
playerName,
@@ -896,7 +898,21 @@
+ (j == index ? " PD" : ""));
}
}
+
+ public void highlightCurrentPlayer (int index) {
+ for (int j = 0; j < np; j++) {
+ upperPlayerCaption[j].setHighlight(j == index);
+ lowerPlayerCaption[j].setHighlight(j == index);
+ }
+ }
+ public void highlightLocalPlayer (int index) {
+ for (int j = 0; j < np; j++) {
+ upperPlayerCaption[j].setLocalPlayer(j == index);
+ lowerPlayerCaption[j].setLocalPlayer(j == index);
+ }
+ }
+
public String getSRPlayer() {
if (actorIndex >= 0)
return players[actorIndex].getName();
Modified: trunk/18xx/rails/ui/swing/GameUIManager.java
===================================================================
--- trunk/18xx/rails/ui/swing/GameUIManager.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/GameUIManager.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -262,6 +262,7 @@
} else if (!wasMyTurn && isMyTurn) {
autoLoadPoller.setActive(false);
setCurrentDialog(new MessageDialog(this,
+ (JFrame) activeWindow,
LocalText.getText("Message"),
LocalText.getText("YourTurn", localPlayerName)),
null);
@@ -280,6 +281,8 @@
// and make sure that the right window is active.
updateUI();
+ statusWindow.initGameActions();
+ if (!myTurn) return true;
statusWindow.setGameActions();
statusWindow.setCorrectionMenu();
@@ -328,6 +331,7 @@
String[] message = DisplayBuffer.get();
if (message != null) {
setCurrentDialog(new MessageDialog(this,
+ (JFrame) activeWindow,
LocalText.getText("Message"),
"<html>" + Util.joinWithDelimiter(message, "<br>")),
null);
@@ -606,6 +610,7 @@
orWindow.toFront();
CheckBoxDialog dialog = new CheckBoxDialog(this,
+ orWindow,
LocalText.getText("ExchangeTokens"),
prompt,
options.toArray(new String[0]));
@@ -697,7 +702,7 @@
}
}
- if (currentDialogAction != null) processAction(currentDialogAction);
+ /*if (currentDialogAction != null)*/ processAction(currentDialogAction);
}
Modified: trunk/18xx/rails/ui/swing/ORUIManager.java
===================================================================
--- trunk/18xx/rails/ui/swing/ORUIManager.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/ORUIManager.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -550,6 +550,7 @@
orWindow.toFront();
CheckBoxDialog dialog = new CheckBoxDialog(this,
+ orWindow,
LocalText.getText("DestinationsReached"),
LocalText.getText("DestinationsReachedPrompt"),
options.toArray(new String[0]));
@@ -1226,6 +1227,7 @@
// TODO This must be split off from here, as in the future
// different clients may handle the discards of each company.
+ /*
while (possibleActions.contains(DiscardTrain.class)) {
// Check if there are any forced discards;
// otherwise, nothing to do here
@@ -1235,6 +1237,7 @@
gameUIManager.discardTrains(dt);
}
+ */
}
int newOffBoardRevenueStep =
@@ -1433,6 +1436,7 @@
}
}
RadioButtonDialog currentDialog = new RadioButtonDialog (gameUIManager,
+ orWindow,
LocalText.getText("Select"),
LocalText.getText("SelectLoansToRepay", action.getCompanyName()),
options,
Modified: trunk/18xx/rails/ui/swing/StatusWindow.java
===================================================================
--- trunk/18xx/rails/ui/swing/StatusWindow.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/StatusWindow.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -349,7 +349,7 @@
ws.set(frame);
}
- public void setGameActions() {
+ public void initGameActions() {
// Check the local Undo/Redo menu items,
// which must always be up-to-date.
@@ -358,7 +358,9 @@
redoItem.setEnabled(false);
redoItem2.setEnabled(false);
// SAVE, RELOAD, AUTOSAVELOAD are always enabled
+ }
+ public void setGameActions() {
List<GameAction> gameActions =
possibleActions.getType(GameAction.class);
if (gameActions != null) {
Modified: trunk/18xx/rails/ui/swing/elements/Caption.java
===================================================================
--- trunk/18xx/rails/ui/swing/elements/Caption.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/elements/Caption.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -2,6 +2,7 @@
package rails.ui.swing.elements;
import java.awt.Color;
+import java.awt.Font;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
@@ -13,19 +14,28 @@
private Border labelBorder = BorderFactory.createEmptyBorder(1, 2, 1, 2);
- private static final Color NORMAL_BG_COLOR = new Color(240, 240, 240);
+ private static final Color NORMAL_BG_COLOUR = new Color(240, 240, 240);
private static final Color HIGHLIGHT_BG_COLOUR = new Color(255, 255, 80);
+
+ private static final Color NORMAL_FG_COLOUR = new Color (0, 0, 0);
+
+ private static final Color LOCAL_PLAYER_COLOUR = new Color (255, 0, 0);
public Caption(String text) {
super(text);
- this.setBackground(NORMAL_BG_COLOR);
+ this.setForeground(NORMAL_FG_COLOUR);
+ this.setBackground(NORMAL_BG_COLOUR);
this.setHorizontalAlignment(SwingConstants.CENTER);
this.setBorder(labelBorder);
this.setOpaque(true);
}
public void setHighlight(boolean highlight) {
- this.setBackground(highlight ? HIGHLIGHT_BG_COLOUR : NORMAL_BG_COLOR);
+ this.setBackground(highlight ? HIGHLIGHT_BG_COLOUR : NORMAL_BG_COLOUR);
}
+
+ public void setLocalPlayer (boolean highlight) {
+ this.setForeground(highlight ? LOCAL_PLAYER_COLOUR : NORMAL_FG_COLOUR);
+ }
}
Modified: trunk/18xx/rails/ui/swing/elements/CheckBoxDialog.java
===================================================================
--- trunk/18xx/rails/ui/swing/elements/CheckBoxDialog.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/elements/CheckBoxDialog.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -35,12 +35,12 @@
protected static Logger log =
Logger.getLogger(CheckBoxDialog.class.getPackage().getName());
- public CheckBoxDialog(DialogOwner owner, String title, String message,
+ public CheckBoxDialog(DialogOwner owner, JFrame window, String title, String message,
String[] options) {
- this (owner, title, message, options, null, false);
+ this (owner, window, title, message, options, null, false);
}
- public CheckBoxDialog(DialogOwner owner, String title, String message,
+ public CheckBoxDialog(DialogOwner owner, JFrame window, String title, String message,
String[] options, boolean[] selectedOptions, boolean addCancelButton) {
super((Frame) null, title, false); // Non-modal
this.owner = owner;
@@ -58,16 +58,10 @@
pack();
// Center on owner
- /*
- int x =
- (int) owner.getLocationOnScreen().getX()
- + (owner.getWidth() - getWidth()) / 2;
- int y =
- (int) owner.getLocationOnScreen().getY()
- + (owner.getHeight() - getHeight()) / 2;
- */
- int x = 400;
- int y = 400;
+ int x = (int) window.getLocationOnScreen().getX()
+ + (window.getWidth() - getWidth()) / 2;
+ int y = (int) window.getLocationOnScreen().getY()
+ + (window.getHeight() - getHeight()) / 2;
setLocation(x, y);
setVisible(true);
Modified: trunk/18xx/rails/ui/swing/elements/MessageDialog.java
===================================================================
--- trunk/18xx/rails/ui/swing/elements/MessageDialog.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/elements/MessageDialog.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -28,7 +28,7 @@
protected static Logger log =
Logger.getLogger(MessageDialog.class.getPackage().getName());
- public MessageDialog(DialogOwner owner, String title, String message) {
+ public MessageDialog(DialogOwner owner, JFrame window, String title, String message) {
super((Frame) null, title, false); // Non-modal
this.owner = owner;
@@ -37,12 +37,15 @@
initialize();
pack();
- int x = 400;
- int y = 400;
+ // Center on window
+ int x = (int) window.getLocationOnScreen().getX()
+ + (window.getWidth() - getWidth()) / 2;
+ int y = (int) window.getLocationOnScreen().getY()
+ + (window.getHeight() - getHeight()) / 2;
setLocation(x, y);
setVisible(true);
- setAlwaysOnTop(true);
+ toFront();
}
private void initialize() {
Modified: trunk/18xx/rails/ui/swing/elements/RadioButtonDialog.java
===================================================================
--- trunk/18xx/rails/ui/swing/elements/RadioButtonDialog.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/elements/RadioButtonDialog.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -33,7 +33,7 @@
protected static Logger log =
Logger.getLogger(RadioButtonDialog.class.getPackage().getName());
- public RadioButtonDialog(DialogOwner owner, String title, String message,
+ public RadioButtonDialog(DialogOwner owner, JFrame window, String title, String message,
String[] options, int selectedOption) {
super((Frame) null, title, false); // Non-modal
this.owner = owner;
@@ -45,17 +45,11 @@
initialize();
pack();
- // Center on owner
- /*
- int x =
- (int) owner.getLocationOnScreen().getX()
- + (owner.getWidth() - getWidth()) / 2;
- int y =
- (int) owner.getLocationOnScreen().getY()
- + (owner.getHeight() - getHeight()) / 2;
- */
- int x = 400;
- int y = 400;
+ // Center on window
+ int x = (int) window.getLocationOnScreen().getX()
+ + (window.getWidth() - getWidth()) / 2;
+ int y = (int) window.getLocationOnScreen().getY()
+ + (window.getHeight() - getHeight()) / 2;
setLocation(x, y);
setVisible(true);
Modified: trunk/18xx/rails/ui/swing/gamespecific/_1835/StatusWindow_1835.java
===================================================================
--- trunk/18xx/rails/ui/swing/gamespecific/_1835/StatusWindow_1835.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/gamespecific/_1835/StatusWindow_1835.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -89,6 +89,7 @@
);
}
currentDialog = new CheckBoxDialog (gameUIManager,
+ this,
LocalText.getText("Select"),
LocalText.getText("SelectCompaniesToFold",
getCurrentPlayer().getName(),
Modified: trunk/18xx/rails/ui/swing/gamespecific/_1856/StatusWindow_1856.java
===================================================================
--- trunk/18xx/rails/ui/swing/gamespecific/_1856/StatusWindow_1856.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/gamespecific/_1856/StatusWindow_1856.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -98,6 +98,7 @@
}
RadioButtonDialog currentDialog = new RadioButtonDialog (gameUIManager,
+ this,
LocalText.getText("1856MergerDialog", action.getCompanyName()),
message,
options,
Modified: trunk/18xx/rails/ui/swing/gamespecific/_18EU/GameStatus_18EU.java
===================================================================
--- trunk/18xx/rails/ui/swing/gamespecific/_18EU/GameStatus_18EU.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/gamespecific/_18EU/GameStatus_18EU.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -70,6 +70,7 @@
}
RadioButtonDialog dialog = new RadioButtonDialog (gameUIManager,
+ parent,
LocalText.getText("PleaseSelect"),
LocalText.getText("SelectCompanyToMergeMinorInto",
minor.getName()),
Modified: trunk/18xx/rails/ui/swing/gamespecific/_18EU/GameUIManager_18EU.java
===================================================================
--- trunk/18xx/rails/ui/swing/gamespecific/_18EU/GameUIManager_18EU.java 2011-05-04 19:10:09 UTC (rev 1543)
+++ trunk/18xx/rails/ui/swing/gamespecific/_18EU/GameUIManager_18EU.java 2011-05-04 19:10:44 UTC (rev 1544)
@@ -73,6 +73,7 @@
+ minor.getLongName();
}
dialog = new RadioButtonDialog (this,
+ statusWindow,
LocalText.getText("PleaseSelect"),
LocalText.getText(
"SelectMinorToMerge",
@@ -90,6 +91,7 @@
options[i] = cities.get(i).toString();
}
dialog = new RadioButtonDialog (this,
+ statusWindow,
LocalText.getText("PleaseSelect"),
LocalText.getText(
"SelectHomeStation",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wak...@us...> - 2011-05-04 19:10:15
|
Revision: 1543
http://rails.svn.sourceforge.net/rails/?rev=1543&view=rev
Author: wakko666
Date: 2011-05-04 19:10:09 +0000 (Wed, 04 May 2011)
Log Message:
-----------
Update build.xml references to batik.
Modified Paths:
--------------
trunk/18xx/build.xml
Modified: trunk/18xx/build.xml
===================================================================
--- trunk/18xx/build.xml 2011-05-04 19:06:19 UTC (rev 1542)
+++ trunk/18xx/build.xml 2011-05-04 19:10:09 UTC (rev 1543)
@@ -16,8 +16,8 @@
<path id="18xx.classpath">
<pathelement location="classes"/>
<pathelement location="lib/log4j-1.2/log4j-1.2.14.jar"/>
- <pathelement location="lib/batik-1.6/batik-rasterizer.jar"/>
- <pathelement location="lib/batik-1.6/batik.jar"/>
+ <pathelement location="lib/batik-1.7/batik-rasterizer.jar"/>
+ <pathelement location="lib/batik-1.7/batik.jar"/>
<pathelement location="lib/jgraph5/jgraph.jar"/>
<pathelement location="lib/jgrapht-0.7.3/jgrapht-jdk1.5.jar"/>
<pathelement location="lib/junit_3.8.2/junit.jar"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-05-04 19:06:25
|
Revision: 1542
http://rails.svn.sourceforge.net/rails/?rev=1542&view=rev
Author: evos
Date: 2011-05-04 19:06:19 +0000 (Wed, 04 May 2011)
Log Message:
-----------
1856: added tiles #45 and #46 as valid upgrades for #25.
Modified Paths:
--------------
trunk/18xx/data/1856/TileSet.xml
Modified: trunk/18xx/data/1856/TileSet.xml
===================================================================
--- trunk/18xx/data/1856/TileSet.xml 2011-04-29 14:07:51 UTC (rev 1541)
+++ trunk/18xx/data/1856/TileSet.xml 2011-05-04 19:06:19 UTC (rev 1542)
@@ -99,7 +99,7 @@
<Upgrade id="42,43,46,47" />
</Tile>
<Tile id="25" quantity="1">
- <Upgrade id="40" />
+ <Upgrade id="40,45,46" />
</Tile>
<Tile id="26" quantity="1">
<Upgrade id="42,44,45" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-04-29 14:07:57
|
Revision: 1541
http://rails.svn.sourceforge.net/rails/?rev=1541&view=rev
Author: evos
Date: 2011-04-29 14:07:51 +0000 (Fri, 29 Apr 2011)
Log Message:
-----------
18TN: Enabled private purchase in first OR turn at fixed price.
Modified Paths:
--------------
trunk/18xx/rails/game/OperatingRound.java
trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java
trunk/18xx/rails/game/state/ArrayListState.java
Modified: trunk/18xx/rails/game/OperatingRound.java
===================================================================
--- trunk/18xx/rails/game/OperatingRound.java 2011-04-29 13:27:11 UTC (rev 1540)
+++ trunk/18xx/rails/game/OperatingRound.java 2011-04-29 14:07:51 UTC (rev 1541)
@@ -2426,8 +2426,9 @@
List<Player> players = getPlayers();
int numberOfPlayers = getNumberOfPlayers();
for (int i = currentPlayerIndex; i < currentPlayerIndex
- + numberOfPlayers; i++) {
+ + numberOfPlayers; i++) {
player = players.get(i % numberOfPlayers);
+ if (!maySellPrivate(player)) continue;
for (PrivateCompanyI privComp : player.getPortfolio().getPrivateCompanies()) {
// check to see if the private can be sold to a company
@@ -2536,6 +2537,10 @@
return maxPrice;
}
+ protected boolean maySellPrivate (Player player) {
+ return true;
+ }
+
protected void prepareRevenueAndDividendAction () {
// There is only revenue if there are any trains
Modified: trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java
===================================================================
--- trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java 2011-04-29 13:27:11 UTC (rev 1540)
+++ trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java 2011-04-29 14:07:51 UTC (rev 1541)
@@ -1,11 +1,15 @@
package rails.game.specific._18TN;
-import java.util.List;
+import java.util.*;
import rails.game.*;
+import rails.game.action.BuyPrivate;
+import rails.game.state.ArrayListState;
public class OperatingRound_18TN extends OperatingRound {
+ private ArrayListState<Player> playersSoldInOR1;
+
public OperatingRound_18TN (GameManagerI gameManager) {
super (gameManager);
}
@@ -41,5 +45,33 @@
List<PrivateCompanyI> privates = company.getPortfolio().getPrivateCompanies();
return privates != null && !privates.isEmpty();
}
+
+ protected boolean maySellPrivate (Player player) {
+ return gameManager.getAbsoluteORNumber() != 1
+ || !hasPlayerSoldInOR1(player);
+ }
+
+ private boolean hasPlayerSoldInOR1 (Player player) {
+ return playersSoldInOR1 != null && playersSoldInOR1.contains(player);
+ }
+ public boolean buyPrivate(BuyPrivate action) {
+
+ Player sellingPlayer = null;
+
+ if (gameManager.getAbsoluteORNumber() == 1) {
+ sellingPlayer = (Player)((Portfolio)action.getPrivateCompany().getHolder()).getOwner();
+ }
+
+ boolean result = super.buyPrivate(action);
+
+ if (result && gameManager.getAbsoluteORNumber() == 1) {
+ if (playersSoldInOR1 == null) playersSoldInOR1 = new ArrayListState<Player>("PlayersSoldPrivateInOR1");
+ if (!playersSoldInOR1.contains(sellingPlayer)) {
+ playersSoldInOR1.add(sellingPlayer);
+ }
+ }
+
+ return result;
+ }
}
Modified: trunk/18xx/rails/game/state/ArrayListState.java
===================================================================
--- trunk/18xx/rails/game/state/ArrayListState.java 2011-04-29 13:27:11 UTC (rev 1540)
+++ trunk/18xx/rails/game/state/ArrayListState.java 2011-04-29 14:07:51 UTC (rev 1541)
@@ -58,6 +58,10 @@
public void move (E element, int toIndex) {
if (remove (element)) add (toIndex, element);
}
+
+ public boolean contains (E element) {
+ return list.contains(element);
+ }
public void clear() {
for (E element:list) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-04-29 13:27:17
|
Revision: 1540
http://rails.svn.sourceforge.net/rails/?rev=1540&view=rev
Author: evos
Date: 2011-04-29 13:27:11 +0000 (Fri, 29 Apr 2011)
Log Message:
-----------
18TN: Enabled private purchase in first OR turn at fixed price.
Modified Paths:
--------------
trunk/18xx/rails/game/GameManager.java
trunk/18xx/rails/game/GameManagerI.java
trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java
Modified: trunk/18xx/rails/game/GameManager.java
===================================================================
--- trunk/18xx/rails/game/GameManager.java 2011-04-29 13:03:56 UTC (rev 1539)
+++ trunk/18xx/rails/game/GameManager.java 2011-04-29 13:27:11 UTC (rev 1540)
@@ -743,6 +743,10 @@
return String.valueOf(absoluteORNumber.intValue());
}
}
+
+ public int getAbsoluteORNumber () {
+ return absoluteORNumber.intValue();
+ }
/* (non-Javadoc)
* @see rails.game.GameManagerI#getCompositeORNumber()
Modified: trunk/18xx/rails/game/GameManagerI.java
===================================================================
--- trunk/18xx/rails/game/GameManagerI.java 2011-04-29 13:03:56 UTC (rev 1539)
+++ trunk/18xx/rails/game/GameManagerI.java 2011-04-29 13:27:11 UTC (rev 1540)
@@ -38,6 +38,7 @@
public String getORId ();
public abstract String getCompositeORNumber();
public int getRelativeORNumber();
+ public int getAbsoluteORNumber ();
public abstract int getSRNumber();
Modified: trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java
===================================================================
--- trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java 2011-04-29 13:03:56 UTC (rev 1539)
+++ trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java 2011-04-29 13:27:11 UTC (rev 1540)
@@ -11,31 +11,30 @@
}
protected boolean isPrivateSellingAllowed() {
- return getCurrentPhase().isPrivateSellingAllowed()
+ return super.isPrivateSellingAllowed()
// 18TN special
- || !operatingCompany.get().hasOperated() && !ownsPrivate(operatingCompany.get());
+ || gameManager.getAbsoluteORNumber() == 1
+ && !ownsPrivate(operatingCompany.get());
}
protected int getPrivateMinimumPrice (PrivateCompanyI privComp) {
- int minPrice = privComp.getLowerPrice();
- if (minPrice == PrivateCompanyI.NO_PRICE_LIMIT) {
- minPrice = 0;
- } else if (!operatingCompany.get().hasOperated()) {
+ if (gameManager.getAbsoluteORNumber() == 1
+ && !getCurrentPhase().isPrivateSellingAllowed()) {
// 18TN special
- minPrice = privComp.getBasePrice();
+ return privComp.getBasePrice();
+ } else {
+ return super.getPrivateMinimumPrice(privComp);
}
- return minPrice;
}
protected int getPrivateMaximumPrice (PrivateCompanyI privComp) {
- int maxPrice = privComp.getUpperPrice();
- if (maxPrice == PrivateCompanyI.NO_PRICE_LIMIT) {
- maxPrice = operatingCompany.get().getCash();
- } else if (!operatingCompany.get().hasOperated()) {
+ if (gameManager.getAbsoluteORNumber() == 1
+ && !getCurrentPhase().isPrivateSellingAllowed()) {
// 18TN special
- maxPrice = privComp.getBasePrice();
+ return privComp.getBasePrice();
+ } else {
+ return super.getPrivateMaximumPrice(privComp);
}
- return maxPrice;
}
private boolean ownsPrivate (PublicCompanyI company) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-04-29 13:04:02
|
Revision: 1539
http://rails.svn.sourceforge.net/rails/?rev=1539&view=rev
Author: evos
Date: 2011-04-29 13:03:56 +0000 (Fri, 29 Apr 2011)
Log Message:
-----------
18TN: Enabled private purchase in first OR turn at fixed price.
Modified Paths:
--------------
trunk/18xx/LocalisedText.properties
trunk/18xx/data/18TN/Game.xml
trunk/18xx/rails/game/OperatingRound.java
trunk/18xx/rails/ui/swing/ORUIManager.java
Added Paths:
-----------
trunk/18xx/rails/game/specific/_18TN/
trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java
Modified: trunk/18xx/LocalisedText.properties
===================================================================
--- trunk/18xx/LocalisedText.properties 2011-04-28 19:07:07 UTC (rev 1538)
+++ trunk/18xx/LocalisedText.properties 2011-04-29 13:03:56 UTC (rev 1539)
@@ -39,7 +39,7 @@
BUY_WHICH_PRIVATE=Buy which private?
BUY_WHICH_TRAIN=Buy which train?
# Note: in the next item, {0} MUST be in front
-BuyPrivatePrompt={0} from {1} for {2}...{3}
+BuyPrivatePrompt={0} from {1} for {2}
BankIsBrokenDisplayText=Bank is broken. Play continues until {0}
BankIsBrokenReportText=Bank is broken
gameOverPlaySetOfORs=the current set of operating rounds is finished.
Modified: trunk/18xx/data/18TN/Game.xml
===================================================================
--- trunk/18xx/data/18TN/Game.xml 2011-04-28 19:07:07 UTC (rev 1538)
+++ trunk/18xx/data/18TN/Game.xml 2011-04-29 13:03:56 UTC (rev 1539)
@@ -23,6 +23,7 @@
<StockRound>
<NoSaleInFirstSR/>
</StockRound>
+ <OperatingRound class="rails.game.specific._18TN.OperatingRound_18TN"/>
</GameParameters>
<EndOfGame>
<Bankruptcy/>
Modified: trunk/18xx/rails/game/OperatingRound.java
===================================================================
--- trunk/18xx/rails/game/OperatingRound.java 2011-04-28 19:07:07 UTC (rev 1538)
+++ trunk/18xx/rails/game/OperatingRound.java 2011-04-29 13:03:56 UTC (rev 1539)
@@ -2012,7 +2012,7 @@
lowerPrice = privateCompany.getLowerPrice();
// Is private buying allowed?
- if (!getCurrentPhase().isPrivateSellingAllowed()) {
+ if (!isPrivateSellingAllowed()) {
errMsg = LocalText.getText("PrivateBuyingIsNotAllowed");
break;
}
@@ -2417,7 +2417,7 @@
}
// Can private companies be bought?
- if (getCurrentPhase().isPrivateSellingAllowed()) {
+ if (isPrivateSellingAllowed()) {
// Create a list of players with the current one in front
int currentPlayerIndex = operatingCompany.get().getPresident().getIndex();
@@ -2430,24 +2430,14 @@
player = players.get(i % numberOfPlayers);
for (PrivateCompanyI privComp : player.getPortfolio().getPrivateCompanies()) {
- // start: br
-
// check to see if the private can be sold to a company
if (!privComp.tradeableToCompany()) {
continue;
}
- // changed so that Private companies know what prices they can be sold for
- minPrice = privComp.getLowerPrice();
- if (minPrice == PrivateCompanyI.NO_PRICE_LIMIT) {
- minPrice = 0;
- }
+ minPrice = getPrivateMinimumPrice (privComp);
- maxPrice = privComp.getUpperPrice();
- if (maxPrice == PrivateCompanyI.NO_PRICE_LIMIT) {
- maxPrice = operatingCompany.get().getCash();
- }
- // end: br
+ maxPrice = getPrivateMaximumPrice (privComp);
possibleActions.add(new BuyPrivate(privComp, minPrice,
maxPrice));
@@ -2526,6 +2516,26 @@
return true;
}
+ protected boolean isPrivateSellingAllowed() {
+ return getCurrentPhase().isPrivateSellingAllowed();
+ }
+
+ protected int getPrivateMinimumPrice (PrivateCompanyI privComp) {
+ int minPrice = privComp.getLowerPrice();
+ if (minPrice == PrivateCompanyI.NO_PRICE_LIMIT) {
+ minPrice = 0;
+ }
+ return minPrice;
+ }
+
+ protected int getPrivateMaximumPrice (PrivateCompanyI privComp) {
+ int maxPrice = privComp.getUpperPrice();
+ if (maxPrice == PrivateCompanyI.NO_PRICE_LIMIT) {
+ maxPrice = operatingCompany.get().getCash();
+ }
+ return maxPrice;
+ }
+
protected void prepareRevenueAndDividendAction () {
// There is only revenue if there are any trains
Added: trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java
===================================================================
--- trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java (rev 0)
+++ trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java 2011-04-29 13:03:56 UTC (rev 1539)
@@ -0,0 +1,46 @@
+package rails.game.specific._18TN;
+
+import java.util.List;
+
+import rails.game.*;
+
+public class OperatingRound_18TN extends OperatingRound {
+
+ public OperatingRound_18TN (GameManagerI gameManager) {
+ super (gameManager);
+ }
+
+ protected boolean isPrivateSellingAllowed() {
+ return getCurrentPhase().isPrivateSellingAllowed()
+ // 18TN special
+ || !operatingCompany.get().hasOperated() && !ownsPrivate(operatingCompany.get());
+ }
+
+ protected int getPrivateMinimumPrice (PrivateCompanyI privComp) {
+ int minPrice = privComp.getLowerPrice();
+ if (minPrice == PrivateCompanyI.NO_PRICE_LIMIT) {
+ minPrice = 0;
+ } else if (!operatingCompany.get().hasOperated()) {
+ // 18TN special
+ minPrice = privComp.getBasePrice();
+ }
+ return minPrice;
+ }
+
+ protected int getPrivateMaximumPrice (PrivateCompanyI privComp) {
+ int maxPrice = privComp.getUpperPrice();
+ if (maxPrice == PrivateCompanyI.NO_PRICE_LIMIT) {
+ maxPrice = operatingCompany.get().getCash();
+ } else if (!operatingCompany.get().hasOperated()) {
+ // 18TN special
+ maxPrice = privComp.getBasePrice();
+ }
+ return maxPrice;
+ }
+
+ private boolean ownsPrivate (PublicCompanyI company) {
+ List<PrivateCompanyI> privates = company.getPortfolio().getPrivateCompanies();
+ return privates != null && !privates.isEmpty();
+ }
+
+}
Property changes on: trunk/18xx/rails/game/specific/_18TN/OperatingRound_18TN.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/18xx/rails/ui/swing/ORUIManager.java
===================================================================
--- trunk/18xx/rails/ui/swing/ORUIManager.java 2011-04-28 19:07:07 UTC (rev 1538)
+++ trunk/18xx/rails/ui/swing/ORUIManager.java 2011-04-29 13:03:56 UTC (rev 1539)
@@ -1255,13 +1255,21 @@
String chosenOption;
BuyPrivate chosenAction = null;
int minPrice = 0, maxPrice = 0;
+ String priceRange;
for (BuyPrivate action : privates) {
+ minPrice = action.getMinimumPrice();
+ maxPrice = action.getMaximumPrice();
+ if (minPrice < maxPrice) {
+ priceRange = Bank.format(minPrice) + "..." + Bank.format(maxPrice);
+ } else {
+ priceRange = Bank.format(maxPrice);
+ }
+
privatesForSale.add(LocalText.getText("BuyPrivatePrompt",
action.getPrivateCompany().getName(),
action.getPrivateCompany().getPortfolio().getName(),
- Bank.format(action.getMinimumPrice()),
- Bank.format(action.getMaximumPrice()) ));
+ priceRange ));
}
if (privatesForSale.size() > 0) {
@@ -1276,21 +1284,24 @@
chosenAction = privates.get(index);
minPrice = chosenAction.getMinimumPrice();
maxPrice = chosenAction.getMaximumPrice();
- String price =
- JOptionPane.showInputDialog(orWindow,
- LocalText.getText("WHICH_PRIVATE_PRICE",
- chosenOption,
- Bank.format(minPrice),
- Bank.format(maxPrice) ),
- LocalText.getText("WHICH_PRICE"),
- JOptionPane.QUESTION_MESSAGE);
- try {
- amount = Integer.parseInt(price);
- } catch (NumberFormatException e) {
- amount = 0; // This will generally be refused.
+ if (minPrice < maxPrice) {
+ String price =
+ JOptionPane.showInputDialog(orWindow,
+ LocalText.getText("WHICH_PRIVATE_PRICE",
+ chosenOption,
+ Bank.format(minPrice),
+ Bank.format(maxPrice) ),
+ LocalText.getText("WHICH_PRICE"),
+ JOptionPane.QUESTION_MESSAGE);
+ try {
+ amount = Integer.parseInt(price);
+ } catch (NumberFormatException e) {
+ amount = 0; // This will generally be refused.
+ }
+ chosenAction.setPrice(amount);
+ } else {
+ chosenAction.setPrice(maxPrice);
}
- chosenAction.setPrice(amount);
-
if (orWindow.process(chosenAction)) {
updateMessage();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-04-28 19:07:14
|
Revision: 1538
http://rails.svn.sourceforge.net/rails/?rev=1538&view=rev
Author: evos
Date: 2011-04-28 19:07:07 +0000 (Thu, 28 Apr 2011)
Log Message:
-----------
1830 Coalfields+Reading
Modified Paths:
--------------
trunk/18xx/data/1830/CompanyManager.xml
trunk/18xx/data/1830/Game.xml
trunk/18xx/data/1830/Map.xml
trunk/18xx/data/1830/TileSet.xml
trunk/18xx/data/GamesList.xml
Modified: trunk/18xx/data/1830/CompanyManager.xml
===================================================================
--- trunk/18xx/data/1830/CompanyManager.xml 2011-04-27 22:45:34 UTC (rev 1537)
+++ trunk/18xx/data/1830/CompanyManager.xml 2011-04-28 19:07:07 UTC (rev 1538)
@@ -71,39 +71,21 @@
<!-- Note two supported colour specification formats:
RGB decimal with commas and RGB hexadecimal without commas -->
+ <Company name="B&M" type="Public" tokens="2" fgColour="000000" bgColour="60E060"
+ longname="Boston & Maine">
+ <Home hex="E23"/>
+ </Company>
<Company name="B&O" type="Public" tokens="3" fgColour="255,255,255" bgColour="0,0,255"
longname="Baltimore & Ohio">
<FirstTrainCloses type="Private" name="B&O"/>
<Home hex="I15"/>
</Company>
- <Company name="PRR" type="Public" tokens="4" fgColour="FFFFFF" bgColour="008000"
- longname="Pennsylvania Railroad">
- <Home hex="H12"/>
- </Company>
- <Company name="NYNH" type="Public" tokens="2" fgColour="000000" bgColour="FF8000"
- longname="New York, New Haven & Hartford">
- <Home hex="G19" city="2"/>
- </Company>
- <Company name="NYC" type="Public" tokens="4" fgColour="FFFFFF" bgColour="000000"
- longname="New York Central">
- <Home hex="E19"/>
- </Company>
- <Company name="Erie" type="Public" tokens="3" fgColour="000000" bgColour="FFFF00"
- longname="Erie Railroad">
- <!-- city = 0 implies that this is not yet decided (OO-tiles), blocks means that
- in each city one slot has to be available -->
- <Home hex="E11" city="0" allCitiesBlocked="yes"/>
- </Company>
- <Company name="B&M" type="Public" tokens="2" fgColour="000000" bgColour="60E060"
- longname="Boston & Maine">
- <Home hex="E23"/>
- </Company>
<Company name="C&O" type="Public" tokens="3" fgColour="000000" bgColour="A0E0FF"
longname="Chesapeake & Ohio">
<IfOption name="Variant" value="Basegame,Pere Marquette">
<Home hex="F6"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Home hex="K13"/>
</IfOption>
</Company>
@@ -111,19 +93,37 @@
longname="Canadian Pacific Railroad">
<Home hex="A19"/>
</Company>
+ <Company name="Erie" type="Public" tokens="3" fgColour="000000" bgColour="FFFF00"
+ longname="Erie Railroad">
+ <!-- city = 0 implies that this is not yet decided (OO-tiles), blocks means that
+ in each city one slot has to be available -->
+ <Home hex="E11" city="0" allCitiesBlocked="yes"/>
+ </Company>
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
+ <Company name="N&W" type="Public" tokens="3" fgColour="FFFF00" bgColour="000080"
+ longname="Norfolk & Western">
+ <Home hex="L16" city="0" allCitiesBlocked="yes" />
+ </Company>
+ </IfOption>
+ <Company name="NYC" type="Public" tokens="4" fgColour="FFFFFF" bgColour="000000"
+ longname="New York Central">
+ <Home hex="E19"/>
+ </Company>
+ <Company name="NYNH" type="Public" tokens="2" fgColour="000000" bgColour="FF8000"
+ longname="New York, New Haven & Hartford">
+ <Home hex="G19" city="2"/>
+ </Company>
<IfOption name="Variant" value="Pere Marquette">
<Company name="PM" type="Public" tokens="3" fgColour="FFFF00" bgColour="000080"
longname="Pere Marquette">
<Home hex="E5" city="0" allCitiesBlocked="yes" />
</Company>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
- <Company name="N&W" type="Public" tokens="3" fgColour="FFFF00" bgColour="000080"
- longname="Norfolk & Western">
- <Home hex="L16" city="0" allCitiesBlocked="yes" />
- </Company>
- </IfOption>
- <IfOption name="Variant" value="Reading">
+ <Company name="PRR" type="Public" tokens="4" fgColour="FFFFFF" bgColour="008000"
+ longname="Pennsylvania Railroad">
+ <Home hex="H12"/>
+ </Company>
+ <IfOption name="Variant" value="Reading,Coalfields&Reading">
<Company name="RDG" type="Public" tokens="2" fgColour="000000" bgColour="C8F526"
longname="Reading Railroad">
<Home hex="H14"/>
Modified: trunk/18xx/data/1830/Game.xml
===================================================================
--- trunk/18xx/data/1830/Game.xml 2011-04-27 22:45:34 UTC (rev 1537)
+++ trunk/18xx/data/1830/Game.xml 2011-04-28 19:07:07 UTC (rev 1538)
@@ -15,7 +15,7 @@
<!-- The options in Game.xml are not currently used.
See GamesList.xml for the real ones.
-->
- <GameOption name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading" default="Basegame" />
+ <GameOption name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading" 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" />
@@ -80,9 +80,21 @@
<Players number="5" cash="480" certLimit="14"/>
<Players number="6" cash="400" certLimit="12"/>
</IfOption>
+ <IfOption name="Variant" value="Coalfields&Reading">
+ <Players number="2" cash="1200" certLimit="30"/>
+ <Players number="3" cash="800" certLimit="22"/>
+ <Players number="4" cash="600" certLimit="18"/>
+ <Players number="5" cash="480" certLimit="15"/>
+ <Players number="6" cash="400" certLimit="13"/>
+ </IfOption>
</Component>
<Component name="Bank" class="rails.game.Bank">
- <Bank amount="12000"/>
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields,Reading">
+ <Bank amount="12000"/>
+ </IfOption>
+ <IfOption name="Variant" value="Coalfields&Reading">
+ <Bank amount="20000"/>
+ </IfOption>
<Money format="$@"/>
</Component>
<Component name="TileManager" class="rails.game.TileManager"
@@ -109,12 +121,12 @@
-->
</Defaults>
<Train name="2" majorStops="2" cost="80" amount="6">
- <IfOption name="Variant" value="Coalfields,Reading">
+ <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Attributes obsoleting="yes"/>
</IfOption>
</Train>
<Train name="3" majorStops="3" cost="180" amount="5" startPhase="3">
- <IfOption name="Variant" value="Coalfields,Reading">
+ <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Attributes obsoleting="yes"/>
</IfOption>
</Train>
@@ -123,6 +135,9 @@
<IfOption name="Variant" value="Coalfields,Reading">
<Attributes obsoleting="yes" amount="5"/>
</IfOption>
+ <IfOption name="Variant" value="Coalfields&Reading">
+ <Attributes obsoleting="yes" amount="6"/>
+ </IfOption>
</Train>
<Train name="5" majorStops="5" cost="450" amount="3" startPhase="5"/>
<Train name="6" majorStops="6" cost="630" startPhase="6"
@@ -136,8 +151,11 @@
<IfOption name="Variant" value="Pere Marquette,Coalfields,Reading">
<Attributes amount="3" releasedTrain="7,D"/>
</IfOption>
+ <IfOption name="Variant" value="Coalfields&Reading">
+ <Attributes amount="4" releasedTrain="7,D"/>
+ </IfOption>
</Train>
- <IfOption name="Variant" value="Coalfields,Reading">
+ <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Train name="7" majorStops="7" cost="710" amount="2"/>
</IfOption>
<Train name="D" majorStops="99" startPhase="D" rustedTrain="4">
@@ -145,7 +163,7 @@
<Attributes cost="1100"/>
<Exchange cost="800"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields,Reading">
+ <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Attributes cost="900"/>
<Exchange cost="750"/>
</IfOption>
Modified: trunk/18xx/data/1830/Map.xml
===================================================================
--- trunk/18xx/data/1830/Map.xml 2011-04-27 22:45:34 UTC (rev 1537)
+++ trunk/18xx/data/1830/Map.xml 2011-04-28 19:07:07 UTC (rev 1538)
@@ -35,7 +35,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette">
<Hex name="D24" tile="-7" orientation="2"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields,Reading">
+ <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Hex name="D24" tile="-30001"/>
</IfOption>
<Hex name="E3" tile="0"/>
@@ -52,7 +52,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Hex name="F2" tile="-903" orientation="5" value="40,70" city="Chicago"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Hex name="F2" tile="-939" orientation="5" value="40,70" city="Chicago"/>
</IfOption>
<Hex name="F4" tile="-10" cost="80"/>
@@ -66,7 +66,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Hex name="F20" tile="-2"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Hex name="F20" tile="-10"/>
</IfOption>
<Hex name="F22" tile="-10" cost="80"/>
@@ -88,13 +88,13 @@
<IfOption name="Variant" value="Basegame,Pere Marquette">
<Hex name="H12" tile="-101" city="Altoona"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields,Reading">
+ <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Hex name="H12" tile="-30003" pic="-30002" city="Altoona"/>
</IfOption>
<IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields">
<Hex name="H14" tile="0"/>
</IfOption>
- <IfOption name="Variant" value="Reading">
+ <IfOption name="Variant" value="Reading,Coalfields&Reading">
<Hex name="H14" tile="-30007" pic="-30006" city="Reading"/>
</IfOption>
@@ -103,7 +103,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Hex name="I1" tile="-901" orientation="5" value="30,60" city="Gulf"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Hex name="I1" tile="0"/>
</IfOption>
<Hex name="I3" tile="0"/>
@@ -118,7 +118,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Hex name="J2" tile="-902" orientation="5" value="30,60" city="Gulf"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Hex name="J2" tile="0"/>
</IfOption>
<Hex name="J4" tile="0"/>
@@ -135,7 +135,7 @@
<Hex name="K13" tile="-903" orientation="4" value="30,40" city="Deep South"/>
<Hex name="K15" tile="-30005" value="20" city="Norfolk"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Hex name="K1" tile="-908"/>
<Hex name="K3" tile="-10" city="Lexington"/>
<Hex name="K5" tile="0"/>
Modified: trunk/18xx/data/1830/TileSet.xml
===================================================================
--- trunk/18xx/data/1830/TileSet.xml 2011-04-27 22:45:34 UTC (rev 1537)
+++ trunk/18xx/data/1830/TileSet.xml 2011-04-28 19:07:07 UTC (rev 1538)
@@ -19,7 +19,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette">
<Upgrade id="53"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields,Reading">
+ <IfOption name="Variant" value="Coalfields,Reading,Coalfields&Reading">
<Upgrade id="2053"/>
</IfOption>
</Tile>
@@ -48,12 +48,12 @@
<!-- Yellow tiles -->
<Tile id="1" quantity="1">
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Upgrade id="1717" hex="G17" />
</IfOption>
</Tile>
<Tile id="2" quantity="1">
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Upgrade id="1717" hex="G17" />
</IfOption>
</Tile>
@@ -69,12 +69,12 @@
<Upgrade id="18,19,20,23,24,26,27" />
</Tile>
<Tile id="55" quantity="1">
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Upgrade id="1717" hex="G17" />
</IfOption>
</Tile>
<Tile id="56" quantity="1">
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Upgrade id="1717" hex="G17" />
</IfOption>
</Tile>
@@ -82,14 +82,14 @@
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Attributes quantity="4"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Attributes quantity="6"/>
</IfOption>
<Upgrade id="14,15" />
</Tile>
<Tile id="58" quantity="2" />
<Tile id="69" quantity="1">
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Upgrade id="1717" hex="G17" />
</IfOption>
</Tile>
@@ -99,7 +99,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Attributes quantity="3"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Attributes quantity="4"/>
</IfOption>
<Upgrade id="63" />
@@ -108,7 +108,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Attributes quantity="2"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Attributes quantity="3"/>
</IfOption>
<Upgrade id="63" />
@@ -156,7 +156,7 @@
<Upgrade id="1061"/>
</Tile>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Tile id="2053" extId="53" quantity="2">
<Upgrade id="1061" hex="E23" />
<Upgrade id="2061" hex="I15" />
@@ -166,7 +166,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Upgrade id="62" />
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Upgrade id="1062" extId="62"/>
</IfOption>
</Tile>
@@ -190,21 +190,21 @@
<IfOption name="Variant" value="Reading">
<Tile id="1061" quantity="2" />
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Tile id="1061" extId="61" quantity="1" />
<Tile id="2061" extId="BA" quantity="1" />
</IfOption>
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Tile id="62" quantity="1" />
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Tile id="1062" extId="62" quantity="1" />
</IfOption>
<Tile id="63">
<IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Attributes quantity="3"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Attributes quantity="4"/>
</IfOption>
</Tile>
@@ -214,7 +214,7 @@
<Tile id="67" quantity="1" />
<Tile id="68" quantity="1" />
<Tile id="70" quantity="1" />
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Coalfields&Reading">
<Tile id="1717" extId="G17" quantity="1" />
</IfOption>
</TileManager>
\ No newline at end of file
Modified: trunk/18xx/data/GamesList.xml
===================================================================
--- trunk/18xx/data/GamesList.xml 2011-04-27 22:45:34 UTC (rev 1537)
+++ trunk/18xx/data/GamesList.xml 2011-04-28 19:07:07 UTC (rev 1538)
@@ -28,7 +28,7 @@
- optionally, a default value (only affects a toggle;
in a dropdown the first item is always the default).
-->
- <Option name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading" default="Basegame" />
+ <Option name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading,Coalfields&Reading" default="Basegame" />
<Option name="RouteAwareness" values="Highlight,Deactivate" default="Highlight" />
<Option name="RevenueCalculation" values="Suggest,Deactivate" default="Suggest" />
<Option name="NoMapMode" type="toggle" default="no" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-04-27 22:45:41
|
Revision: 1537
http://rails.svn.sourceforge.net/rails/?rev=1537&view=rev
Author: evos
Date: 2011-04-27 22:45:34 +0000 (Wed, 27 Apr 2011)
Log Message:
-----------
Added 1830 Reading variant XML files (contribution from Scott Petersen)
Modified Paths:
--------------
trunk/18xx/data/1830/CompanyManager.xml
trunk/18xx/data/1830/Game.xml
trunk/18xx/data/1830/Map.xml
trunk/18xx/data/1830/TileSet.xml
trunk/18xx/data/1830/Tiles.xml
trunk/18xx/data/GamesList.xml
trunk/18xx/rails/util/MakeGameTileSets.java
trunk/18xx/tiles/TileDictionary.18t
trunk/18xx/tiles/TileDictionary.xml
trunk/18xx/tiles/Tiles.xml
Added Paths:
-----------
trunk/18xx/tiles/svg/tile-30006.svg
trunk/18xx/tiles/svg/tile-30007.svg
Modified: trunk/18xx/data/1830/CompanyManager.xml
===================================================================
--- trunk/18xx/data/1830/CompanyManager.xml 2011-04-27 19:58:09 UTC (rev 1536)
+++ trunk/18xx/data/1830/CompanyManager.xml 2011-04-27 22:45:34 UTC (rev 1537)
@@ -123,6 +123,14 @@
<Home hex="L16" city="0" allCitiesBlocked="yes" />
</Company>
</IfOption>
+ <IfOption name="Variant" value="Reading">
+ <Company name="RDG" type="Public" tokens="2" fgColour="000000" bgColour="C8F526"
+ longname="Reading Railroad">
+ <Home hex="H14"/>
+ <Certificate type="President" shares="3"/>
+ <Certificate shares="1" number="7"/>
+ </Company>
+ </IfOption>
<StartPacket roundClass="rails.game.StartRound_1830">
<Bidding initial="5" minimum="5" increment="1"/>
@@ -131,7 +139,12 @@
<Item name="D&H" type="Private" basePrice="70"/>
<Item name="M&H" type="Private" basePrice="110"/>
<Item name="C&A" type="Private" basePrice="160">
+ <IfOption name="C&ACertificate(ReadingOnly)" value="PRR">
<SubItem name="PRR" type="Public" />
+ </IfOption>
+ <IfOption name="C&ACertificate(ReadingOnly)" value="RDG">
+ <SubItem name="RDG" type="Public" />
+ </IfOption>
</Item>
<Item name="B&O" type="Private" basePrice="220">
<SubItem name="B&O" type="Public" president="yes"/>
Modified: trunk/18xx/data/1830/Game.xml
===================================================================
--- trunk/18xx/data/1830/Game.xml 2011-04-27 19:58:09 UTC (rev 1536)
+++ trunk/18xx/data/1830/Game.xml 2011-04-27 22:45:34 UTC (rev 1537)
@@ -15,7 +15,7 @@
<!-- The options in Game.xml are not currently used.
See GamesList.xml for the real ones.
-->
- <GameOption name="Variant" values="Basegame,Pere Marquette,Coalfields" default="Basegame" />
+ <GameOption name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading" 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" />
@@ -26,6 +26,8 @@
<GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/>
<GameOption name="TwoPlayersCertLimit70Percent" type="toggle" default="yes"/>
<GameOption name="SeparateSalesAtSamePrice" type="toggle" default="yes"/>
+ <GameOption name="C&ACertificate(ReadingOnly)" values="PRR,RDG" default="PRR"/>
+
<GameParameters>
<PlayerShareLimit percentage="60">
<!-- Option "NumberOfPlayers" is automatically set
@@ -48,7 +50,7 @@
</EndOfGame>
</Component>
<Component name="PlayerManager" class="rails.game.PlayerManager">
- <IfOption name="Variant" value="Basegame,">
+ <IfOption name="Variant" value="Basegame">
<Players number="2" cash="1200" certLimit="28"/>
<Players number="3" cash="800" certLimit="20"/>
<Players number="4" cash="600" certLimit="16"/>
@@ -71,6 +73,13 @@
<Players number="6" cash="400" certLimit="12"/>
<Players number="7" cash="360" certLimit="11"/>
</IfOption>
+ <IfOption name="Variant" value="Reading">
+ <Players number="2" cash="1200" certLimit="29"/>
+ <Players number="3" cash="800" certLimit="21"/>
+ <Players number="4" cash="600" certLimit="17"/>
+ <Players number="5" cash="480" certLimit="14"/>
+ <Players number="6" cash="400" certLimit="12"/>
+ </IfOption>
</Component>
<Component name="Bank" class="rails.game.Bank">
<Bank amount="12000"/>
@@ -100,18 +109,18 @@
-->
</Defaults>
<Train name="2" majorStops="2" cost="80" amount="6">
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Reading">
<Attributes obsoleting="yes"/>
</IfOption>
</Train>
<Train name="3" majorStops="3" cost="180" amount="5" startPhase="3">
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Reading">
<Attributes obsoleting="yes"/>
</IfOption>
</Train>
<Train name="4" majorStops="4" cost="300" amount="4" startPhase="4"
rustedTrain="2">
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Reading">
<Attributes obsoleting="yes" amount="5"/>
</IfOption>
</Train>
@@ -124,11 +133,11 @@
<IfOption name="WithOptional6Train" value="no">
<Attributes amount="2"/>
</IfOption>
- <IfOption name="Variant" value="Pere Marquette,Coalfields">
+ <IfOption name="Variant" value="Pere Marquette,Coalfields,Reading">
<Attributes amount="3" releasedTrain="7,D"/>
</IfOption>
</Train>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Reading">
<Train name="7" majorStops="7" cost="710" amount="2"/>
</IfOption>
<Train name="D" majorStops="99" startPhase="D" rustedTrain="4">
@@ -136,7 +145,7 @@
<Attributes cost="1100"/>
<Exchange cost="800"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Reading">
<Attributes cost="900"/>
<Exchange cost="750"/>
</IfOption>
Modified: trunk/18xx/data/1830/Map.xml
===================================================================
--- trunk/18xx/data/1830/Map.xml 2011-04-27 19:58:09 UTC (rev 1536)
+++ trunk/18xx/data/1830/Map.xml 2011-04-27 22:45:34 UTC (rev 1537)
@@ -35,7 +35,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette">
<Hex name="D24" tile="-7" orientation="2"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Reading">
<Hex name="D24" tile="-30001"/>
</IfOption>
<Hex name="E3" tile="0"/>
@@ -49,7 +49,7 @@
<Hex name="E19" tile="-10"/>
<Hex name="E21" tile="0" cost="120"/>
<Hex name="E23" tile="-11" orientation="5" label="B" city="Boston"/>
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Hex name="F2" tile="-903" orientation="5" value="40,70" city="Chicago"/>
</IfOption>
<IfOption name="Variant" value="Coalfields">
@@ -63,7 +63,7 @@
<Hex name="F14" tile="0"/>
<Hex name="F16" tile="-10" cost="120"/>
<Hex name="F18" tile="0"/>
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Hex name="F20" tile="-2"/>
</IfOption>
<IfOption name="Variant" value="Coalfields">
@@ -88,13 +88,19 @@
<IfOption name="Variant" value="Basegame,Pere Marquette">
<Hex name="H12" tile="-101" city="Altoona"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Reading">
<Hex name="H12" tile="-30003" pic="-30002" city="Altoona"/>
</IfOption>
- <Hex name="H14" tile="0"/>
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Coalfields">
+ <Hex name="H14" tile="0"/>
+ </IfOption>
+ <IfOption name="Variant" value="Reading">
+ <Hex name="H14" tile="-30007" pic="-30006" city="Reading"/>
+ </IfOption>
+
<Hex name="H16" tile="-10"/>
<Hex name="H18" tile="-20" label="OO"/>
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Hex name="I1" tile="-901" orientation="5" value="30,60" city="Gulf"/>
</IfOption>
<IfOption name="Variant" value="Coalfields">
@@ -109,7 +115,7 @@
<Hex name="I15" tile="-11" label="B" city="Baltimore"/>
<Hex name="I17" tile="0" cost="80"/>
<Hex name="I19" tile="-3" orientation="2"/>
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Hex name="J2" tile="-902" orientation="5" value="30,60" city="Gulf"/>
</IfOption>
<IfOption name="Variant" value="Coalfields">
@@ -125,6 +131,10 @@
<Hex name="K13" tile="-902" orientation="4" value="30,40" city="Deep South"/>
<Hex name="K15" tile="-104" orientation="3"/>
</IfOption>
+ <IfOption name="Variant" value="Reading">
+ <Hex name="K13" tile="-903" orientation="4" value="30,40" city="Deep South"/>
+ <Hex name="K15" tile="-30005" value="20" city="Norfolk"/>
+ </IfOption>
<IfOption name="Variant" value="Coalfields">
<Hex name="K1" tile="-908"/>
<Hex name="K3" tile="-10" city="Lexington"/>
Modified: trunk/18xx/data/1830/TileSet.xml
===================================================================
--- trunk/18xx/data/1830/TileSet.xml 2011-04-27 19:58:09 UTC (rev 1536)
+++ trunk/18xx/data/1830/TileSet.xml 2011-04-27 22:45:34 UTC (rev 1537)
@@ -19,7 +19,7 @@
<IfOption name="Variant" value="Basegame,Pere Marquette">
<Upgrade id="53"/>
</IfOption>
- <IfOption name="Variant" value="Coalfields">
+ <IfOption name="Variant" value="Coalfields,Reading">
<Upgrade id="2053"/>
</IfOption>
</Tile>
@@ -44,6 +44,7 @@
<Tile id="-30003" pic="-30002"/><!-- Coalfields: Altoona -->
<Tile id="-30004"/><!-- Coalfields: Coalfields -->
<Tile id="-30005"/><!-- Coalfields: Norfolk -->
+ <Tile id="-30007" pic="-30006"/><!-- Reading: Reading-->
<!-- Yellow tiles -->
<Tile id="1" quantity="1">
@@ -78,7 +79,7 @@
</IfOption>
</Tile>
<Tile id="57">
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Attributes quantity="4"/>
</IfOption>
<IfOption name="Variant" value="Coalfields">
@@ -95,7 +96,7 @@
<!-- Green tiles -->
<Tile id="14">
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Attributes quantity="3"/>
</IfOption>
<IfOption name="Variant" value="Coalfields">
@@ -104,7 +105,7 @@
<Upgrade id="63" />
</Tile>
<Tile id="15" quantity="2">
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Attributes quantity="2"/>
</IfOption>
<IfOption name="Variant" value="Coalfields">
@@ -150,6 +151,11 @@
<Upgrade id="61" />
</Tile>
</IfOption>
+ <IfOption name="Variant" value="Reading">
+ <Tile id="2053" quantity="2" >
+ <Upgrade id="1061"/>
+ </Tile>
+ </IfOption>
<IfOption name="Variant" value="Coalfields">
<Tile id="2053" extId="53" quantity="2">
<Upgrade id="1061" hex="E23" />
@@ -157,7 +163,7 @@
</Tile>
</IfOption>
<Tile id="54" quantity="1">
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Upgrade id="62" />
</IfOption>
<IfOption name="Variant" value="Coalfields">
@@ -181,18 +187,21 @@
<IfOption name="Variant" value="Basegame,Pere Marquette">
<Tile id="61" quantity="2" />
</IfOption>
+ <IfOption name="Variant" value="Reading">
+ <Tile id="1061" quantity="2" />
+ </IfOption>
<IfOption name="Variant" value="Coalfields">
<Tile id="1061" extId="61" quantity="1" />
<Tile id="2061" extId="BA" quantity="1" />
</IfOption>
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Tile id="62" quantity="1" />
</IfOption>
<IfOption name="Variant" value="Coalfields">
<Tile id="1062" extId="62" quantity="1" />
</IfOption>
<Tile id="63">
- <IfOption name="Variant" value="Basegame,Pere Marquette">
+ <IfOption name="Variant" value="Basegame,Pere Marquette,Reading">
<Attributes quantity="3"/>
</IfOption>
<IfOption name="Variant" value="Coalfields">
@@ -208,4 +217,4 @@
<IfOption name="Variant" value="Coalfields">
<Tile id="1717" extId="G17" quantity="1" />
</IfOption>
-</TileManager>
+</TileManager>
\ No newline at end of file
Modified: trunk/18xx/data/1830/Tiles.xml
===================================================================
--- trunk/18xx/data/1830/Tiles.xml 2011-04-27 19:58:09 UTC (rev 1536)
+++ trunk/18xx/data/1830/Tiles.xml 2011-04-27 22:45:34 UTC (rev 1537)
@@ -119,6 +119,17 @@
<Track from="city1" gauge="normal" to="side4"/>
<Track from="city1" gauge="normal" to="side5"/>
</Tile>
+ <Tile colour="fixed" id="-30007" name="Reading intern">
+ <Station id="city1" position="052" slots="1" type="City" value="10"/>
+ <Track from="side4" gauge="normal" to="side1"/>
+ <Track from="side4" gauge="normal" to="side2"/>
+ <Track from="side1" gauge="normal" to="side3"/>
+ <Track from="side3" gauge="normal" to="side2"/>
+ <Track from="side4" gauge="normal" to="city1"/>
+ <Track from="side3" gauge="normal" to="city1"/>
+ <Track from="side1" gauge="normal" to="city1"/>
+ <Track from="side2" gauge="normal" to="city1"/>
+ </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"/>
Modified: trunk/18xx/data/GamesList.xml
===================================================================
--- trunk/18xx/data/GamesList.xml 2011-04-27 19:58:09 UTC (rev 1536)
+++ trunk/18xx/data/GamesList.xml 2011-04-27 22:45:34 UTC (rev 1537)
@@ -28,7 +28,7 @@
- optionally, a default value (only affects a toggle;
in a dropdown the first item is always the default).
-->
- <Option name="Variant" values="Basegame,Pere Marquette,Coalfields" default="Basegame" />
+ <Option name="Variant" values="Basegame,Pere Marquette,Coalfields,Reading" default="Basegame" />
<Option name="RouteAwareness" values="Highlight,Deactivate" default="Highlight" />
<Option name="RevenueCalculation" values="Suggest,Deactivate" default="Suggest" />
<Option name="NoMapMode" type="toggle" default="no" />
@@ -37,6 +37,7 @@
<Option name="UnlimitedTiles" type="toggle" default="no"/>
<Option name="LeaveAuctionOnPass" type="toggle" default="no"/>
<Option name="TwoPlayersCertLimit70Percent" type="toggle" default="no"/>
+ <Option name="C&ACertificate(ReadingOnly)" values="PRR,RDG" default="PRR" ></Option>
<Option name="SeparateSalesAtSamePrice" type="toggle" default="yes"/>
<Players minimum="2" maximum="6"/>
</Game>
Modified: trunk/18xx/rails/util/MakeGameTileSets.java
===================================================================
--- trunk/18xx/rails/util/MakeGameTileSets.java 2011-04-27 19:58:09 UTC (rev 1536)
+++ trunk/18xx/rails/util/MakeGameTileSets.java 2011-04-27 22:45:34 UTC (rev 1537)
@@ -120,11 +120,14 @@
for (int i = 0; i < tiles.getLength(); i++) {
tileName = ((Element) tiles.item(i)).getAttribute("id");
- System.out.println("Tile "+tileName);
// Save the tile in a Map so that we can check completeness
// later.
+ // If we already have it, skip
+ if (tilesInSet.containsKey(tileName)) continue;
tilesInSet.put(tileName, null);
+ System.out.println("Tile "+tileName);
+
// Get the Tile specification
Element tileSpec = (Element) tileMap.get(tileName);
if (tileSpec != null) {
Modified: trunk/18xx/tiles/TileDictionary.18t
===================================================================
(Binary files differ)
Modified: trunk/18xx/tiles/TileDictionary.xml
===================================================================
--- trunk/18xx/tiles/TileDictionary.xml 2011-04-27 19:58:09 UTC (rev 1536)
+++ trunk/18xx/tiles/TileDictionary.xml 2011-04-27 22:45:34 UTC (rev 1537)
@@ -23527,4 +23527,100 @@
</connection>
</connections>
</tile>
+ <tile>
+ <ID>-30006</ID>
+ <shape>tsHexagon</shape>
+ <level>tlMapFixed</level>
+ <name>Reading</name>
+ <junctions>
+ <junction>
+ <junType>jtCity</junType>
+ <position>tp2CornerA</position>
+ <revenue>
+ <value>10</value>
+ <position>tp3CornerB</position>
+ </revenue>
+ </junction>
+ </junctions>
+ <connections>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideE</position1>
+ <position2>tp4SideB</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideE</position1>
+ <position2>tp4SideC</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideB</position1>
+ <position2>tp4SideD</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideD</position1>
+ <position2>tp4SideC</position2>
+ </connection>
+ </connections>
+ </tile>
+ <tile>
+ <ID>-30007</ID>
+ <shape>tsHexagon</shape>
+ <level>tlMapFixed</level>
+ <name>Reading intern</name>
+ <junctions>
+ <junction>
+ <junType>jtCity</junType>
+ <position>tp2CornerA</position>
+ <revenue>
+ <value>10</value>
+ <position>tp3CornerB</position>
+ </revenue>
+ </junction>
+ </junctions>
+ <connections>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideE</position1>
+ <position2>tp4SideB</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideE</position1>
+ <position2>tp4SideC</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideB</position1>
+ <position2>tp4SideD</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideD</position1>
+ <position2>tp4SideC</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideE</position1>
+ <position2>tp2CornerA</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideD</position1>
+ <position2>tp2CornerA</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideB</position1>
+ <position2>tp2CornerA</position2>
+ </connection>
+ <connection>
+ <conType>ctNormal</conType>
+ <position1>tp4SideC</position1>
+ <position2>tp2CornerA</position2>
+ </connection>
+ </connections>
+ </tile>
</tiles>
\ No newline at end of file
Modified: trunk/18xx/tiles/Tiles.xml
===================================================================
--- trunk/18xx/tiles/Tiles.xml 2011-04-27 19:58:09 UTC (rev 1536)
+++ trunk/18xx/tiles/Tiles.xml 2011-04-27 22:45:34 UTC (rev 1537)
@@ -4128,4 +4128,22 @@
<Track from="city1" gauge="normal" to="side3"/>
<Track from="city1" gauge="normal" to="side4"/>
</Tile>
+ <Tile colour="fixed" id="-30006" name="Reading">
+ <Station id="city1" position="052" slots="1" type="City" value="10"/>
+ <Track from="side4" gauge="normal" to="side1"/>
+ <Track from="side4" gauge="normal" to="side2"/>
+ <Track from="side1" gauge="normal" to="side3"/>
+ <Track from="side3" gauge="normal" to="side2"/>
+ </Tile>
+ <Tile colour="fixed" id="-30007" name="Reading intern">
+ <Station id="city1" position="052" slots="1" type="City" value="10"/>
+ <Track from="side4" gauge="normal" to="side1"/>
+ <Track from="side4" gauge="normal" to="side2"/>
+ <Track from="side1" gauge="normal" to="side3"/>
+ <Track from="side3" gauge="normal" to="side2"/>
+ <Track from="side4" gauge="normal" to="city1"/>
+ <Track from="side3" gauge="normal" to="city1"/>
+ <Track from="side1" gauge="normal" to="city1"/>
+ <Track from="side2" gauge="normal" to="city1"/>
+ </Tile>
</Tiles>
\ No newline at end of file
Added: trunk/18xx/tiles/svg/tile-30006.svg
===================================================================
--- trunk/18xx/tiles/svg/tile-30006.svg (rev 0)
+++ trunk/18xx/tiles/svg/tile-30006.svg 2011-04-27 22:45:34 UTC (rev 1537)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#C0C0C0" stroke="#C0C0C0" stroke-width="1" stroke-linejoin="round"/><circle cx="147" cy="85" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><path d="M 49,255 L 343,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,255 A 294,294 0 0,0 49,255" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,85 A 294,294 0 0,0 196,340" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,255 A 98,98 0 0,0 196,340" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 49,255 L 343,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,255 A 294,294 0 0,0 49,255" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,85 A 294,294 0 0,0 196,340" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,255 A 98,98 0 0,0 196,340" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><circle cx="147" cy="85" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="269" cy="43" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="269" y="43" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">10</text><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
Added: trunk/18xx/tiles/svg/tile-30007.svg
===================================================================
--- trunk/18xx/tiles/svg/tile-30007.svg (rev 0)
+++ trunk/18xx/tiles/svg/tile-30007.svg 2011-04-27 22:45:34 UTC (rev 1537)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="#C0C0C0" stroke="#C0C0C0" stroke-width="1" stroke-linejoin="round"/><circle cx="147" cy="85" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><path d="M 49,255 L 343,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,255 A 294,294 0 0,0 49,255" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,85 A 294,294 0 0,0 196,340" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,255 A 98,98 0 0,0 196,340" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 49,255 A 98,98 0 0,0 98,170 A 98,98 0 0,1 147,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,340 A 98,98 0 0,0 147,255 A 98,98 0 0,1 147,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,85 A 98,98 0 0,1 245,85 A 98,98 0 0,0 147,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,255 A 98,98 0 0,1 294,170 A 98,98 0 0,0 147,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 49,255 L 343,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,255 A 294,294 0 0,0 49,255" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,85 A 294,294 0 0,0 196,340" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,255 A 98,98 0 0,0 196,340" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 49,255 A 98,98 0 0,0 98,170 A 98,98 0 0,1 147,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 196,340 A 98,98 0 0,0 147,255 A 98,98 0 0,1 147,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,85 A 98,98 0 0,1 245,85 A 98,98 0 0,0 147,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 343,255 A 98,98 0 0,1 294,170 A 98,98 0 0,0 147,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><circle cx="147" cy="85" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="269" cy="43" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="269" y="43" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">10</text><path d=" M 98,0 L 294,0 L 392,170 L 294,340 L 98,340 L 0,170 Z" fill="none" stroke="black" stroke-width="1" stroke-linejoin="round"/></svg>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-04-27 19:58:16
|
Revision: 1536
http://rails.svn.sourceforge.net/rails/?rev=1536&view=rev
Author: evos
Date: 2011-04-27 19:58:09 +0000 (Wed, 27 Apr 2011)
Log Message:
-----------
Fixes for delayed train obsolescence (18AL rules).
Modified Paths:
--------------
trunk/18xx/rails/game/Game.java
trunk/18xx/rails/game/OperatingRound.java
trunk/18xx/rails/game/TrainType.java
Modified: trunk/18xx/rails/game/Game.java
===================================================================
--- trunk/18xx/rails/game/Game.java 2011-04-27 12:09:32 UTC (rev 1535)
+++ trunk/18xx/rails/game/Game.java 2011-04-27 19:58:09 UTC (rev 1536)
@@ -278,20 +278,31 @@
(List<PossibleAction>) actionObject;
numberOfActions = executedActions.size();
for (PossibleAction action : executedActions) {
- if (!gameManager.processOnReload(action)) {
- log.error ("Load interrupted");
- DisplayBuffer.add(LocalText.getText("LoadInterrupted"));
- break;
+ try {
+ if (!gameManager.processOnReload(action)) {
+ log.error ("Load interrupted");
+ DisplayBuffer.add(LocalText.getText("LoadInterrupted"));
+ break;
+ }
+ } catch (Exception e) {
+ log.fatal("Action '"+action+"' reload exception", e);
+ throw new Exception ("Reload exception", e);
}
}
} else if (actionObject instanceof PossibleAction) {
// New style: separate PossibleActionsObjects, since Rails 1.3.1
while (actionObject instanceof PossibleAction) {
numberOfActions++;
- if (!gameManager.processOnReload((PossibleAction)actionObject)) {
- log.error ("Load interrupted");
- DisplayBuffer.add(LocalText.getText("LoadInterrupted"));
- break;
+ try {
+ if (!gameManager.processOnReload((PossibleAction)actionObject)) {
+ log.error ("Load interrupted");
+ DisplayBuffer.add(LocalText.getText("LoadInterrupted"));
+ break;
+ }
+ } catch (Exception e) {
+ log.fatal("Action '"+((PossibleAction)actionObject).toString()
+ +"' reload exception", e);
+ throw new Exception ("Reload exception", e);
}
try {
actionObject = ois.readObject();
@@ -328,7 +339,7 @@
return game;
} catch (Exception e) {
- log.error("Load failed", e);
+ log.fatal("Load failed", e);
DisplayBuffer.add(LocalText.getText("LoadFailed", e.getMessage()));
}
Modified: trunk/18xx/rails/game/OperatingRound.java
===================================================================
--- trunk/18xx/rails/game/OperatingRound.java 2011-04-27 12:09:32 UTC (rev 1535)
+++ trunk/18xx/rails/game/OperatingRound.java 2011-04-27 19:58:09 UTC (rev 1536)
@@ -1805,7 +1805,7 @@
TrainI oldTrain =
operatingCompany.get().getPortfolio().getTrainOfType(
exchangedTrain.getType());
- pool.buyTrain(oldTrain, 0);
+ train.moveTo(train.isObsolete() ? scrapHeap : pool);
ReportBuffer.add(LocalText.getText("ExchangesTrain",
companyName,
exchangedTrain.getName(),
@@ -1950,7 +1950,7 @@
//
if (action.isForced()) moveStack.linkToPreviousMoveSet();
- pool.buyTrain(train, 0);
+ train.moveTo(train.isObsolete() ? scrapHeap : pool);
ReportBuffer.add(LocalText.getText("CompanyDiscardsTrain",
companyName,
train.getName() ));
@@ -2726,7 +2726,6 @@
}
// Scan trains per company per player, operating company president
// first
- //int currentPlayerIndex = operatingCompany.getObject().getPresident().getIndex();
int currentPlayerIndex = getCurrentPlayer().getIndex();
for (int i = currentPlayerIndex; i < currentPlayerIndex
+ numberOfPlayers; i++) {
Modified: trunk/18xx/rails/game/TrainType.java
===================================================================
--- trunk/18xx/rails/game/TrainType.java 2011-04-27 12:09:32 UTC (rev 1535)
+++ trunk/18xx/rails/game/TrainType.java 2011-04-27 19:58:09 UTC (rev 1536)
@@ -435,14 +435,16 @@
public void setRusted(Portfolio lastBuyingCompany) {
rusted.set(true);
for (TrainI train : trains) {
- if (obsoleting && train.getHolder() != lastBuyingCompany) {
+ Portfolio holder = train.getHolder();
+ if (obsoleting && holder.getOwner() instanceof PublicCompanyI
+ && holder != lastBuyingCompany) {
log.debug("Train " + train.getUniqueId() + " (owned by "
- + train.getHolder().getName() + ") obsoleted");
+ + holder.getName() + ") obsoleted");
train.setObsolete();
- train.getHolder().getTrainsModel().update();
+ holder.getTrainsModel().update();
} else {
log.debug("Train " + train.getUniqueId() + " (owned by "
- + train.getHolder().getName() + ") rusted");
+ + holder.getName() + ") rusted");
train.setRusted();
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-04-27 12:09:38
|
Revision: 1535
http://rails.svn.sourceforge.net/rails/?rev=1535&view=rev
Author: evos
Date: 2011-04-27 12:09:32 +0000 (Wed, 27 Apr 2011)
Log Message:
-----------
18GA: enable RelayTokens dialog at Atlanta upgrade to yellow.
Modified Paths:
--------------
trunk/18xx/data/18GA/TileSet.xml
Modified: trunk/18xx/data/18GA/TileSet.xml
===================================================================
--- trunk/18xx/data/18GA/TileSet.xml 2011-04-27 11:23:10 UTC (rev 1534)
+++ trunk/18xx/data/18GA/TileSet.xml 2011-04-27 12:09:32 UTC (rev 1535)
@@ -27,7 +27,7 @@
<!-- Atlanta (D4) -->
<Tile id="-30" >
- <Upgrade id="1451" />
+ <Upgrade id="1451" relayBaseTokens="yes"/>
</Tile>
<!-- Savannah (Cotton Port) -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-04-27 11:23:16
|
Revision: 1534
http://rails.svn.sourceforge.net/rails/?rev=1534&view=rev
Author: evos
Date: 2011-04-27 11:23:10 +0000 (Wed, 27 Apr 2011)
Log Message:
-----------
Token cost fix for GA company in 18GA/Cotton Port: first two tokens are free.
Modified Paths:
--------------
trunk/18xx/data/18GA/CompanyManager.xml
Modified: trunk/18xx/data/18GA/CompanyManager.xml
===================================================================
--- trunk/18xx/data/18GA/CompanyManager.xml 2011-04-27 08:27:18 UTC (rev 1533)
+++ trunk/18xx/data/18GA/CompanyManager.xml 2011-04-27 11:23:10 UTC (rev 1534)
@@ -70,6 +70,9 @@
</IfOption>
<IfOption name="Variant" value="Cotton Port">
<Home hex="D10,E15"/>
+ <BaseTokens>
+ <LayCost method="sequence" cost="0,0,40,100"/>
+ </BaseTokens>
</IfOption>
</Company>
<Company name="G&F" type="Public" tokens="2" fgColour="000000"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ev...@us...> - 2011-04-27 08:27:27
|
Revision: 1533
http://rails.svn.sourceforge.net/rails/?rev=1533&view=rev
Author: evos
Date: 2011-04-27 08:27:18 +0000 (Wed, 27 Apr 2011)
Log Message:
-----------
18TN XML updates
Modified Paths:
--------------
trunk/18xx/data/18TN/CompanyManager.xml
trunk/18xx/data/18TN/Game.xml
trunk/18xx/data/18TN/Map.xml
trunk/18xx/data/18TN/StockMarket.xml
trunk/18xx/data/GamesList.xml
Modified: trunk/18xx/data/18TN/CompanyManager.xml
===================================================================
--- trunk/18xx/data/18TN/CompanyManager.xml 2011-04-26 22:28:01 UTC (rev 1532)
+++ trunk/18xx/data/18TN/CompanyManager.xml 2011-04-27 08:27:18 UTC (rev 1533)
@@ -47,7 +47,7 @@
</Company>
<Company name="M&C" type="Private" basePrice="70" revenue="15"
longname="Memphis and Charleston Railroad">
- <Blocking hex="H5"/>
+ <Blocking hex="H3"/>
<SpecialProperties>
<SpecialProperty condition="ifOwnedByCompany" when="tileLayingStep" class="rails.game.special.SpecialTileLay">
<SpecialTileLay location="H5" extra="yes" free="yes"/>
@@ -72,6 +72,8 @@
<Company name="IC" type="Public" tokens="3" fgColour="FFFFFF" bgColour="228B22"
longname="Illinois Central Railroad">
<Home hex="D7"/>
+ <Certificate type="President" shares="3"/>
+ <Certificate shares="1" number="7"/>
</Company>
<Company name="L&N" type="Public" tokens="4" fgColour="FFFFFF" bgColour="1C86EE"
longname="Louisville and Nashville Railroad">
Modified: trunk/18xx/data/18TN/Game.xml
===================================================================
--- trunk/18xx/data/18TN/Game.xml 2011-04-26 22:28:01 UTC (rev 1532)
+++ trunk/18xx/data/18TN/Game.xml 2011-04-27 08:27:18 UTC (rev 1533)
@@ -2,7 +2,13 @@
<ComponentManager>
<Component name="GameManager" class="rails.game.GameManager">
<Game name="18TN"/>
-
+ <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="UnlimitedTiles" type="toggle" default="no"/>
+ <GameOption name="UnlimitedTopTrains" parm="8" type="toggle" default="no"/>
+ <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/>
+ <GameOption name="TwoPlayersCertLimit70Percent" type="toggle" default="yes"/>
<GameParameters>
<PlayerShareLimit percentage="60">
<!-- Option "NumberOfPlayers" is automatically set
@@ -20,16 +26,17 @@
</GameParameters>
<EndOfGame>
<Bankruptcy/>
- <BankBreaks limit="0" finish="setOfORs"/>
+ <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="21"/>
<Players number="3" cash="600" certLimit="16"/>
<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"/>
@@ -65,9 +72,8 @@
<Train name="5" majorStops="5" cost="450" amount="2" startPhase="5"/>
<Train name="6" majorStops="6" cost="630" amount="2" startPhase="6"
rustedTrain="3" />
- <Train name="8" majorStops="8" cost="700" amount="8" startPhase="8"
+ <Train name="8" majorStops="8" cost="700" amount="7" startPhase="8"
rustedTrain="4" />
-
</Component>
<Component name="PhaseManager" class="rails.game.PhaseManager">
<!-- Note: released and rusted trains are now specified per Train
Modified: trunk/18xx/data/18TN/Map.xml
===================================================================
--- trunk/18xx/data/18TN/Map.xml 2011-04-26 22:28:01 UTC (rev 1532)
+++ trunk/18xx/data/18TN/Map.xml 2011-04-27 08:27:18 UTC (rev 1533)
@@ -38,7 +38,7 @@
<Hex name="F13" tile="-1" city="Lebanon"/>
<Hex name="F15" tile="0" cost="60" />
<Hex name="F17" tile="-10" city="Knoxville" cost="40" />
-<Hex name="F19" tile="0" />
+<Hex name="F19" tile="0" cost="120" />
<Hex name="F21" tile="0" cost="120" />
<Hex name="G2" tile="0" />
<Hex name="G4" tile="0" cost="60" />
Modified: trunk/18xx/data/18TN/StockMarket.xml
===================================================================
--- trunk/18xx/data/18TN/StockMarket.xml 2011-04-26 22:28:01 UTC (rev 1532)
+++ trunk/18xx/data/18TN/StockMarket.xml 2011-04-27 08:27:18 UTC (rev 1533)
@@ -87,5 +87,7 @@
<StockSpace name="N2" price="230"/>
<StockSpace name="O1" price="275"/>
<StockSpace name="O2" price="250"/>
-<StockSpace name="P1" price="300"/>
+<StockSpace name="P1" price="300">
+ <GameOver />
+</StockSpace>
</StockMarket>
Modified: trunk/18xx/data/GamesList.xml
===================================================================
--- trunk/18xx/data/GamesList.xml 2011-04-26 22:28:01 UTC (rev 1532)
+++ trunk/18xx/data/GamesList.xml 2011-04-27 08:27:18 UTC (rev 1533)
@@ -276,7 +276,7 @@
<Option name="RouteAwareness" values="Highlight,Deactivate" default="Highlight" />
<Option name="RevenueCalculation" values="Suggest,Deactivate" default="Suggest" />
<Option name="NoMapMode" type="toggle" default="no" />
- <Option name="UnlimitedTopTrains" parm="D" type="toggle" default="no"/>
+ <Option name="UnlimitedTopTrains" parm="8" type="toggle" default="no"/>
<Option name="UnlimitedTiles" type="toggle" default="no"/>
<Option name="LeaveAuctionOnPass" type="toggle" default="no"/>
<Option name="TwoPlayersCertLimit70Percent" type="toggle" default="no"/>
@@ -285,7 +285,14 @@
<Game name="18TN">
<Note>Prototype</Note>
<Description>18TN</Description>
- <Players minimum="3" maximum="5"/>
+ <Option name="RouteAwareness" values="Highlight,Deactivate" default="Highlight" />
+ <Option name="RevenueCalculation" values="Suggest,Deactivate" default="Suggest" />
+ <Option name="NoMapMode" type="toggle" default="no" />
+ <Option name="UnlimitedTiles" type="toggle" default="no"/>
+ <Option name="UnlimitedTopTrains" parm="8" type="toggle" default="no"/>
+ <Option name="LeaveAuctionOnPass" type="toggle" default="no"/>
+ <Option name="TwoPlayersCertLimit70Percent" type="toggle" default="no"/>
+ <Players minimum="2" maximum="5"/>
</Game>
<Game name="1880">
<Note>Prototype</Note>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|