You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(46) |
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(51) |
Feb
(10) |
Mar
|
Apr
|
May
(14) |
Jun
|
Jul
(13) |
Aug
(30) |
Sep
(83) |
Oct
(56) |
Nov
(148) |
Dec
(107) |
2010 |
Jan
(260) |
Feb
(164) |
Mar
(183) |
Apr
(99) |
May
(160) |
Jun
(40) |
Jul
(33) |
Aug
(48) |
Sep
(22) |
Oct
(24) |
Nov
(1) |
Dec
(12) |
2011 |
Jan
(6) |
Feb
(15) |
Mar
(13) |
Apr
(37) |
May
(27) |
Jun
(29) |
Jul
(33) |
Aug
(20) |
Sep
(17) |
Oct
(20) |
Nov
(33) |
Dec
(17) |
2012 |
Jan
(39) |
Feb
(38) |
Mar
(20) |
Apr
(21) |
May
(17) |
Jun
(22) |
Jul
(16) |
Aug
(3) |
Sep
(9) |
Oct
(10) |
Nov
|
Dec
|
From: Erik V. <ev...@us...> - 2010-02-16 20:19:55
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30179 Modified Files: LocalisedText.properties Log Message: Split start round and starting player messages Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** LocalisedText.properties 15 Feb 2010 23:15:21 -0000 1.110 --- LocalisedText.properties 16 Feb 2010 20:19:47 -0000 1.111 *************** *** 428,433 **** StartCompany={0} (buy {1}% share for {2}) StartCompanyFixed=Start {0} by buying {1}% share for {2} ! StartFormationRound=\n++++++++++++++++++++++++\nStarting {0} formation round\n++++++++++++++++++++++++\nStarting player is {1} StartFinalMinorExchangeRound=++++++++++++++++++++++++++++++++++++++++\nStart of the Final Minor Company Exchange Round\n++++++++++++++++++++++++++++++++++++++++ StartOfInitialRound=\n================\nStart of initial round\n================ StartOfPhase=Start of phase {0}. --- 428,434 ---- StartCompany={0} (buy {1}% share for {2}) StartCompanyFixed=Start {0} by buying {1}% share for {2} ! StartFormationRound=\n++++++++++++++++++++++++\nStarting {0} formation round\n++++++++++++++++++++++++ StartFinalMinorExchangeRound=++++++++++++++++++++++++++++++++++++++++\nStart of the Final Minor Company Exchange Round\n++++++++++++++++++++++++++++++++++++++++ + StartingPlayer=Starting player is {0} StartOfInitialRound=\n================\nStart of initial round\n================ StartOfPhase=Start of phase {0}. *************** *** 531,533 **** YouMustRaiseCash=You must raise {0} cash by selling shares YouMustSelect1=You must select {0} item(s) ! YouMustSelect2=You must select between {0} and {1} items --- 532,534 ---- YouMustRaiseCash=You must raise {0} cash by selling shares YouMustSelect1=You must select {0} item(s) ! YouMustSelect2=You must select between {0} and {1} items \ No newline at end of file |
From: Erik V. <ev...@us...> - 2010-02-16 20:18:33
|
Update of /cvsroot/rails/18xx/rails/game/specific/_1835 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv29557/rails/game/specific/_1835 Modified Files: StockRound_1835.java Log Message: Name strings are now constants Index: StockRound_1835.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1835/StockRound_1835.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** StockRound_1835.java 6 Feb 2010 23:48:26 -0000 1.6 --- StockRound_1835.java 16 Feb 2010 20:18:25 -0000 1.7 *************** *** 9,12 **** --- 9,21 ---- public class StockRound_1835 extends StockRound { + + public static String BY_ID="Bay"; + public static String SX_ID="Sax"; + public static String BA_ID="Bad"; + public static String HE_ID="Hes"; + public static String WT_ID="Wrt"; + public static String MS_ID="MS"; + public static String OL_ID="Old"; + public static String PR_ID="Pr"; /** *************** *** 19,22 **** --- 28,40 ---- super (aGameManager); } + + /** Share price goes down 1 space for any number of shares sold. + */ + protected void adjustSharePrice (PublicCompanyI company, int numberSold, boolean soldBefore) { + // No more changes if it has already dropped + if (!soldBefore) { + company.adjustSharePrice (SOLD, 1, gameManager.getStockMarket()); + } + } /** *************** *** 41,60 **** // Check for group releases if (sharesInIPO == 0) { ! if (name.equals("Sax") && ! ipo.getShare(companyManager.getCompanyByName("Bay")) == 0 ! || name.equals("Bay") && ! ipo.getShare(companyManager.getCompanyByName("Sax")) == 0) { // Group 1 sold out: release Badische ! releaseCompanyShares (companyManager.getCompanyByName("Bad")); ReportBuffer.add (LocalText.getText("SharesReleased", ! "All", "Bad")); ! } else if (name.equals("Bad") || name.equals("Wrt") || name.equals("Hes")) { ! if (ipo.getShare(companyManager.getCompanyByName("Bad")) == 0 ! && ipo.getShare(companyManager.getCompanyByName("Wrt")) == 0 ! && ipo.getShare(companyManager.getCompanyByName("Hes")) == 0) { // Group 2 sold out: release MS ! releaseCompanyShares (companyManager.getCompanyByName("MS")); ReportBuffer.add (LocalText.getText("SharesReleased", ! "All", "MS")); } } --- 59,78 ---- // Check for group releases if (sharesInIPO == 0) { ! if (name.equals(SX_ID) && ! ipo.getShare(companyManager.getCompanyByName(BY_ID)) == 0 ! || name.equals(BY_ID) && ! ipo.getShare(companyManager.getCompanyByName(SX_ID)) == 0) { // Group 1 sold out: release Badische ! releaseCompanyShares (companyManager.getCompanyByName(BA_ID)); ReportBuffer.add (LocalText.getText("SharesReleased", ! "All", BA_ID)); ! } else if (name.equals(BA_ID) || name.equals(WT_ID) || name.equals(HE_ID)) { ! if (ipo.getShare(companyManager.getCompanyByName(BA_ID)) == 0 ! && ipo.getShare(companyManager.getCompanyByName(WT_ID)) == 0 ! && ipo.getShare(companyManager.getCompanyByName(HE_ID)) == 0) { // Group 2 sold out: release MS ! releaseCompanyShares (companyManager.getCompanyByName(MS_ID)); ReportBuffer.add (LocalText.getText("SharesReleased", ! "All", MS_ID)); } } *************** *** 65,92 **** * will always be available at the start of SR1. */ ! if (name.equals("Bad")) { if (sharesInIPO == 50) { // 50% sold: release Wurttemberg ! releaseCompanyShares (companyManager.getCompanyByName("Wrt")); ReportBuffer.add (LocalText.getText("SharesReleased", ! "All", "Wrt")); } else if (sharesInIPO == 80) { // President sold: release four 10% Prussian shares for (int i=0; i<4; i++) { ! unavailable.getCertOfType("Pr_10%").moveTo(ipo); } ReportBuffer.add (LocalText.getText("SharesReleased", ! "4 10%", "Pr")); } ! } else if (name.equals("Wrt")) { //Wurttembergische if (sharesInIPO == 50) { // 50% sold: release Hessische ! releaseCompanyShares (companyManager.getCompanyByName("Hes")); ReportBuffer.add (LocalText.getText("SharesReleased", ! "All", "Hes")); } ! } else if (name.equals("MS")) { // Mecklenburg/Schwerin if (sharesInIPO == 40) { // 60% sold: release Oldenburg ! releaseCompanyShares (companyManager.getCompanyByName("Old")); ReportBuffer.add (LocalText.getText("SharesReleased", ! "All", "Old")); } } --- 83,111 ---- * will always be available at the start of SR1. */ ! if (name.equals(BA_ID)) { if (sharesInIPO == 50) { // 50% sold: release Wurttemberg ! releaseCompanyShares (companyManager.getCompanyByName(WT_ID)); ReportBuffer.add (LocalText.getText("SharesReleased", ! "All", WT_ID)); } else if (sharesInIPO == 80) { // President sold: release four 10% Prussian shares + gameManager.getCompanyManager().getPublicCompany(PR_ID).setBuyable(true); for (int i=0; i<4; i++) { ! unavailable.getCertOfType(PR_ID+"_10%").moveTo(ipo); } ReportBuffer.add (LocalText.getText("SharesReleased", ! "4 10%", PR_ID)); } ! } else if (name.equals(WT_ID)) { //Wurttembergische if (sharesInIPO == 50) { // 50% sold: release Hessische ! releaseCompanyShares (companyManager.getCompanyByName(HE_ID)); ReportBuffer.add (LocalText.getText("SharesReleased", ! "All", HE_ID)); } ! } else if (name.equals(MS_ID)) { // Mecklenburg/Schwerin if (sharesInIPO == 40) { // 60% sold: release Oldenburg ! releaseCompanyShares (companyManager.getCompanyByName(OL_ID)); ReportBuffer.add (LocalText.getText("SharesReleased", ! "All", OL_ID)); } } |
From: Erik V. <ev...@us...> - 2010-02-16 20:17:26
|
Update of /cvsroot/rails/18xx/rails/game/correct In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv29158/rails/game/correct Modified Files: OperatingCost.java CorrectCash.java Log Message: @Override annotations (added automatically) Index: OperatingCost.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/correct/OperatingCost.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OperatingCost.java 14 Feb 2010 20:48:15 -0000 1.1 --- OperatingCost.java 16 Feb 2010 20:17:09 -0000 1.2 *************** *** 59,63 **** - @Override public boolean isInCorrectionMenu(){ return inCorrectionMenu; --- 59,62 ---- *************** *** 67,81 **** } - @Override public CashHolder getCashHolder() { return operatingCompany; } ! @Override public String getCashHolderName() { return operatingCompanyName; } ! @Override ! public int getAmount() { if (acted) return -operatingCost; --- 66,78 ---- } public CashHolder getCashHolder() { return operatingCompany; } ! public String getCashHolderName() { return operatingCompanyName; } ! public int getAmount() { if (acted) return -operatingCost; *************** *** 83,87 **** return suggestedCost; } ! @Override public void setAmount(int amount) { acted=true; --- 80,84 ---- return suggestedCost; } ! public void setAmount(int amount) { acted=true; Index: CorrectCash.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/correct/CorrectCash.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CorrectCash.java 14 Feb 2010 20:48:15 -0000 1.1 --- CorrectCash.java 16 Feb 2010 20:17:14 -0000 1.2 *************** *** 63,67 **** - @Override public boolean isInCorrectionMenu(){ return inCorrectionMenu; --- 63,66 ---- *************** *** 71,88 **** } - @Override public CashHolder getCashHolder() { return correctCashHolder; } ! @Override public String getCashHolderName() { return cashHolderName; } ! @Override public int getAmount() { return correctAmount; } ! @Override public void setAmount(int amount) { correctAmount = amount; --- 70,86 ---- } public CashHolder getCashHolder() { return correctCashHolder; } ! public String getCashHolderName() { return cashHolderName; } ! public int getAmount() { return correctAmount; } ! public void setAmount(int amount) { correctAmount = amount; |
From: Erik V. <ev...@us...> - 2010-02-16 20:16:17
|
Update of /cvsroot/rails/18xx/rails/game/action In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28591/rails/game/action Modified Files: MergeCompanies.java Log Message: Various 1835 fixes Index: MergeCompanies.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/action/MergeCompanies.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MergeCompanies.java 29 Oct 2009 19:41:29 -0000 1.6 --- MergeCompanies.java 16 Feb 2010 20:16:07 -0000 1.7 *************** *** 9,12 **** --- 9,13 ---- import java.io.ObjectInputStream; import java.util.ArrayList; + import java.util.Arrays; import java.util.List; *************** *** 59,62 **** --- 60,68 ---- targetCompanyNames = b.toString(); } + + public MergeCompanies(PublicCompanyI mergingCompany, + PublicCompanyI targetCompany) { + this (mergingCompany, Arrays.asList(new PublicCompanyI[] {targetCompany})); + } /** Required for deserialization */ |
From: Erik V. <ev...@us...> - 2010-02-16 20:16:14
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28591/rails/game Modified Files: StockRound.java PublicCompanyI.java OperatingRound.java PublicCompany.java MapHex.java Log Message: Various 1835 fixes Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** OperatingRound.java 14 Feb 2010 20:47:45 -0000 1.99 --- OperatingRound.java 16 Feb 2010 20:15:42 -0000 1.100 *************** *** 2568,2570 **** } ! } --- 2568,2570 ---- } ! } \ No newline at end of file Index: MapHex.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/MapHex.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** MapHex.java 14 Feb 2010 20:47:45 -0000 1.37 --- MapHex.java 16 Feb 2010 20:16:07 -0000 1.38 *************** *** 1014,1016 **** } ! } --- 1014,1016 ---- } ! } \ No newline at end of file Index: PublicCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompany.java,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** PublicCompany.java 14 Feb 2010 20:48:02 -0000 1.85 --- PublicCompany.java 16 Feb 2010 20:15:57 -0000 1.86 *************** *** 112,115 **** --- 112,118 ---- protected BooleanState hasOperated = null; + /** Are company shares buyable (i.e. before started)? */ + protected BooleanState buyable = null; + /** * A map per tile colour. Each entry contains a map per phase, of which each *************** *** 586,589 **** --- 589,593 ---- hasFloated = new BooleanState(name + "_hasFloated", false); hasOperated = new BooleanState(name + "_hasOperated", false); + buyable = new BooleanState(name + "_isBuyable", false); allBaseTokens = new ArrayList<TokenI>(); *************** *** 829,832 **** --- 833,837 ---- hasStarted.set(true); + buyable.set(true); setParSpace(startSpace); // The current price is set via the Stock Market *************** *** 855,858 **** --- 860,864 ---- } else { hasStarted.set(true); + buyable.set(true); if (homeBaseTokensLayTime == WHEN_STARTED) { layHomeBaseTokens(); *************** *** 876,880 **** } ! /** * Float the company, put its initial cash in the treasury. */ --- 882,897 ---- } ! /** Make company shares buyable. Only useful where shares become ! * buyable before the company has started (e.g. 1835 Prussian). ! * */ ! public void setBuyable(boolean buyable) { ! this.buyable.set(buyable); ! } ! ! public boolean isBuyable() { ! return buyable.booleanValue(); ! } ! ! /** * Float the company, put its initial cash in the treasury. */ *************** *** 1607,1612 **** } } ! ! @Override public void layTileInNoMapMode(int cost) { if (cost > 0) tilesCostThisTurn.add(cost); --- 1624,1628 ---- } } ! public void layTileInNoMapMode(int cost) { if (cost > 0) tilesCostThisTurn.add(cost); *************** *** 1628,1633 **** if (cost > 0) tokensCostThisTurn.add(cost); } ! ! @Override public void layBaseTokenInNoMapMode(int cost) { if (cost > 0) tokensCostThisTurn.add(cost); --- 1644,1648 ---- if (cost > 0) tokensCostThisTurn.add(cost); } ! public void layBaseTokenInNoMapMode(int cost) { if (cost > 0) tokensCostThisTurn.add(cost); Index: PublicCompanyI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompanyI.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** PublicCompanyI.java 14 Feb 2010 20:48:02 -0000 1.46 --- PublicCompanyI.java 16 Feb 2010 20:15:42 -0000 1.47 *************** *** 82,85 **** --- 82,87 ---- */ public boolean hasStarted(); + public void setBuyable(boolean buyable); + public boolean isBuyable(); /** *************** *** 287,291 **** public void layTile(MapHex hex, TileI tile, int orientation, int cost); ! public void layTileInNoMapMode(int cost); --- 289,293 ---- public void layTile(MapHex hex, TileI tile, int orientation, int cost); ! public void layTileInNoMapMode(int cost); Index: StockRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StockRound.java,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** StockRound.java 9 Feb 2010 20:03:00 -0000 1.61 --- StockRound.java 16 Feb 2010 20:15:36 -0000 1.62 *************** *** 675,683 **** } ! // The presidents share may not be in IPO ! //if (company.getPresidentsShare().getHolder() == ipo) { ! // There is an exception for 1856 CGR. Just chech 'started', ! // but even this might not be true for e.g. 1835 Prussi ! if (!company.hasStarted()) { errMsg = LocalText.getText("NotYetStarted", companyName); break; --- 675,679 ---- } ! if (!company.isBuyable()) { errMsg = LocalText.getText("NotYetStarted", companyName); break; *************** *** 994,999 **** int price; // Get the sell price (does not change within a turn) ! if (sellPrices.containsKey(companyName)) { price = (sellPrices.get(companyName)).getPrice(); } else { --- 990,996 ---- int price; + boolean soldBefore = sellPrices.containsKey(companyName); // Get the sell price (does not change within a turn) ! if (soldBefore) { price = (sellPrices.get(companyName)).getPrice(); } else { *************** *** 1043,1047 **** } } ! company.adjustSharePrice (SOLD, numberSold, gameManager.getStockMarket()); // Check if we still have the presidency --- 1040,1044 ---- } } ! adjustSharePrice (company, numberSold, soldBefore); // Check if we still have the presidency *************** *** 1071,1074 **** --- 1068,1075 ---- return true; } + + protected void adjustSharePrice (PublicCompanyI company, int numberSold, boolean soldBefore) { + company.adjustSharePrice (SOLD, numberSold, gameManager.getStockMarket()); + } public boolean useSpecialProperty(UseSpecialProperty action) { |
From: Erik V. <ev...@us...> - 2010-02-16 20:11:46
|
Update of /cvsroot/rails/18xx/data/1830 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26276/data/1830 Modified Files: Game.xml Log Message: Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1830/Game.xml,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Game.xml 14 Feb 2010 20:48:25 -0000 1.32 --- Game.xml 16 Feb 2010 20:11:28 -0000 1.33 *************** *** 16,19 **** --- 16,20 ---- See GamesList.xml for the real ones. --> + <GameOption name="NoMapMode" type="toggle" default="no" /> <GameOption name="BeginnerGame" type="toggle" default="no" /> <GameOption name="WithOptional6Train" type="toggle" default="no"/> |
From: Stefan F. <ste...@us...> - 2010-02-15 23:30:35
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17392/rails/ui/swing Modified Files: GameSetupWindow.java Log Message: Fixed bug in randomize if player prefill is used. Index: GameSetupWindow.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameSetupWindow.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** GameSetupWindow.java 15 Feb 2010 23:15:13 -0000 1.22 --- GameSetupWindow.java 15 Feb 2010 23:30:13 -0000 1.23 *************** *** 277,281 **** } } - fillPlayersPane(); } } --- 277,280 ---- |
From: Erik V. <ev...@us...> - 2010-02-15 23:30:35
|
Update of /cvsroot/rails/18xx/data/18AL In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17417/data/18AL Modified Files: StockMarket.xml Log Message: Fixed K4 price (120, not 105) Index: StockMarket.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18AL/StockMarket.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** StockMarket.xml 31 Jan 2010 22:16:02 -0000 1.5 --- StockMarket.xml 15 Feb 2010 23:30:15 -0000 1.6 *************** *** 75,79 **** <StockSpace name="K2" price="150" /> <StockSpace name="K3" price="135" /> ! <StockSpace name="K4" price="105" /> <StockSpace name="L1" price="190" /> <StockSpace name="L2" price="170" /> --- 75,79 ---- <StockSpace name="K2" price="150" /> <StockSpace name="K3" price="135" /> ! <StockSpace name="K4" price="120" /> <StockSpace name="L1" price="190" /> <StockSpace name="L2" price="170" /> |
From: Stefan F. <ste...@us...> - 2010-02-15 23:15:32
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14583/rails/ui/swing Modified Files: GameSetupWindow.java Log Message: Add button to GameSetupWindow that allows randomizing the player order at startup. Index: GameSetupWindow.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameSetupWindow.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** GameSetupWindow.java 31 Jan 2010 22:22:34 -0000 1.21 --- GameSetupWindow.java 15 Feb 2010 23:15:13 -0000 1.22 *************** *** 1,3 **** ! /* $Header$*/ package rails.ui.swing; --- 1,3 ---- ! /* $Header$*/ package rails.ui.swing; *************** *** 27,31 **** JPanel gameListPane, playersPane, buttonPane, optionsPane; JButton newButton, loadButton, quitButton, optionButton, infoButton; ! JButton creditsButton; JComboBox gameNameBox = new JComboBox(); JComboBox[] playerBoxes = new JComboBox[Player.MAX_PLAYERS]; --- 27,31 ---- JPanel gameListPane, playersPane, buttonPane, optionsPane; JButton newButton, loadButton, quitButton, optionButton, infoButton; ! JButton creditsButton, randomizeButton; JComboBox gameNameBox = new JComboBox(); JComboBox[] playerBoxes = new JComboBox[Player.MAX_PLAYERS]; *************** *** 259,263 **** --- 259,281 ---- break; } + } + } else if (arg0.getSource().equals(randomizeButton)) { + // randomize the order of the players + if (playerNameFields.length > 0) { + List<String> playerList = new ArrayList<String>(); + for (int i = 0; i < playerNameFields.length; i++) { + if (playerNameFields[i] != null + && playerNameFields[i].getText().length() > 0) { + playerList.add(playerNameFields[i].getText()); + playerNameFields[i].setText(""); + } + } + Collections.shuffle(playerList); + for (int i = 0; i < playerList.size(); i++) { + playerNameFields[i].setText(playerList.get(i)); + + } } + fillPlayersPane(); } } *************** *** 426,430 **** playersPane.setBorder(BorderFactory.createLoweredBevelBorder()); playersPane.add(new JLabel("Players:")); ! playersPane.add(new JLabel("")); for (int i = 0; i < GamesInfo.getMaxPlayers(gameName); i++) { --- 444,453 ---- playersPane.setBorder(BorderFactory.createLoweredBevelBorder()); playersPane.add(new JLabel("Players:")); ! // playersPane.add(new JLabel("")); replaced by randomize button ! ! randomizeButton = new JButton(LocalText.getText("RandomizePlayers")); ! randomizeButton.setMnemonic(KeyEvent.VK_R); ! randomizeButton.addActionListener(this); ! playersPane.add(randomizeButton); for (int i = 0; i < GamesInfo.getMaxPlayers(gameName); i++) { |
From: Stefan F. <ste...@us...> - 2010-02-15 23:15:30
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14583 Modified Files: LocalisedText.properties Log Message: Add button to GameSetupWindow that allows randomizing the player order at startup. Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** LocalisedText.properties 14 Feb 2010 20:48:15 -0000 1.109 --- LocalisedText.properties 15 Feb 2010 23:15:21 -0000 1.110 *************** *** 367,370 **** --- 367,371 ---- Public=Public QUIT=Quit + RandomizePlayers=Randomize Order REDO=Redo ReleasedFromEscrow={0} receives {1} released from bank escrow |
From: Brett L. <wak...@us...> - 2010-02-15 22:38:51
|
Update of /cvsroot/rails/18xx/data/1870 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6555/data/1870 Modified Files: CompanyManager.xml Log Message: Commit CompanyManager updates for 1851, 1870, and 18EU from Phil Davies <de...@gm...>. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1870/CompanyManager.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** CompanyManager.xml 31 Jan 2010 22:15:59 -0000 1.23 --- CompanyManager.xml 15 Feb 2010 22:38:36 -0000 1.24 *************** *** 21,71 **** </CompanyType> ! <Company name="GRSC" type="Private" basePrice="20" revenue="5"/> ! <Company name="Brdg" type="Private" basePrice="40" revenue="10"/> ! <Company name="Cattl" type="Private" tokens="1" basePrice="50" revenue="10"/> ! <Company name="Gulf" type="Private" tokens="2" tokenValue="20/10,10" basePrice="80" revenue="15"/> ! <Company name="MKT" type="Private" basePrice="160" revenue="20"/> ! ! <Company name="KATY" type="Public" tokens="4" fgColour="FFFFFF" bgColour="00FF00"> ! <Home hex="B11"/> ! <Destination hex="N1"/> </Company> ! <Company name="MP" type="Public" tokens="4" fgColour="FFFFFF" bgColour="FF0000"> ! <Home hex="C18"/> ! <Destination hex="J5"/> </Company> ! <Company name="ATSF" type="Public" tokens="4" fgColour="FFFFFF" bgColour="0000FF"> ! <Home hex="B9"/> ! <Destination hex="N1"/> </Company> ! <Company name="SP" type="Public" tokens="4" fgColour="FF8000" bgColour="000000"> ! <Home hex="N1"/> ! <Destination hex="N17"/> </Company> ! <Company name="GMO" type="Public" tokens="3" fgColour="FFFFFF" bgColour="ff0040"> ! <Home hex="M20"/> ! <Destination hex="C18"/> </Company> ! <Company name="SLSF" type="Public" tokens="4" fgColour="FFFFFF" bgColour="d04000" floatPerc="20"> ! <Home hex="E12"/> ! <Destination hex="M22"/> </Company> ! <Company name="TP" type="Public" tokens="3" fgColour="FFFFFF" bgColour="000000"> ! <Home hex="J5"/> ! <Destination hex="N17"/> </Company> ! <Company name="FW" type="Public" tokens="3" fgColour="FF0000" bgColour="000000"> ! <Home hex="J3"/> ! <Destination hex="A2"/> </Company> ! <Company name="SSW" type="Public" tokens="3" fgColour="FFFFFF" bgColour="6000ff"> ! <Home hex="H17"/> ! <Destination hex="J3"/> </Company> ! <Company name="IC" type="Public" tokens="3" fgColour="000000" bgColour="c0ff40"> ! <Home hex="K16"/> ! <Destination hex="A22"/> </Company> ! <StartPacket roundClass="rails.game.StartRound_1830"> <Bidding initial="5" minimum="5" increment="1"/> --- 21,86 ---- </CompanyType> ! <Company name="GRSC" type="Private" basePrice="20" revenue="5" longname="Great River Shipping Company"/> ! <Company name="Brdg" type="Private" basePrice="40" revenue="10" ! longname="Mississippi River Bridge Company" /> ! <Company name="Cattl" type="Private" tokens="1" basePrice="50" ! revenue="10" longname="The Southern Cattle Company" /> ! <Company name="Gulf" type="Private" tokens="2" tokenValue="20/10,10" ! basePrice="80" revenue="15" longname="The Gulf Shipping Company" /> ! <Company name="MKT" type="Private" basePrice="160" revenue="20" ! longname="Missouri-Kansas-Texas Railroad"> ! <Info key="ComesWithCertificate" parm="KATY,10"></Info></Company> ! ! <Company name="KATY" type="Public" tokens="4" fgColour="FFFFFF" ! bgColour="00FF00" longname="Missouri-Kansas-Texas Railroad"> ! <Home hex="B11" ></Home> ! <Destination hex="N1" /> </Company> ! <Company name="MP" type="Public" tokens="4" fgColour="FFFFFF" ! bgColour="FF0000" longname="Missouri Pacific Railroad"> ! <Home hex="C18" /> ! <Destination hex="J5" /> </Company> ! <Company name="ATSF" type="Public" tokens="4" fgColour="FFFFFF" ! bgColour="0000FF" longname="Atchison, Topeka & Santa Fe Railway"> ! <Home hex="B9" /> ! <Destination hex="N1" /> </Company> ! <Company name="SP" type="Public" tokens="4" fgColour="FF8000" ! bgColour="000000" longname="Southern Pacific Railroad"> ! <Home hex="N1" /> ! <Destination hex="N17" /> </Company> ! <Company name="GMO" type="Public" tokens="3" fgColour="FFFFFF" ! bgColour="ff0040" longname="Gulf, Mobile & Ohio Railroad"> ! <Home hex="M20" /> ! <Destination hex="C18" /> </Company> ! <Company name="SLSF" type="Public" tokens="4" fgColour="FFFFFF" ! bgColour="d04000" floatPerc="20" longname="St. Louis-San Francisco Railway"> ! <Home hex="E12" /> ! <Destination hex="M22" /> </Company> ! <Company name="TP" type="Public" tokens="3" fgColour="FFFFFF" ! bgColour="000000" longname="Texas & Pacific Railway"> ! <Home hex="J5" /> ! <Destination hex="N17" /> </Company> ! <Company name="FW" type="Public" tokens="3" fgColour="FF0000" ! bgColour="000000" longname="Fort Worth & Denver City Railway"> ! <Home hex="J3"></Home> ! <Destination hex="A2" /> </Company> ! <Company name="SSW" type="Public" tokens="3" fgColour="FFFFFF" ! bgColour="6000ff" longname="St. Louis Southwestern Railway"> ! <Home hex="H17" /> ! <Destination hex="J3" /> </Company> ! <Company name="IC" type="Public" tokens="3" fgColour="000000" ! bgColour="c0ff40" longname="Illinois Central Railroad"> ! <Home hex="K16" /> ! <Destination hex="A22" /> </Company> ! <StartPacket roundClass="rails.game.StartRound_1830"> <Bidding initial="5" minimum="5" increment="1"/> |
From: Brett L. <wak...@us...> - 2010-02-15 22:38:51
|
Update of /cvsroot/rails/18xx/data/1851 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6555/data/1851 Modified Files: CompanyManager.xml Log Message: Commit CompanyManager updates for 1851, 1870, and 18EU from Phil Davies <de...@gm...>. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1851/CompanyManager.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CompanyManager.xml 31 Jan 2010 22:15:58 -0000 1.8 --- CompanyManager.xml 15 Feb 2010 22:38:10 -0000 1.9 *************** *** 23,55 **** <TradeShares mustHaveOperated="yes"/> </CompanyType> ! <Company name="L&O" type="Private" basePrice="200" revenue="5"/> ! <Company name="M&C" type="Private" basePrice="50" revenue="10"/> ! <Company name="ET&WNC" type="Private" basePrice="80" revenue="15"/> ! <Company name="O&W" type="Private" basePrice="210" revenue="20"/> ! <Company name="CNO&TP" type="Private" basePrice="240" revenue="25"/> ! <Company name="GM&O" type="Public" tokens="4" fgColour="000000" ! bgColour="FF0000"> ! <Home hex="G7"/> </Company> ! <Company name="IC" type="Public" tokens="4" fgColour="000000" ! bgColour="FFFFCC"> ! <Home hex="A5"/> </Company> ! <Company name="L&N" type="Public" tokens="4" fgColour="000000" ! bgColour="4444FF"> ! <Home hex="B16" city="1"/> </Company> ! <Company name="Dixie" type="Public" tokens="4" fgColour="000000" ! bgColour="FFFF00"> ! <Home hex="H16"/> </Company> ! <Company name="SR" type="Public" tokens="4" fgColour="000000" ! bgColour="DDFFDD"> ! <Home hex="F20"/> </Company> ! <Company name="TC" type="Public" tokens="4" fgColour="000000" ! bgColour="DDDDDD"> ! <Home hex="F12"/> </Company> --- 23,62 ---- <TradeShares mustHaveOperated="yes"/> </CompanyType> ! <Company name="L&O" type="Private" basePrice="200" revenue="5" longname="Lexington & Ohio Railroad"> ! <Info key="ComesWithPresidency" parm="L&N,20"></Info></Company> ! <Company name="M&C" type="Private" basePrice="50" revenue="10" ! longname="Memphis & Charleston Railroad" /> ! <Company name="ET&WNC" type="Private" basePrice="80" ! revenue="15" longname="East Tennessee & Western North Carolina Railroad" /> ! <Company name="O&W" type="Private" basePrice="210" revenue="20" ! longname="Oneida & Western Railroad" > ! <Info key="ComesWithCertificate" parm="L&N,10"></Info></Company> ! <Company name="CNO&TP" type="Private" basePrice="240" ! revenue="25" longname="Cincinnati, New Orleans & Texas Pacific Railroad" > ! <Info key="ComesWithCertificate" parm="L&N,10"></Info></Company> ! <Company name="GM&O" type="Public" tokens="4" fgColour="000000" ! bgColour="FF0000" longname="Gulf, Mobile & Ohio Railroad"> ! <Home hex="G7" /> </Company> ! <Company name="IC" type="Public" tokens="4" fgColour="000000" ! bgColour="FFFFCC" longname="Illinois Central Railroad"> ! <Home hex="A5" /> </Company> ! <Company name="L&N" type="Public" tokens="4" fgColour="000000" ! bgColour="4444FF" longname="Louisville & Nashville Railroad"> ! <Home hex="B16" city="1" /> </Company> ! <Company name="Dixie" type="Public" tokens="4" fgColour="000000" ! bgColour="FFFF00" longname="Nashville, Chattanooga & St. Louis Railroad"> ! <Home hex="H16" /> </Company> ! <Company name="SR" type="Public" tokens="4" fgColour="000000" ! bgColour="DDFFDD" longname="Southern Railway"> ! <Home hex="F20" /> </Company> ! <Company name="TC" type="Public" tokens="4" fgColour="000000" ! bgColour="DDDDDD" longname="Tennessee Central Railroad"> ! <Home hex="F12" /> </Company> |
From: Brett L. <wak...@us...> - 2010-02-15 22:38:50
|
Update of /cvsroot/rails/18xx/data/18EU In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6555/data/18EU Modified Files: CompanyManager.xml Log Message: Commit CompanyManager updates for 1851, 1870, and 18EU from Phil Davies <de...@gm...>. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18EU/CompanyManager.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CompanyManager.xml 31 Jan 2010 22:16:02 -0000 1.14 --- CompanyManager.xml 15 Feb 2010 22:38:36 -0000 1.15 *************** *** 33,64 **** </CompanyType> ! <Company name="1" longname="CdF du Nord" type="Minor"> <Home hex="J1" city="1"/> </Company> ! <Company name="2" longname="Etat Belge" type="Minor"> <Home hex="H3"/> </Company> ! <Company name="3" longname="PLM" type="Minor"> <Home hex="J1" city="2"/> </Company> ! <Company name="4" longname="Leipzig-Dresden" type="Minor"> <Home hex="G10"/> </Company> ! <Company name="5" longname="Adriatica" type="Minor"> <Home hex="S8"/> </Company> ! <Company name="6" longname="KF Nordbahn" type="Minor"> <Home hex="N11" city="1"/> </Company> ! <Company name="7" longname="Berlin-Potsdam" type="Minor"> <Home hex="E10" city="2"/> </Company> ! <Company name="8" longname="Hungarian" type="Minor"> <Home hex="P13"/> </Company> ! <Company name="9" longname="Berlin-Stettin" type="Minor"> <Home hex="E10" city="1"/> </Company> ! <Company name="10" longname="Alta Italia" type="Minor"> <Home hex="R5"/> </Company> --- 33,64 ---- </CompanyType> ! <Company name="1" longname="Chemin de Fer du Nord" type="Minor"> <Home hex="J1" city="1"/> </Company> ! <Company name="2" longname="Ãtat Belge" type="Minor"> <Home hex="H3"/> </Company> ! <Company name="3" longname="Paris-Lyon-Méditerranée" type="Minor"> <Home hex="J1" city="2"/> </Company> ! <Company name="4" longname="Leipzig-Dresdner-Bahn" type="Minor"> <Home hex="G10"/> </Company> ! <Company name="5" longname="Ferrovia Adriatica" type="Minor"> <Home hex="S8"/> </Company> ! <Company name="6" longname="Kaiser-Ferdinand-Nordbahn" type="Minor"> <Home hex="N11" city="1"/> </Company> ! <Company name="7" longname="Berlin-Potsdamer-Bahn" type="Minor"> <Home hex="E10" city="2"/> </Company> ! <Company name="8" longname="Ungarische Staatsbahn" type="Minor"> <Home hex="P13"/> </Company> ! <Company name="9" longname="Berlin-Stettiner-Bahn" type="Minor"> <Home hex="E10" city="1"/> </Company> ! <Company name="10" longname="Strade Ferrate Alta Italia" type="Minor"> <Home hex="R5"/> </Company> *************** *** 66,70 **** <Home hex="N11" city="2"/> </Company> ! <Company name="12" longname="HSM" type="Minor"> <Home hex="C4"/> </Company> --- 66,70 ---- <Home hex="N11" city="2"/> </Company> ! <Company name="12" longname="Hollandsche Maatschappij" type="Minor"> <Home hex="C4"/> </Company> *************** *** 72,76 **** <Home hex="L7"/> </Company> ! <Company name="14" longname="Strasbourg-Bâle" type="Minor"> <Home hex="M4"/> </Company> --- 72,76 ---- <Home hex="L7"/> </Company> ! <Company name="14" longname="Ligne Strasbourg-Bâle" type="Minor"> <Home hex="M4"/> </Company> *************** *** 79,95 **** </Company> ! <Company name="SNCB" longname="CdF Belges" type="Major" tokens="5" fgColour="000000" bgColour="DDAA00"> </Company> ! <Company name="NS" longname="Ned. Spoorwegen" type="Major" tokens="5" fgColour="0000FF" bgColour="FFDD00"> </Company> ! <Company name="KBS" longname="Kon. Bayerische Eisenbahn" type="Major" tokens="5" fgColour="000000" bgColour="C0E0FF"> </Company> ! <Company name="KPEV" longname="Kon. Preussische Eisenbahn" type="Major" tokens="5" fgColour="000000" bgColour="2255FF"> </Company> ! <Company name="KKÖB" longname="K-K Österr. Staatsbahn" type="Major" tokens="5" fgColour="000000" bgColour="FFFF00"> </Company> <Company name="FS" longname="Ferrovie dello Stato" type="Major" tokens="5" fgColour="FFFFFF" bgColour="00AA00"> </Company> ! <Company name="SNCF" longname="CdF Française" type="Major" tokens="5" fgColour="FFFFFF" bgColour="FF0000"> </Company> <Company name="DR" longname="Deutsche Reichsbahn" type="Major" tokens="5" fgColour="FFFFFF" bgColour="000000"> --- 79,95 ---- </Company> ! <Company name="SNCB" longname="Société Nationale des Chemins de Fer Belges " type="Major" tokens="5" fgColour="000000" bgColour="DDAA00"> </Company> ! <Company name="NS" longname="Nederlandsche Spoorwegen" type="Major" tokens="5" fgColour="0000FF" bgColour="FFDD00"> </Company> ! <Company name="KBS" longname="Königlich-Bayerische Staatseisenbahn" type="Major" tokens="5" fgColour="000000" bgColour="C0E0FF"> </Company> ! <Company name="KPEV" longname="Königlich-Preussische Eisenbahn-Verwaltung" type="Major" tokens="5" fgColour="000000" bgColour="2255FF"> </Company> ! <Company name="KKÖB" longname="Kaiserlich-Königliche Ãsterreichische Staatsbahn" type="Major" tokens="5" fgColour="000000" bgColour="FFFF00"> </Company> <Company name="FS" longname="Ferrovie dello Stato" type="Major" tokens="5" fgColour="FFFFFF" bgColour="00AA00"> </Company> ! <Company name="SNCF" longname="Société Nationale des Chemins de Fer Français" type="Major" tokens="5" fgColour="FFFFFF" bgColour="FF0000"> </Company> <Company name="DR" longname="Deutsche Reichsbahn" type="Major" tokens="5" fgColour="FFFFFF" bgColour="000000"> |
From: Stefan F. <ste...@us...> - 2010-02-15 22:23:14
|
Update of /cvsroot/rails/18xx/tiles In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv2886/tiles Added Files: Create_TileDictionary_pdf.sh Log Message: Added shell script to create pdf of all tiles defined in Rails (Requires installed java, batik, mmv and imagemagick) --- NEW FILE: Create_TileDictionary_pdf.sh --- # !/bin/bash # author Stefan Frey # requires installed tools: java, batik library, mmv and imagemagick (montage command) # use whereis to retrieve path information # creates temporary directory mkdir svg_catalog_tmp # convert svg to png java -jar /usr/share/batik/batik-rasterizer.jar -d svg_catalog_tmp/ -w 400 -h 400 -dpi 400 -m image/png svg/ # rename to have all filenames in -xxxxx.png notation /usr/bin/mmv 'svg_catalog_tmp/tile0.png' 'svg_catalog_tmp/m00000.png' /usr/bin/mmv 'svg_catalog_tmp/tile-[0-9].png' 'svg_catalog_tmp/m0000#1.png' /usr/bin/mmv 'svg_catalog_tmp/tile-[0-9][0-9].png' 'svg_catalog_tmp/m000#1#2.png' /usr/bin/mmv 'svg_catalog_tmp/tile-[0-9][0-9][0-9].png' 'svg_catalog_tmp/m00#1#2#3.png' /usr/bin/mmv 'svg_catalog_tmp/tile-[0-9][0-9][0-9][0-9].png' 'svg_catalog_tmp/m0#1#2#3#4.png' /usr/bin/mmv 'svg_catalog_tmp/tile-[0-9][0-9][0-9][0-9][0-9].png' 'svg_catalog_tmp/m#1#2#3#4#5.png' # preprinted catalog /usr/bin/montage -tile 9x6 -label '%t' svg_catalog_tmp/m*.png svg_catalog_preprinted.pdf # rename to have all filenames in xxxxx.png notation /usr/bin/mmv 'svg_catalog_tmp/tile[0-9].png' 'svg_catalog_tmp/t000#1.png' /usr/bin/mmv 'svg_catalog_tmp/tile[0-9][0-9].png' 'svg_catalog_tmp/t00#1#2.png' /usr/bin/mmv 'svg_catalog_tmp/tile[0-9][0-9][0-9].png' 'svg_catalog_tmp/t0#1#2#3.png' /usr/bin/mmv 'svg_catalog_tmp/tile[0-9][0-9][0-9][0-9].png' 'svg_catalog_tmp/t#1#2#3#4.png' # tiles catalog /usr/bin/montage -tile 9x6 -label '%t' svg_catalog_tmp/t*.png svg_catalog_tiles.pdf # remove temporary directory rm svg_catalog_tmp/*.png rmdir svg_catalog_tmp |
From: Stefan F. <ste...@us...> - 2010-02-14 20:49:02
|
Update of /cvsroot/rails/18xx/data In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21890/data Modified Files: GamesList.xml Log Message: Added NoMapMode as GameOption. This mode skips LayTile and LayTrack actions and replaces those by more generic OperatingCosts actions. Currently only a non-strict mode is supported, thus "illegal" actions are possible. Option only tested and active for 1889 and 1835. Others to follow. Index: GamesList.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/GamesList.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** GamesList.xml 6 Feb 2010 14:58:42 -0000 1.23 --- GamesList.xml 14 Feb 2010 20:48:15 -0000 1.24 *************** *** 21,24 **** --- 21,25 ---- in a dropdown the first item is always the default). --> + <Option name="NoMapMode" type="toggle" default="no" /> <Option name="WithOptional6Train" type="toggle" default="no"/> <Option name="UnlimitedTopTrains" parm="D" type="toggle" default="no"/> *************** *** 102,108 **** </Description> <Players minimum="2" maximum="6"/> ! <Option name="BeginnerGame" type="toggle" default="no" /> <Option name="WithOptional6Train" type="toggle" default="no"/> ! <Option name="UnlimitedTopTrains" parm="D" type="toggle" default="no"/> </Game> --- 103,110 ---- </Description> <Players minimum="2" maximum="6"/> ! <Option name="NoMapMode" type="toggle" default="yes" /> ! <Option name="BeginnerGame" type="toggle" default="no" /> <Option name="WithOptional6Train" type="toggle" default="no"/> ! <Option name="UnlimitedTopTrains" parm="D" type="toggle" default="yes"/> </Game> |
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21890/rails/game Modified Files: MapManager.java Portfolio.java MapHex.java OperatingRound.java GameOption.java PublicCompanyI.java PublicCompany.java Log Message: Added NoMapMode as GameOption. This mode skips LayTile and LayTrack actions and replaces those by more generic OperatingCosts actions. Currently only a non-strict mode is supported, thus "illegal" actions are possible. Option only tested and active for 1889 and 1835. Others to follow. Index: Portfolio.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Portfolio.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** Portfolio.java 6 Feb 2010 23:48:26 -0000 1.44 --- Portfolio.java 14 Feb 2010 20:47:45 -0000 1.45 *************** *** 592,595 **** --- 592,597 ---- } else if (object instanceof SpecialPropertyI) { return addSpecialProperty((SpecialPropertyI) object); + } else if (object instanceof TokenI) { + return addToken((TokenI) object); } else { return false; *************** *** 615,618 **** --- 617,622 ---- } else if (object instanceof SpecialPropertyI) { return removeSpecialProperty((SpecialPropertyI) object); + } else if (object instanceof TokenI) { + return removeToken((TokenI) object); } else { return false; Index: PublicCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompany.java,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** PublicCompany.java 9 Feb 2010 20:02:02 -0000 1.84 --- PublicCompany.java 14 Feb 2010 20:48:02 -0000 1.85 *************** *** 1607,1611 **** } } ! public ModelObject getTilesLaidThisTurnModel() { return tilesLaidThisTurn; --- 1607,1617 ---- } } ! ! @Override ! public void layTileInNoMapMode(int cost) { ! if (cost > 0) tilesCostThisTurn.add(cost); ! tilesLaidThisTurn.appendWithDelimiter(Bank.format(cost), ","); ! } ! public ModelObject getTilesLaidThisTurnModel() { return tilesLaidThisTurn; *************** *** 1622,1625 **** --- 1628,1637 ---- if (cost > 0) tokensCostThisTurn.add(cost); } + + @Override + public void layBaseTokenInNoMapMode(int cost) { + if (cost > 0) tokensCostThisTurn.add(cost); + tokensLaidThisTurn.appendWithDelimiter(Bank.format(cost), ","); + } /** Index: MapManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/MapManager.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** MapManager.java 9 Feb 2010 20:00:40 -0000 1.16 --- MapManager.java 14 Feb 2010 20:47:34 -0000 1.17 *************** *** 24,27 **** --- 24,30 ---- protected Map<String, MapHex> mHexes = new HashMap<String, MapHex>(); protected int maxX, maxY; + + // upgrade costs on the map for noMapMode + protected SortedSet<Integer> possibleTileCosts; protected static final int[] xDeltaNS = new int[] { 0, -1, -1, 0, +1, +1 }; *************** *** 80,83 **** --- 83,87 ---- maxX = 0; maxY = 0; + possibleTileCosts = new TreeSet<Integer>(); for (Tag hexTag : hexTags) { hex = new MapHex(this); *************** *** 86,91 **** maxX = Math.max(maxX, hex.getX()); maxY = Math.max(maxY, hex.getY()); } ! hexes = new MapHex[1 + maxX][1 + maxY]; --- 90,100 ---- maxX = Math.max(maxX, hex.getX()); maxY = Math.max(maxY, hex.getY()); + int[] tileCosts = hex.getTileCostAsArray(); + for (int i=0; i<tileCosts.length; i++){ + possibleTileCosts.add(tileCosts[i]); + } } ! log.debug("Possible tileCosts on map are "+possibleTileCosts); ! hexes = new MapHex[1 + maxX][1 + maxY]; *************** *** 195,198 **** --- 204,211 ---- } + public SortedSet<Integer> getPossibleTileCosts() { + return possibleTileCosts; + } + public List<MapHex> parseLocations (String locationCodes) throws ConfigurationException { Index: PublicCompanyI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompanyI.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** PublicCompanyI.java 9 Feb 2010 20:02:02 -0000 1.45 --- PublicCompanyI.java 14 Feb 2010 20:48:02 -0000 1.46 *************** *** 287,291 **** public void layTile(MapHex hex, TileI tile, int orientation, int cost); ! public ModelObject getTilesLaidThisTurnModel(); --- 287,293 ---- public void layTile(MapHex hex, TileI tile, int orientation, int cost); ! ! public void layTileInNoMapMode(int cost); ! public ModelObject getTilesLaidThisTurnModel(); *************** *** 294,297 **** --- 296,301 ---- public void layBaseToken(MapHex hex, int cost); + public void layBaseTokenInNoMapMode(int cost); + public ModelObject getTokensLaidThisTurnModel(); Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** OperatingRound.java 6 Feb 2010 23:48:26 -0000 1.98 --- OperatingRound.java 14 Feb 2010 20:47:45 -0000 1.99 *************** *** 6,9 **** --- 6,10 ---- import rails.common.GuiDef; import rails.game.action.*; + import rails.game.correct.*; import rails.game.move.CashMove; import rails.game.move.MapChange; *************** *** 26,29 **** --- 27,33 ---- protected boolean actionPossible = true; + /* sfy: using rails without map support */ + protected boolean noMapMode = false; + protected TreeMap<Integer, PublicCompanyI> operatingCompanies; protected List<PublicCompanyI> companiesOperatedThisRound *************** *** 68,72 **** public static final int SPLIT_ROUND_DOWN = 2; // More to the treasury ! protected static GameDef.OrStep[] steps = new GameDef.OrStep[] { GameDef.OrStep.INITIAL, --- 72,76 ---- public static final int SPLIT_ROUND_DOWN = 2; // More to the treasury ! protected static GameDef.OrStep[] steps = new GameDef.OrStep[] { GameDef.OrStep.INITIAL, *************** *** 94,98 **** operatingCompanyArray = super.getOperatingCompanies(); ! guiHints.setVisibilityHint(GuiDef.Panel.STOCK_MARKET, false); guiHints.setVisibilityHint(GuiDef.Panel.STATUS, true); --- 98,105 ---- operatingCompanyArray = super.getOperatingCompanies(); ! ! // sfy NoMapMode ! noMapMode = GameOption.convertValueToBoolean("NoMapMode", getGameOption("NoMapMode")); ! guiHints.setVisibilityHint(GuiDef.Panel.STOCK_MARKET, false); guiHints.setVisibilityHint(GuiDef.Panel.STATUS, true); *************** *** 139,143 **** if (operatingCompanyArray.length > 0) { ! if (setNextOperatingCompany(true)) { setStep(GameDef.OrStep.INITIAL); return; --- 146,150 ---- if (operatingCompanyArray.length > 0) { ! if (setNextOperatingCompany(true)){ setStep(GameDef.OrStep.INITIAL); return; *************** *** 194,197 **** --- 201,208 ---- result = buyBonusToken((BuyBonusToken) selectedAction); + } else if (selectedAction instanceof CorrectCashI) { + // includes OperatingCost + result = executeCorrectCash((CorrectCashI) selectedAction); + } else if (selectedAction instanceof SetDividend) { *************** *** 556,560 **** // If this is a home base token lay, stop here ! if (action.getType() == LayBaseToken.HOME_CITY) return true; if (cost > 0) { --- 567,573 ---- // If this is a home base token lay, stop here ! if (action.getType() == LayBaseToken.HOME_CITY) { ! return true; ! } if (cost > 0) { *************** *** 738,741 **** --- 751,757 ---- return true; } + + + public boolean setRevenueAndDividend(SetDividend action) { *************** *** 921,924 **** --- 937,1026 ---- } + public boolean executeCorrectCash(CorrectCashI action){ + + CashHolder ch = action.getCashHolder(); + int amount = action.getAmount(); + int cost = -amount; // costs are minus of CashCorrectamount + + // operating costs related stuff + boolean flagOC = false; + OperatingCost actionOC = null; + OperatingCost.OCType typeOC = null; + PublicCompanyI pc = null; + String textError = "CCExecutionError"; + + if (action instanceof OperatingCost) { + flagOC = true; + actionOC = (OperatingCost) action; + typeOC = actionOC.getOCType(); + pc = (PublicCompanyI) ch; + textError = "OCExecutionError"; + } + + String errMsg = null; + + while (true) { + if ((amount + ch.getCash()) < 0) { + errMsg = + LocalText.getText("NotEnoughMoney", + ch.getName(), + Bank.format(ch.getCash()), + Bank.format(cost) + ); + break; + } + if (flagOC && (typeOC == OperatingCost.OCType.LAY_BASE_TOKEN) && (pc.getNumberOfFreeBaseTokens() == 0)) { + errMsg = + LocalText.getText("HasNoTokensLeft", ch.getName()); + break; + } + break; + } + + if (errMsg != null) { + DisplayBuffer.add(LocalText.getText(textError, + ch.getName(), + errMsg)); + return false; + } + + moveStack.start(true); + + if (amount < 0) { + // negative amounts: remove cash from cashholder + new CashMove(ch, bank, cost); + } else if (amount > 0) { + // positive amounts: add cash to cashholder + new CashMove(bank, ch, amount); + } + + if (flagOC) { + + if (typeOC == OperatingCost.OCType.LAY_TILE) { + pc.layTileInNoMapMode(cost); + ReportBuffer.add(LocalText.getText("OCLayTileExecuted", + pc.getName(), + Bank.format(cost) )); + } + if (typeOC == OperatingCost.OCType.LAY_BASE_TOKEN) { + // move token to Bank + BaseToken token = pc.getFreeToken(); + if (token == null) { + log.error("Company " + pc.getName() + " has no free token"); + return false; + } else { + token.moveTo(bank.getUnavailable()); + } + pc.layBaseTokenInNoMapMode(cost); + ReportBuffer.add(LocalText.getText("OCLayBaseTokenExecuted", + pc.getName(), + Bank.format(cost) )); + } + } + + return true; + } + + /** * Internal method: change the OR state to the next step. If the currently *************** *** 1001,1007 **** operatingCompany.getPresident().getName())); setCurrentPlayer(operatingCompany.getPresident()); operatingCompany.initTurn(); trainsBoughtThisTurn.clear(); ! setStep (GameDef.OrStep.LAY_TRACK); } --- 1103,1120 ---- operatingCompany.getPresident().getName())); setCurrentPlayer(operatingCompany.getPresident()); + + if (noMapMode && !operatingCompany.hasLaidHomeBaseTokens()){ + // Lay base token in noMapMode + BaseToken token = operatingCompany.getFreeToken(); + if (token == null) { + log.error("Company " + operatingCompany.getName() + " has no free token to lay base token"); + } else { + log.debug("Company " + operatingCompany.getName() + " lays base token in nomap mode"); + token.moveTo(bank.getUnavailable()); + } + } operatingCompany.initTurn(); trainsBoughtThisTurn.clear(); ! // setStep (GameDef.OrStep.LAY_TRACK); duplication } *************** *** 1926,1930 **** if (getStep() == GameDef.OrStep.INITIAL) { initTurn(); ! setStep (GameDef.OrStep.LAY_TRACK); } --- 2039,2047 ---- if (getStep() == GameDef.OrStep.INITIAL) { initTurn(); ! if (noMapMode) { ! nextStep (GameDef.OrStep.LAY_TOKEN); ! } else { ! setStep (GameDef.OrStep.LAY_TRACK); ! } } *************** *** 1959,1962 **** --- 2076,2081 ---- } else if (step == GameDef.OrStep.CALC_REVENUE) { prepareRevenueAndDividendAction(); + if (noMapMode) + prepareOperatingCostsAction(); } else if (step == GameDef.OrStep.BUY_TRAIN) { setBuyableTrains(); *************** *** 1967,1970 **** --- 2086,2092 ---- doneAllowed = true; //} + if (noMapMode && (operatingCompany.getLastRevenue() == 0)) + prepareOperatingCostsAction(); + } else if (step == GameDef.OrStep.DISCARD_TRAINS) { *************** *** 2090,2093 **** --- 2212,2241 ---- } } + + protected void prepareOperatingCostsAction() { + + // LayTile Actions + for (Integer tc: mapManager.getPossibleTileCosts()) { + possibleActions.add(new OperatingCost( + operatingCompany, OperatingCost.OCType.LAY_TILE, tc + )); + } + // LayBaseToken Actions + if (operatingCompany.getNumberOfFreeBaseTokens() != 0) { + possibleActions.add(new OperatingCost( + operatingCompany, OperatingCost.OCType.LAY_BASE_TOKEN, + operatingCompany.getBaseTokenLayCost() + )); + } + // Default Actions + possibleActions.add(new OperatingCost( + operatingCompany, OperatingCost.OCType.LAY_TILE, 0 + )); + if (operatingCompany.getNumberOfFreeBaseTokens() != 0) { + possibleActions.add(new OperatingCost( + operatingCompany, OperatingCost.OCType.LAY_BASE_TOKEN, 0 + )); + } + } /** Index: MapHex.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/MapHex.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** MapHex.java 5 Feb 2010 19:55:01 -0000 1.36 --- MapHex.java 14 Feb 2010 20:47:45 -0000 1.37 *************** *** 335,338 **** --- 335,342 ---- } } + + public int[] getTileCostAsArray(){ + return tileCost; + } /** Index: GameOption.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameOption.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GameOption.java 15 Jan 2010 19:55:59 -0000 1.9 --- GameOption.java 14 Feb 2010 20:48:02 -0000 1.10 *************** *** 102,104 **** --- 102,110 ---- } + /** Get GameOption Value as Boolean Value */ + public static boolean convertValueToBoolean(String name, String value) { + return value != null + && optionsMap.get(name).isBoolean + && OPTION_VALUE_YES.equalsIgnoreCase(value); + } } |
From: Stefan F. <ste...@us...> - 2010-02-14 20:49:00
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21890 Modified Files: LocalisedText.properties Log Message: Added NoMapMode as GameOption. This mode skips LayTile and LayTrack actions and replaces those by more generic OperatingCosts actions. Currently only a non-strict mode is supported, thus "illegal" actions are possible. Option only tested and active for 1889 and 1835. Others to follow. Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** LocalisedText.properties 9 Feb 2010 20:03:24 -0000 1.108 --- LocalisedText.properties 14 Feb 2010 20:48:15 -0000 1.109 *************** *** 275,278 **** --- 275,279 ---- NoDumping=Cannot dump presidency NoGameOptions=This game has no options + NoMapMode=No map mode (for ftf play) NoMoney=Not enough money NoNameSpecified=No name specified *************** *** 306,309 **** --- 307,321 ---- NumberOfNormalTileLaysExceeded=Number of normal tile lays of colour {0} would be exceeded Obsolete4Trains=Delayed obsolescence 4-trains + OCAmountEntry=free entry + OCButtonLabel=Operating costs + OCDialogMessage=Specify operating costs for {0} + OCDialogTitle=Operating costs + OCExecutionError={0} cannot execute operating costs: {1} + OCSelectMessage=Select operating costs + OCSelectTitle=Operating costs + OCLayTile=Lay tile -- {0} + OCLayTileExecuted={0} lays tile for {1} + OCLayBaseToken=Lay base token -- {0} + OCLayBaseTokenExecuted={0} lays base token for {1} OK=OK OPTIONS=Options |
From: Stefan F. <ste...@us...> - 2010-02-14 20:48:43
|
Update of /cvsroot/rails/18xx/data/1889 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21890/data/1889 Modified Files: Game.xml Log Message: Added NoMapMode as GameOption. This mode skips LayTile and LayTrack actions and replaces those by more generic OperatingCosts actions. Currently only a non-strict mode is supported, thus "illegal" actions are possible. Option only tested and active for 1889 and 1835. Others to follow. Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1889/Game.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Game.xml 6 Feb 2010 14:56:13 -0000 1.4 --- Game.xml 14 Feb 2010 20:47:29 -0000 1.5 *************** *** 16,21 **** See GamesList.xml for the real ones. --> ! <Option name="WithOptional6Train" type="toggle" default="no"/> ! <Option name="UnlimitedTopTrains" parm="D" type="toggle" default="no"/> <GameParameters> <PlayerShareLimit percentage="60"> --- 16,23 ---- See GamesList.xml for the real ones. --> ! <GameOption name="NoMapMode" type="toggle" default="yes" /> ! <GameOption name="BeginnerGame" type="toggle" default="no" /> ! <GameOption name="WithOptional6Train" type="toggle" default="no"/> ! <GameOption name="UnlimitedTopTrains" parm="D" type="toggle" default="yes"/> <GameParameters> <PlayerShareLimit percentage="60"> |
From: Stefan F. <ste...@us...> - 2010-02-14 20:48:34
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21890/rails/ui/swing Modified Files: ORUIManager.java ORPanel.java Log Message: Added NoMapMode as GameOption. This mode skips LayTile and LayTrack actions and replaces those by more generic OperatingCosts actions. Currently only a non-strict mode is supported, thus "illegal" actions are possible. Option only tested and active for 1889 and 1835. Others to follow. Index: ORUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORUIManager.java,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** ORUIManager.java 7 Feb 2010 18:28:22 -0000 1.53 --- ORUIManager.java 14 Feb 2010 20:48:20 -0000 1.54 *************** *** 10,13 **** --- 10,14 ---- import rails.game.*; import rails.game.action.*; + import rails.game.correct.*; import rails.game.special.*; import rails.ui.swing.elements.*; *************** *** 319,322 **** --- 320,327 ---- } + } else if (command.equals(ORPanel.OPERATING_COST_CMD)) { + + operatingCosts(); + } else if (command.equals(ORPanel.BUY_TRAIN_CMD)) { *************** *** 748,751 **** --- 753,813 ---- } + public void operatingCosts(){ + + List<String> textOC = new ArrayList<String>(); + List<OperatingCost> actionOC = possibleActions.getType(OperatingCost.class); + + for (OperatingCost ac:actionOC) { + + int suggestedCost = ac.getAmount(); + String suggestedCostText; + if (suggestedCost == 0) + suggestedCostText = LocalText.getText("OCAmountEntry"); + else + suggestedCostText = Bank.format(suggestedCost); + + OperatingCost.OCType t = ac.getOCType(); + if (t == OperatingCost.OCType.LAY_TILE) + textOC.add(LocalText.getText("OCLayTile", + suggestedCostText )); + + if (t == OperatingCost.OCType.LAY_BASE_TOKEN) + textOC.add(LocalText.getText("OCLayBaseToken", + suggestedCostText )); + } + + if (!textOC.isEmpty()) { + String chosenOption = (String) JOptionPane.showInputDialog(orWindow, + LocalText.getText("OCSelectMessage"), + LocalText.getText("OCSelectTitle"), + JOptionPane.QUESTION_MESSAGE, null, + textOC.toArray(), textOC.get(0)); + if (chosenOption != null) { + int index = textOC.indexOf(chosenOption); + OperatingCost chosenAction = actionOC.get(index); + if (chosenAction.getAmount() == 0) { + String costString = (String) JOptionPane.showInputDialog(orWindow, + LocalText.getText("OCDialogMessage", chosenOption), + LocalText.getText("OCDialogTitle"), + JOptionPane.QUESTION_MESSAGE, null, + null, chosenAction.getAmount()); + int cost; + try { + cost = Integer.parseInt(costString); + } catch (NumberFormatException e) { + cost = 0; + } + chosenAction.setAmount(cost); + } else { + chosenAction.setAmount(chosenAction.getAmount()); + } + + if (orWindow.process(chosenAction)) { + updateMessage(); + } + } + } + } + public void buyTrain() { *************** *** 1126,1129 **** --- 1188,1194 ---- orPanel.initPrivateBuying(privatesCanBeBoughtNow); + // sfy operating costs + orPanel.initOperatingCosts(possibleActions.contains(OperatingCost.class)); + //if (possibleActions.contains(LayTile.class)) { if (orStep == GameDef.OrStep.LAY_TRACK) { Index: ORPanel.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORPanel.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ORPanel.java 4 Feb 2010 21:27:59 -0000 1.45 --- ORPanel.java 14 Feb 2010 20:48:21 -0000 1.46 *************** *** 23,26 **** --- 23,27 ---- private static final long serialVersionUID = 1L; + public static final String OPERATING_COST_CMD = "OperatingCost"; public static final String BUY_PRIVATE_CMD = "BuyPrivate"; public static final String BUY_TRAIN_CMD = "BuyTrain"; *************** *** 94,98 **** private Caption tileCaption, tokenCaption, revenueCaption, trainCaption, privatesCaption, loansCaption; ! private ActionButton button1; private ActionButton button2; --- 95,100 ---- private Caption tileCaption, tokenCaption, revenueCaption, trainCaption, privatesCaption, loansCaption; ! ! private ActionButton buttonOC; // sfy: button for operating costs private ActionButton button1; private ActionButton button2; *************** *** 127,130 **** --- 129,133 ---- round = gameUIManager.getCurrentRound(); + // noMapMode = gameUIManager.getGameParameterAsBoolean(GuiDef.Parm.NO_MAP_MODE); privatesCanBeBought = gameUIManager.getGameParameterAsBoolean(GuiDef.Parm.CAN_ANY_COMPANY_BUY_PRIVATES); bonusTokensExist = gameUIManager.getGameParameterAsBoolean(GuiDef.Parm.DO_BONUS_TOKENS_EXIST); *************** *** 224,227 **** --- 227,239 ---- buttonPanel = new JPanel(); + // sfy: operatingcosts button + buttonOC = new ActionButton(LocalText.getText("OCButtonLabel")); + buttonOC.setActionCommand(OPERATING_COST_CMD); + buttonOC.setMnemonic(KeyEvent.VK_O); + buttonOC.addActionListener(this); + buttonOC.setEnabled(false); + buttonOC.setVisible(false); + buttonPanel.add(buttonOC); + button1 = new ActionButton(LocalText.getText("LayTile")); button1.setActionCommand(LAY_TILE_CMD); *************** *** 563,566 **** --- 575,579 ---- public void finish() { + buttonOC.setEnabled(false); // operatingcosts sfy button1.setEnabled(false); button2.setEnabled(false); *************** *** 646,652 **** --- 659,668 ---- president[orCompIndex].setHighlight(true); + buttonOC.clearPossibleActions(); button1.clearPossibleActions(); button2.clearPossibleActions(); button3.clearPossibleActions(); + + buttonOC.setEnabled(false); button1.setEnabled(false); button2.setEnabled(false); *************** *** 681,685 **** button1.setVisible(true); } ! public void initPayoutStep(int orCompIndex, SetDividend action, boolean withhold, boolean split, boolean payout) { --- 697,701 ---- button1.setVisible(true); } ! public void initPayoutStep(int orCompIndex, SetDividend action, boolean withhold, boolean split, boolean payout) { *************** *** 739,742 **** --- 755,768 ---- } + // operating costs sfy + public void initOperatingCosts(boolean enabled) { + + buttonOC.setEnabled(enabled); + buttonOC.setVisible(enabled); + tileCaption.setHighlight(enabled); + tokenCaption.setHighlight(enabled); + } + + public void initPrivateBuying(boolean enabled) { |
From: Stefan F. <ste...@us...> - 2010-02-14 20:48:33
|
Update of /cvsroot/rails/18xx/data/1830 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21890/data/1830 Modified Files: Game.xml Log Message: Added NoMapMode as GameOption. This mode skips LayTile and LayTrack actions and replaces those by more generic OperatingCosts actions. Currently only a non-strict mode is supported, thus "illegal" actions are possible. Option only tested and active for 1889 and 1835. Others to follow. Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1830/Game.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Game.xml 4 Feb 2010 22:23:01 -0000 1.31 --- Game.xml 14 Feb 2010 20:48:25 -0000 1.32 *************** *** 16,19 **** --- 16,20 ---- See GamesList.xml for the real ones. --> + <GameOption name="BeginnerGame" type="toggle" default="no" /> <GameOption name="WithOptional6Train" type="toggle" default="no"/> <GameOption name="UnlimitedTopTrains" parm="D" type="toggle" default="no"/> |
From: Stefan F. <ste...@us...> - 2010-02-14 20:48:23
|
Update of /cvsroot/rails/18xx/rails/game/correct In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21890/rails/game/correct Added Files: CorrectionAction.java OperatingCost.java CorrectCash.java CorrectCashI.java Log Message: Added NoMapMode as GameOption. This mode skips LayTile and LayTrack actions and replaces those by more generic OperatingCosts actions. Currently only a non-strict mode is supported, thus "illegal" actions are possible. Option only tested and active for 1889 and 1835. Others to follow. --- NEW FILE: CorrectionAction.java --- package rails.game.correct; import rails.game.*; /** * Interface to implement for all non-correction action. * * * @author freystef * */ interface CorrectionAction { public boolean isInCorrectionMenu(); } --- NEW FILE: OperatingCost.java --- package rails.game.correct; import rails.game.*; import rails.game.action.PossibleAction; import rails.util.Util; import java.io.IOException; import java.io.ObjectInputStream; /** * Correction action that changes the cash position of a cashholder. * * @author Stefan Frey */ public class OperatingCost extends PossibleAction implements CorrectCashI, CorrectionAction { public enum OCType {LAY_TILE, LAY_BASE_TOKEN}; /** The Constant serialVersionUID. */ public static final long serialVersionUID = 1L; /* Preconditions */ /** shows in correction menu */ private boolean inCorrectionMenu; /** operating Company */ transient private PublicCompanyI operatingCompany; /** converted to name */ private String operatingCompanyName; /** operating cost type (as tile lay, token lay etc.) */ private OCType operatingCostType; /** suggested costs */ private int suggestedCost; /** maximum costs */ private int maximumCost; /* Postconditions */ /** selected cash amount */ private int operatingCost; /** * Instantiates an operating costs action * * @param pc Public Company */ public OperatingCost(PublicCompanyI pc, OCType ot, int ocCosts) { operatingCompany = pc; operatingCompanyName = pc.getName(); operatingCostType = ot; suggestedCost = ocCosts; maximumCost = pc.getCash(); } @Override public boolean isInCorrectionMenu(){ return inCorrectionMenu; } public void setCorrectionMenu(boolean menu){ inCorrectionMenu = menu; } @Override public CashHolder getCashHolder() { return operatingCompany; } @Override public String getCashHolderName() { return operatingCompanyName; } @Override public int getAmount() { if (acted) return -operatingCost; else return suggestedCost; } @Override public void setAmount(int amount) { acted=true; operatingCost = amount; } public OCType getOCType(){ return operatingCostType; } @Override public boolean equals(PossibleAction action) { if (!(action instanceof OperatingCost)) return false; OperatingCost a = (OperatingCost) action; return (a.operatingCompany == this.operatingCompany && a.operatingCostType == this.operatingCostType && a.suggestedCost == this.suggestedCost && a.maximumCost == this.maximumCost && a.inCorrectionMenu == this.inCorrectionMenu ); } @Override public String toString() { StringBuffer b = new StringBuffer("OperatingCost"); if (!acted) { b.append(" (not acted)"); if (operatingCompany != null) b.append(", operatingCompany="+operatingCompany); b.append(", operatingCostType="+operatingCostType); b.append(", suggestedCost="+suggestedCost); b.append(", maximumCost="+maximumCost); b.append(", inCorrectionMenu="+inCorrectionMenu); } else { b.append(" (acted)"); if (operatingCompany != null) b.append(", operatingCompany="+operatingCompany); b.append(", operatingCostType="+operatingCostType); b.append(", operatingCost="+operatingCost); } return b.toString(); } /** Deserialize */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); if (Util.hasValue(operatingCompanyName)) operatingCompany = getCompanyManager().getCompanyByName(operatingCompanyName); } } --- NEW FILE: CorrectCash.java --- package rails.game.correct; import rails.game.*; import rails.game.action.PossibleAction; import rails.util.Util; import java.io.IOException; import java.io.ObjectInputStream; import java.util.*; /** * Correction action that changes the cash position of a cashholder. * * @author Stefan Frey */ public class CorrectCash extends PossibleAction implements CorrectCashI, CorrectionAction { /** The Constant serialVersionUID. */ public static final long serialVersionUID = 1L; /* Preconditions */ /** shows in correction menu */ private boolean inCorrectionMenu; /** cash holder */ transient private CashHolder correctCashHolder; /** converted to name */ private String cashHolderName; private String cashHolderType; /** maximum Amount to deduct */ private int maximumNegative; /* Postconditions */ /** selected cash amount */ private int correctAmount; /** * Instantiates a new correct cash * * @param pl Player */ public CorrectCash(Player pl) { correctCashHolder = pl; cashHolderName = pl.getName(); cashHolderType = "Player"; maximumNegative = pl.getCash(); } /** * Instantiates a new correct cash * * @param pc Public Company */ public CorrectCash(PublicCompanyI pc) { correctCashHolder = pc; cashHolderName = pc.getName(); cashHolderType = "PublicCompany"; maximumNegative = pc.getCash(); } @Override public boolean isInCorrectionMenu(){ return inCorrectionMenu; } public void setCorrectionMenu(boolean menu){ inCorrectionMenu = menu; } @Override public CashHolder getCashHolder() { return correctCashHolder; } @Override public String getCashHolderName() { return cashHolderName; } @Override public int getAmount() { return correctAmount; } @Override public void setAmount(int amount) { correctAmount = amount; } @Override public boolean equals(PossibleAction action) { if (!(action instanceof CorrectCash)) return false; CorrectCash a = (CorrectCash) action; return (a.correctCashHolder == this.correctCashHolder && a.maximumNegative == this.maximumNegative && a.inCorrectionMenu == this.inCorrectionMenu ); } @Override public String toString() { StringBuffer b = new StringBuffer("CorrectCash"); if (acted) { b.append("Not Acted"); if (correctCashHolder != null) b.append("correctCashHolder="+correctCashHolder); b.append("maximumNegative="+maximumNegative); b.append("inCorrectionMenu="+inCorrectionMenu); } else { b.append("Acted"); if (correctCashHolder != null) b.append("correctCashHolder="+correctCashHolder); b.append("correctAmount="+correctAmount); } return b.toString(); } /** Deserialize */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); if (Util.hasValue(cashHolderName) && Util.hasValue(cashHolderType)) { if (cashHolderType == "Player") correctCashHolder = getGameManager().getPlayerManager().getPlayerByName(cashHolderName); else if (cashHolderType == "PublicCompany") correctCashHolder = getCompanyManager().getCompanyByName(cashHolderName); } } } --- NEW FILE: CorrectCashI.java --- package rails.game.correct; import rails.game.*; /** * Interface to action that changes the cash position of a cashholder. * * @author Stefan Frey */ public interface CorrectCashI { /** * Gets preconditions. */ public CashHolder getCashHolder(); public String getCashHolderName(); /** * Gets and sets postconditions. */ public int getAmount(); public void setAmount(int amount); } |
From: Stefan F. <ste...@us...> - 2010-02-14 20:46:59
|
Update of /cvsroot/rails/18xx/rails/game/correct In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21878/rails/game/correct Log Message: Directory /cvsroot/rails/18xx/rails/game/correct added to the repository |
From: Erik V. <ev...@us...> - 2010-02-14 15:44:53
|
Update of /cvsroot/rails/18xx/tiles In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv18959/tiles Modified Files: Rails18xx.ini Log Message: Index: Rails18xx.ini =================================================================== RCS file: /cvsroot/rails/18xx/tiles/Rails18xx.ini,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Rails18xx.ini 8 Jan 2010 20:46:57 -0000 1.4 --- Rails18xx.ini 14 Feb 2010 15:44:45 -0000 1.5 *************** *** 169,170 **** --- 169,180 ---- NormPos=286,146,724,442 Visible=0 + [TFormDiaExportXML] + FormVersion=0 + Flags=0 + ShowCmd=1 + PixelsPerInch=96 + MinMaxPos(1440x900)=-1,-1,-1,-1 + MinMaxPos=-1,-1,-1,-1 + NormPos(1440x900)=286,146,724,442 + NormPos=286,146,724,442 + Visible=0 |
From: Erik V. <ev...@us...> - 2010-02-14 15:31:29
|
Update of /cvsroot/rails/18xx/tiles/svg In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17710/tiles/svg Added Files: tile-56001.svg Log Message: New tile (teh correct one for toronto in 1856) --- NEW FILE: tile-56001.svg --- <?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="269" cy="128" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><circle cx="123" cy="212" r="51" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="12"/><path d="M 123,212 L 49,255" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 269,128 L 343,85" fill="none" stroke="#FFFFFF" stroke-width="34" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 123,212 L 49,255" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><path d="M 269,128 L 343,85" fill="none" stroke="#000000" stroke-width="26" stroke-linecap="butt" stroke-linejoin="round"/><circle cx="269" cy="128" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="86" cy="107" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="86" y="107" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">30</text><circle cx="123" cy="212" r="51" fill="#FFFFFF" stroke="#000000" stroke-width="4"/><ellipse rx="38" ry="34" cx="306" cy="233" fill="#FFFFFF" stroke="#000000" stroke-width="2" stroke-linejoin="round"/><text x="306" y="233" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="Bookman Old Style" font-size="51">30</text><text x="196" y="43" dy="0.3em" fill="#000000" stroke="#000000" text-anchor="middle" font-family="TimpaniHeavy" font-size="51">Toronto</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> |
From: Erik V. <ev...@us...> - 2010-02-11 21:59:19
|
Update of /cvsroot/rails/18xx/data/1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6342/data/1856 Modified Files: Tiles.xml TileSet.xml Map.xml Log Message: Fixed Toronto tile (rev. was 40, must be 30) Index: TileSet.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1856/TileSet.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TileSet.xml 23 Jan 2010 17:04:55 -0000 1.8 --- TileSet.xml 11 Feb 2010 21:58:05 -0000 1.9 *************** *** 19,23 **** <Upgrade id="59" relayBaseTokens="yes"/> </Tile> ! <Tile id="-21"><!-- Toronto --> <Upgrade id="120"/> </Tile> --- 19,23 ---- <Upgrade id="59" relayBaseTokens="yes"/> </Tile> ! <Tile id="-56001"><!-- Toronto --> <Upgrade id="120"/> </Tile> Index: Map.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1856/Map.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Map.xml 8 Sep 2009 21:47:03 -0000 1.11 --- Map.xml 11 Feb 2010 21:58:10 -0000 1.12 *************** *** 79,83 **** <Hex name="N7" tile="0"/> <Hex name="N9" tile="-1"/> ! <Hex name="N11" tile="-21" orientation="2" city="Toronto"/><!-- home city to be defined --> <Hex name="N15" tile="0" cost="40"/> <Hex name="N17" tile="-20" city="Welland"/> --- 79,83 ---- <Hex name="N7" tile="0"/> <Hex name="N9" tile="-1"/> ! <Hex name="N11" tile="-56001" orientation="0" city="Toronto"/><!-- home city to be defined --> <Hex name="N15" tile="0" cost="40"/> <Hex name="N17" tile="-20" city="Welland"/> Index: Tiles.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1856/Tiles.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Tiles.xml 8 Jan 2010 20:46:54 -0000 1.8 --- Tiles.xml 11 Feb 2010 21:58:04 -0000 1.9 *************** *** 1,3 **** ! <?xml version="1.0" encoding="UTF-8"?><Tiles><Tile colour="white" id="0" name="empty"/><Tile colour="white" id="-1" name="1 village"> <Station id="city1" position="002" type="Town"/> </Tile><Tile colour="white" id="-2" name="2 villages"> --- 1,3 ---- ! <?xml version="1.0" encoding="UTF-8" standalone="no"?><Tiles><Tile colour="white" id="0" name="empty"/><Tile colour="white" id="-1" name="1 village"> <Station id="city1" position="002" type="Town"/> </Tile><Tile colour="white" id="-2" name="2 villages"> *************** *** 13,21 **** <Station id="city1" position="002" slots="1" type="City"/> <Station id="city2" position="302" slots="1" type="City"/> ! </Tile><Tile colour="yellow" id="-21" name="NY"> ! <Station id="city1" position="202" slots="1" type="City" value="40"/> ! <Station id="city2" position="502" slots="1" type="City" value="40"/> ! <Track from="city1" gauge="normal" to="side2"/> ! <Track from="city2" gauge="normal" to="side5"/> </Tile><Tile colour="red" id="-901" name="OM 1 way"> <Station id="city1" position="0" type="OffMapCity" value="-1"/> --- 13,21 ---- <Station id="city1" position="002" slots="1" type="City"/> <Station id="city2" position="302" slots="1" type="City"/> ! </Tile><Tile colour="yellow" id="-56001" name="Toronto"> ! <Station id="city1" position="102" slots="1" type="City" value="30"/> ! <Station id="city2" position="402" slots="1" type="City" value="30"/> ! <Track from="city2" gauge="normal" to="side4"/> ! <Track from="city1" gauge="normal" to="side1"/> </Tile><Tile colour="red" id="-901" name="OM 1 way"> <Station id="city1" position="0" type="OffMapCity" value="-1"/> |