|
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] |