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-03-16 21:23:00
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21662/rails/game Modified Files: Company.java Portfolio.java GameManager.java Log Message: Fixed problem with use of ExchangeForShare caused by a previous change. Corrected setting of 'holder' in SpecialProperty (even though it's not acually used). Index: Portfolio.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Portfolio.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** Portfolio.java 14 Feb 2010 20:47:45 -0000 1.45 --- Portfolio.java 16 Mar 2010 21:22:17 -0000 1.46 *************** *** 460,466 **** * Make an abbreviated list of trains, like "2(6) 3(5)" etc, to show in the * IPO. - * - * @param holder The Portfolio for which this list will be made (always - * IPO). */ --- 460,463 ---- *************** *** 492,497 **** * Make a full list of trains, like "2 2 3 3", to show in any field * describing train possessions, except the IPO. - * - * @param holder The Portfolio for which this list will be made. */ public String makeFullListOfTrains() { --- 489,492 ---- *************** *** 530,533 **** --- 525,529 ---- } result = specialProperties.add(property); + property.setHolder(this); // Special case for bonuses with predefined locations Index: Company.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Company.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Company.java 1 Mar 2010 22:27:30 -0000 1.15 --- Company.java 16 Mar 2010 21:22:17 -0000 1.16 *************** *** 20,24 **** --- 20,30 ---- protected CompanyTypeI type; protected int companyNumber; // For internal use + + /* Note: portfolio is used in two ways: + * In private companies, it is primarily the portfolio that holds this private. + * In public companies, it is the portfolio of this company. + * This contradictory use needs to be disentangled. */ protected Portfolio portfolio = null; + protected String infoText = ""; protected String parentInfoText = ""; Index: GameManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** GameManager.java 14 Mar 2010 13:10:15 -0000 1.92 --- GameManager.java 16 Mar 2010 21:22:17 -0000 1.93 *************** *** 1350,1354 **** public boolean addObject(Moveable object) { if (object instanceof SpecialPropertyI) { ! return addSpecialProperty((SpecialPropertyI) object); } else { return false; --- 1350,1356 ---- public boolean addObject(Moveable object) { if (object instanceof SpecialPropertyI) { ! SpecialPropertyI sp = (SpecialPropertyI) object; ! sp.setHolder(null); ! return addSpecialProperty(sp); } else { return false; |
From: Erik V. <ev...@us...> - 2010-03-16 21:22:58
|
Update of /cvsroot/rails/18xx/rails/game/special In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21662/rails/game/special Modified Files: SpecialPropertyI.java SpecialProperty.java ExchangeForShare.java Log Message: Fixed problem with use of ExchangeForShare caused by a previous change. Corrected setting of 'holder' in SpecialProperty (even though it's not acually used). Index: SpecialProperty.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/special/SpecialProperty.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** SpecialProperty.java 28 Feb 2010 21:38:05 -0000 1.25 --- SpecialProperty.java 16 Mar 2010 21:22:13 -0000 1.26 *************** *** 109,112 **** --- 109,116 ---- } + public void setHolder(MoveableHolder holder) { + this.holder = holder; + } + public MoveableHolder getHolder() { return holder; Index: ExchangeForShare.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/special/ExchangeForShare.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ExchangeForShare.java 28 Feb 2010 21:38:05 -0000 1.17 --- ExchangeForShare.java 16 Mar 2010 21:22:13 -0000 1.18 *************** *** 32,36 **** public boolean isExecutionable() { ! return holder instanceof Player; } --- 32,36 ---- public boolean isExecutionable() { ! return originalCompany.getPortfolio().getOwner() instanceof Player; } Index: SpecialPropertyI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/special/SpecialPropertyI.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** SpecialPropertyI.java 2 Mar 2010 22:15:13 -0000 1.11 --- SpecialPropertyI.java 16 Mar 2010 21:21:59 -0000 1.12 *************** *** 13,16 **** --- 13,19 ---- public CompanyI getOriginalCompany(); + public void setHolder(MoveableHolder holder); + public MoveableHolder getHolder(); + public boolean isExecutionable(); |
From: Brett L. <wak...@us...> - 2010-03-14 19:29:15
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10860/rails/game Modified Files: Game.java Log Message: Update files with version number 1.2 Index: Game.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Game.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Game.java 11 Feb 2010 21:55:30 -0000 1.49 --- Game.java 14 Mar 2010 19:29:07 -0000 1.50 *************** *** 12,16 **** public class Game { ! public static final String version = "1.1.3+"; /** The component Manager */ --- 12,16 ---- public class Game { ! public static final String version = "1.2"; /** The component Manager */ |
From: Brett L. <wak...@us...> - 2010-03-14 19:29:15
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10860 Modified Files: rails.bat build.xml Log Message: Update files with version number 1.2 Index: rails.bat =================================================================== RCS file: /cvsroot/rails/18xx/rails.bat,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** rails.bat 3 Feb 2010 05:17:44 -0000 1.7 --- rails.bat 14 Mar 2010 19:29:06 -0000 1.8 *************** *** 1,2 **** ! java -jar rails-1.1.3.jar %1 \ No newline at end of file --- 1,2 ---- ! java -jar rails-1.2.jar %1 \ No newline at end of file Index: build.xml =================================================================== RCS file: /cvsroot/rails/18xx/build.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** build.xml 3 Feb 2010 05:17:44 -0000 1.13 --- build.xml 14 Mar 2010 19:29:06 -0000 1.14 *************** *** 10,14 **** <property name="target" value="1.5"/> <property name="source" value="1.5"/> ! <property name="version" value="1.1.3"/> <taskdef name="jarbundler" classpath="tools/lib/jarbundler-2.1.0.jar" --- 10,14 ---- <property name="target" value="1.5"/> <property name="source" value="1.5"/> ! <property name="version" value="1.2"/> <taskdef name="jarbundler" classpath="tools/lib/jarbundler-2.1.0.jar" |
From: Stefan F. <ste...@us...> - 2010-03-14 15:35:49
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9138 Modified Files: LocalisedText.properties Log Message: Improved cash correction dialog text and handling of "+" sign. Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** LocalisedText.properties 14 Mar 2010 13:10:15 -0000 1.121 --- LocalisedText.properties 14 Mar 2010 15:35:40 -0000 1.122 *************** *** 134,138 **** CorrectCashSubstractMoney=CORRECTION: {0} pays {1} to the bank CorrectCashDialogTitle=Cash Correction ! CorrectCashDialogMessage=Adjust the cash position for {0} CorrectCashError=Cash correction not possible for {0}: {1} CorrectCashToolTip=Click here to adjust cash position --- 134,138 ---- CorrectCashSubstractMoney=CORRECTION: {0} pays {1} to the bank CorrectCashDialogTitle=Cash Correction ! CorrectCashDialogMessage=Adjust the cash position for {0}:\nPositive numbers increase (cash from bank) \nNegative numbers decrease (cash to bank) CorrectCashError=Cash correction not possible for {0}: {1} CorrectCashToolTip=Click here to adjust cash position |
From: Stefan F. <ste...@us...> - 2010-03-14 15:35:48
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9138/rails/ui/swing Modified Files: GameStatus.java Log Message: Improved cash correction dialog text and handling of "+" sign. Index: GameStatus.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameStatus.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** GameStatus.java 8 Mar 2010 20:33:21 -0000 1.43 --- GameStatus.java 14 Mar 2010 15:35:40 -0000 1.44 *************** *** 696,699 **** --- 696,701 ---- LocalText.getText("CorrectCashDialogTitle"), JOptionPane.QUESTION_MESSAGE, null, null, 0); + if (amountString.substring(0,1).equals("+")) + amountString = amountString.substring(1); int amount; try { |
From: Stefan F. <ste...@us...> - 2010-03-14 14:21:34
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv712/rails/game Modified Files: OperatingRound.java Log Message: Added fix to allow zero cost token lay after removal of default operating costs actions. Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** OperatingRound.java 12 Mar 2010 07:30:24 -0000 1.115 --- OperatingRound.java 14 Mar 2010 14:21:24 -0000 1.116 *************** *** 2272,2282 **** // LayBaseToken Actions if (operatingCompany.getNumberOfFreeBaseTokens() != 0) { ! int[] costs = operatingCompany.getBaseTokenLayCosts(); ! for (int cost : costs) { ! if ((cost <= operatingCompany.getCash()) && (cost != 0 || costs.length == 1)) // distance method returns home base, but in sequence costs can be zero possibleActions.add(new OperatingCost(OperatingCost.OCType.LAY_BASE_TOKEN, cost, false)); } } ! // Default OperatingCost Actions // possibleActions.add(new OperatingCost( --- 2272,2296 ---- // LayBaseToken Actions if (operatingCompany.getNumberOfFreeBaseTokens() != 0) { ! int[] costsArray = operatingCompany.getBaseTokenLayCosts(); ! ! // change to set to allow for identity and ordering ! Set<Integer> costsSet = new TreeSet<Integer>(); ! for (int cost:costsArray) ! if (!(cost == 0 && costsArray.length != 1)) // fix for sequence based home token ! costsSet.add(cost); ! ! // SpecialTokenLay Actions - workaround for a better handling of those later ! for (SpecialTokenLay stl : getSpecialProperties(SpecialTokenLay.class)) { ! log.debug("Special tokenlay property: " + stl); ! if (stl.getTokenClass().equals(BaseToken.class) && stl.isFree()) ! costsSet.add(0); ! } ! ! for (int cost : costsSet) { ! if (cost <= operatingCompany.getCash()) // distance method returns home base, but in sequence costsSet can be zero possibleActions.add(new OperatingCost(OperatingCost.OCType.LAY_BASE_TOKEN, cost, false)); } } ! // Default OperatingCost Actions // possibleActions.add(new OperatingCost( |
From: Stefan F. <ste...@us...> - 2010-03-14 13:10:25
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27643/rails/game Modified Files: GameManagerI.java GameManager.java ShareSellingRound.java Log Message: Updated EndOfGame Handling (undo possible, ranking display step by step, updated forced share selling message display, LocalText) Index: GameManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** GameManager.java 14 Mar 2010 08:06:41 -0000 1.91 --- GameManager.java 14 Mar 2010 13:10:15 -0000 1.92 *************** *** 104,107 **** --- 104,108 ---- protected BooleanState gameOver = new BooleanState("GameOver" ,false); + protected Boolean gameOverReportedUI = false; protected BooleanState endedByBankruptcy = new BooleanState("EndedByBankruptcy", false); *************** *** 793,797 **** } ! setCorrectionActions(); // Add the Undo/Redo possibleActions here. --- 794,798 ---- } ! if (!isGameOver()) setCorrectionActions(); // Add the Undo/Redo possibleActions here. *************** *** 902,906 **** getCurrentRound().process(new NullAction (NullAction.DONE)); getCurrentRound().setPossibleActions(); ! setCorrectionActions(); } --- 903,907 ---- getCurrentRound().process(new NullAction (NullAction.DONE)); getCurrentRound().setPossibleActions(); ! if (!isGameOver()) setCorrectionActions(); } *************** *** 917,921 **** } getCurrentRound().setPossibleActions(); ! setCorrectionActions(); } catch (Exception e) { --- 918,922 ---- } getCurrentRound().setPossibleActions(); ! if (!isGameOver()) setCorrectionActions(); } catch (Exception e) { *************** *** 1013,1020 **** private void finishGame() { gameOver.set(true); - ReportBuffer.add(LocalText.getText("GameOver")); - createRound(EndOfGameRound.class); ! logGameReport(); } --- 1014,1032 ---- private void finishGame() { gameOver.set(true); ! String message = LocalText.getText("GameOver"); ! ReportBuffer.add(message); ! DisplayBuffer.add(message); ! ! List<String> gameReport = getGameReport(); ! StringBuilder report = new StringBuilder(); ! for (String s:gameReport) ! report.append(s); ! ReportBuffer.add(report.toString()); ! ! // activate gameReport for UI ! setGameOverReportedUI(false); ! ! createRound(EndOfGameRound.class); } *************** *** 1025,1043 **** return gameOver.booleanValue(); } ! ! /* (non-Javadoc) ! * @see rails.game.GameManagerI#logGameReport() ! */ ! public void logGameReport() { ! ! ReportBuffer.add(getGameReport()); } /* (non-Javadoc) * @see rails.game.GameManagerI#getGameReport() */ ! public String getGameReport() { ! StringBuffer b = new StringBuffer(); /* Sort players by total worth */ --- 1037,1055 ---- return gameOver.booleanValue(); } ! ! public void setGameOverReportedUI(boolean b){ ! gameOverReportedUI = b; } + public boolean getGameOverReportedUI(){ + return(gameOverReportedUI); + } + /* (non-Javadoc) * @see rails.game.GameManagerI#getGameReport() */ ! public List<String> getGameReport() { ! List<String> b = new ArrayList<String>(); /* Sort players by total worth */ *************** *** 1050,1064 **** /* Report winner */ Player winner = rankedPlayers.get(0); ! b.append("The winner is " + winner.getName() + "!"); /* Report final ranking */ - b.append("\n\nThe final ranking is:"); int i = 0; for (Player p : rankedPlayers) { ! b.append("\n" + (++i) + ". " + Bank.format(p.getWorth()) + " " + p.getName()); } ! return b.toString(); } --- 1062,1076 ---- /* Report winner */ Player winner = rankedPlayers.get(0); ! b.add(LocalText.getText("EoGWinner") + winner.getName() ! + "! \n\n"+ LocalText.getText("EoGFinalRanking") + " :"); /* Report final ranking */ int i = 0; for (Player p : rankedPlayers) { ! b.add("\n" + (++i) + ". " + Bank.format(p.getWorth()) + " " + p.getName()); } ! return b; } Index: GameManagerI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManagerI.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** GameManagerI.java 14 Mar 2010 08:06:39 -0000 1.28 --- GameManagerI.java 14 Mar 2010 13:10:14 -0000 1.29 *************** *** 71,75 **** public abstract boolean isGameOver(); ! public abstract void logGameReport(); /** --- 71,77 ---- public abstract boolean isGameOver(); ! public void setGameOverReportedUI(boolean b); ! ! public boolean getGameOverReportedUI(); /** *************** *** 78,82 **** * @return */ ! public abstract String getGameReport(); /** --- 80,84 ---- * @return */ ! public abstract List<String> getGameReport(); /** Index: ShareSellingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/ShareSellingRound.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ShareSellingRound.java 31 Jan 2010 22:22:28 -0000 1.29 --- ShareSellingRound.java 14 Mar 2010 13:10:15 -0000 1.30 *************** *** 75,79 **** if (possibleActions.isEmpty() && cashToRaise.intValue() > 0) { ! DisplayBuffer.add(LocalText.getText("YouAreBankrupt", Bank.format(cashToRaise.intValue()))); --- 75,79 ---- if (possibleActions.isEmpty() && cashToRaise.intValue() > 0) { ! DisplayBuffer.add(LocalText.getText("YouMustRaiseCashButCannot", Bank.format(cashToRaise.intValue()))); |
From: Stefan F. <ste...@us...> - 2010-03-14 13:10:24
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27643/rails/ui/swing Modified Files: StatusWindow.java GameUIManager.java Log Message: Updated EndOfGame Handling (undo possible, ranking display step by step, updated forced share selling message display, LocalText) Index: StatusWindow.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/StatusWindow.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** StatusWindow.java 8 Mar 2010 20:33:27 -0000 1.39 --- StatusWindow.java 14 Mar 2010 13:10:15 -0000 1.40 *************** *** 6,9 **** --- 6,10 ---- import java.awt.event.*; import java.util.ArrayList; + import java.util.Collections; import java.util.List; *************** *** 324,334 **** public void setCorrectionMenu() { ! // Update the menu correctionMenu.removeAll(); correctionMenu.setEnabled(false); List<CorrectionModeAction> corrections = possibleActions.getType(CorrectionModeAction.class); ! if (corrections != null) { for (CorrectionModeAction a : corrections) { ActionCheckBoxMenuItem item = new ActionCheckBoxMenuItem ( --- 325,338 ---- public void setCorrectionMenu() { ! // Update the correction menu correctionMenu.removeAll(); correctionMenu.setEnabled(false); + // currently only shows CorrectionModeActions List<CorrectionModeAction> corrections = possibleActions.getType(CorrectionModeAction.class); ! ! ! if (corrections != null && !corrections.isEmpty()) { for (CorrectionModeAction a : corrections) { ActionCheckBoxMenuItem item = new ActionCheckBoxMenuItem ( *************** *** 366,371 **** public void updateStatus() { ! if (!(currentRound instanceof StockRound)) { return; ! } if (currentRound instanceof TreasuryShareRound) { --- 370,375 ---- public void updateStatus() { ! if (!(currentRound instanceof StockRound || currentRound instanceof EndOfGameRound)) ! return; if (currentRound instanceof TreasuryShareRound) { *************** *** 388,406 **** ((ShareSellingRound) currentRound).getRemainingCashToRaise(); if (!possibleActions.contains(SellShares.class)) { ! JOptionPane.showMessageDialog(this, LocalText.getText( ! "YouAreBankrupt", Bank.format(cash)), "", ! JOptionPane.OK_OPTION); /* * For now assume that this ends the game (not true in all * games) */ ! JOptionPane.showMessageDialog(this, ! gameUIManager.getGameManager().getGameReport(), "", JOptionPane.OK_OPTION); /* * All other wrapping up has already been done when calling * getSellableCertificates, so we can just finish now. */ ! finish(); ! return; } else { JOptionPane.showMessageDialog(this, LocalText.getText( --- 392,412 ---- ((ShareSellingRound) currentRound).getRemainingCashToRaise(); if (!possibleActions.contains(SellShares.class)) { ! // should not occur anymore ! // JOptionPane.showMessageDialog(this, LocalText.getText( ! // "YouMustRaiseCashButCannot", Bank.format(cash)), "", ! // JOptionPane.OK_OPTION); /* * For now assume that this ends the game (not true in all * games) + * sfy: changed now */ ! // JOptionPane.showMessageDialog(this, ! // gameUIManager.getGameManager().getGameReport(), "", JOptionPane.OK_OPTION); /* * All other wrapping up has already been done when calling * getSellableCertificates, so we can just finish now. */ ! // finish(); ! // return; } else { JOptionPane.showMessageDialog(this, LocalText.getText( *************** *** 408,412 **** JOptionPane.OK_OPTION); } ! } else if (!updateGameSpecificSettings()) { setTitle(LocalText.getText( --- 414,418 ---- JOptionPane.OK_OPTION); } ! } else if (currentRound instanceof StockRound && !updateGameSpecificSettings()) { setTitle(LocalText.getText( *************** *** 491,494 **** --- 497,502 ---- } + if (currentRound instanceof EndOfGameRound) endOfGame(); + pack(); *************** *** 638,680 **** } - public void reportGameOver() { - /* End of rails.game checks */ - - JOptionPane.showMessageDialog(this, "GAME OVER", "", - JOptionPane.OK_OPTION); - JOptionPane.showMessageDialog(this, - GameManager.getInstance().getGameReport(), "", - JOptionPane.OK_OPTION); - /* - * All other wrapping up has already been done when calling - * getSellableCertificates, so we can just finish now. - */ - finish(); - } - - public void reportBankBroken() { - - /* The message must become configuration-depedent */ - JOptionPane.showMessageDialog(this, - "Bank is broken. The rails.game will be over after the current set of ORs."); - } - /** ! * Finish the application. */ ! public void finish() { ! setVisible(true); ! gameUIManager.reportWindow.setVisible(true); ! gameUIManager.stockChart.setVisible(true); ! /* Disable all buttons */ passButton.setEnabled(true); passButton.setText(LocalText.getText("END_OF_GAME_CLOSE_ALL_WINDOWS")); gameUIManager.orWindow.finish(); ! toFront(); } ! public void keyReleased(KeyEvent e) {} --- 646,696 ---- } /** ! * End of Game processing */ ! public void endOfGame() { ! // setVisible(true); ! // gameUIManager.reportWindow.setVisible(true); ! // gameUIManager.stockChart.setVisible(true); ! ! setTitle(LocalText.getText("EoGTitle")); ! // Enable Passbutton passButton.setEnabled(true); passButton.setText(LocalText.getText("END_OF_GAME_CLOSE_ALL_WINDOWS")); + gameUIManager.orWindow.finish(); + } ! public void endOfGameReport() { + GameManagerI gm = GameManager.getInstance(); + + if (gm.getGameOverReportedUI()) + return; + else + gm.setGameOverReportedUI(true); + + JOptionPane.showMessageDialog(this, + LocalText.getText("EoGPressButton"), + LocalText.getText("EoGFinalRanking"), + JOptionPane.PLAIN_MESSAGE + ); + + // show game report line by line + List<String> gameReport = GameManager.getInstance().getGameReport(); + Collections.reverse(gameReport); + + StringBuilder report = new StringBuilder(); + for (String s:gameReport) { + report.insert(0, s); + JOptionPane.showMessageDialog(this, + report, + LocalText.getText("EoGFinalRanking"), + JOptionPane.PLAIN_MESSAGE + ); + } } ! public void keyReleased(KeyEvent e) {} Index: GameUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameUIManager.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** GameUIManager.java 14 Mar 2010 08:06:45 -0000 1.43 --- GameUIManager.java 14 Mar 2010 13:10:15 -0000 1.44 *************** *** 179,189 **** // End of game checks ! if (gameManager.isGameOver()) { ! ! statusWindow.reportGameOver(); ! ! return true; ! ! } // else if (gameManager.getBank().isJustBroken()) { // --- 179,189 ---- // End of game checks ! // if (gameManager.isGameOver()) { ! // ! // statusWindow.reportGameOver(); ! // ! // return true; ! // ! // } // else if (gameManager.getBank().isJustBroken()) { // *************** *** 207,210 **** --- 207,213 ---- } } + + // display the end of game report + if (gameManager.isGameOver()) statusWindow.endOfGameReport(); if (!result) return false; *************** *** 335,338 **** --- 338,342 ---- boolean correctionOverride = statusWindow.setupFor(currentRound); + correctionOverride = false; if (correctionOverride) { |
From: Stefan F. <ste...@us...> - 2010-03-14 13:10:23
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27643 Modified Files: LocalisedText.properties Log Message: Updated EndOfGame Handling (undo possible, ranking display step by step, updated forced share selling message display, LocalText) Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** LocalisedText.properties 14 Mar 2010 08:06:45 -0000 1.120 --- LocalisedText.properties 14 Mar 2010 13:10:15 -0000 1.121 *************** *** 167,170 **** --- 167,174 ---- EnterRevenue=Enter the earnings of the operating company EnterSearch=Enter search target + EoGFinalRanking=Final ranking + EoGPressButton=Press OK to display the final ranking + EoGTitle=End of Game + EoGWinner=The winner is ExchangesBaseToken={0} exchanges the {1} base token on {2} ExchangeableToken=Hex {1} {2}, city {3} (with tracks to {4}) [was {0} token] *************** *** 551,555 **** YOU_MAY_ADD_CASH=(you may add up to {0}) YOU_MUST_ADD_CASH=(you must add {0}) - YouAreBankrupt=You must still raise {0}, but you can\\'t sell any more shares, so you are Bankrupt! # Help text prefix YouCan, to include a 'menu' or 'info' text (first char. to be lowercased) YouCan=You can {0}. --- 555,558 ---- *************** *** 557,560 **** --- 560,564 ---- YouCannotRepayAllLoans={0} can repay max. {1} out of {2} loans of {3}, but cannot save it from merging into CGR YouMustRaiseCash=You must raise {0} cash by selling shares + YouMustRaiseCashButCannot=You must still raise {0}, but you can''t sell any more 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-03-14 12:27:18
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv22814/rails/ui/swing Modified Files: GridPanel.java Log Message: Removed pack() after recreate - it's unnecessary and undoes window sizing by user Index: GridPanel.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GridPanel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GridPanel.java 31 Jan 2010 22:22:34 -0000 1.4 --- GridPanel.java 14 Mar 2010 12:26:59 -0000 1.5 *************** *** 126,130 **** } } - parentFrame.pack(); } --- 126,129 ---- |
From: Stefan F. <ste...@us...> - 2010-03-14 09:14:13
|
Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6221/rails/ui/swing/hexmap Modified Files: NSHexMap.java Log Message: Fixed typo (= -> -) that caused Rails to freeze on zooms on NorthSouth-Maps Index: NSHexMap.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/NSHexMap.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** NSHexMap.java 11 Mar 2010 20:38:19 -0000 1.13 --- NSHexMap.java 14 Mar 2010 09:14:04 -0000 1.14 *************** *** 72,76 **** for (int i = 0; i < hexArray.length; i++) { ! ii = i = minX + 1; for (int j = 0; j < hexArray[0].length; j++) { jj = j - minY + 1; --- 72,76 ---- for (int i = 0; i < hexArray.length; i++) { ! ii = i - minX + 1; for (int j = 0; j < hexArray[0].length; j++) { jj = j - minY + 1; |
From: Stefan F. <ste...@us...> - 2010-03-14 08:06:56
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31728 Modified Files: LocalisedText.properties Log Message: Change broken bank to state variable. Dialog handling changed to standard procedures. Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** LocalisedText.properties 11 Mar 2010 21:28:30 -0000 1.119 --- LocalisedText.properties 14 Mar 2010 08:06:45 -0000 1.120 *************** *** 33,38 **** # Note: in the next item, {0} MUST be in front BuyPrivatePrompt={0} from {1} for {2}...{3} BankHas=The Bank has {0}. - BankIsBroken=Bank is broken BankSizeIs=Bank size is {0} BidTooHigh=Bid too high, player has only {0} free for bidding --- 33,41 ---- # Note: in the next item, {0} MUST be in front BuyPrivatePrompt={0} from {1} for {2}...{3} + BankIsBrokenDisplayText=Bank is broken. Play continues until {0} + BankIsBrokenReportText=Bank is broken + bankIsBrokenPlaySetOfORs=the current set of operating rounds is finished. + bankIsBrokenPlayOnlyOR=the current operating round is finished. BankHas=The Bank has {0}. BankSizeIs=Bank size is {0} BidTooHigh=Bid too high, player has only {0} free for bidding |
From: Stefan F. <ste...@us...> - 2010-03-14 08:06:55
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31728/rails/ui/swing Modified Files: GameUIManager.java Log Message: Change broken bank to state variable. Dialog handling changed to standard procedures. Index: GameUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameUIManager.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** GameUIManager.java 8 Mar 2010 20:33:27 -0000 1.42 --- GameUIManager.java 14 Mar 2010 08:06:45 -0000 1.43 *************** *** 185,193 **** return true; ! } else if (gameManager.getBank().isJustBroken()) { ! ! statusWindow.reportBankBroken(); ! ! } // Check in which round we are now, --- 185,194 ---- return true; ! } ! // else if (gameManager.getBank().isJustBroken()) { ! // ! // statusWindow.reportBankBroken(); ! // ! // } // Check in which round we are now, |
From: Stefan F. <ste...@us...> - 2010-03-14 08:06:54
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31728/rails/game Modified Files: GameManagerI.java GameManager.java Bank.java Log Message: Change broken bank to state variable. Dialog handling changed to standard procedures. Index: Bank.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Bank.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Bank.java 3 Feb 2010 05:37:54 -0000 1.20 --- Bank.java 14 Mar 2010 08:06:44 -0000 1.21 *************** *** 7,10 **** --- 7,11 ---- import rails.game.model.CashModel; import rails.game.model.ModelObject; + import rails.game.state.BooleanState; import rails.util.*; *************** *** 30,36 **** /** Is the bank broken (remains true once set) */ ! private boolean broken = false; ! /** Is the bank just broken (returns true exactly once) */ ! private boolean brokenReported = false; /** --- 31,37 ---- /** Is the bank broken (remains true once set) */ ! private BooleanState broken = new BooleanState("Bank.broken", false); ! // /** Is the bank just broken (returns true exactly once) */ ! // private BooleanState brokenReported = new BooleanState("Bank.brokenReported", false); /** *************** *** 143,149 **** * will become configurable. */ ! if (money.getCash() <= 0 && !broken) { ! broken = true; ! ReportBuffer.add(LocalText.getText("BankIsBroken")); } return negative; --- 144,150 ---- * will become configurable. */ ! if (money.getCash() <= 0 && !broken.booleanValue()) { ! broken.set(true); ! GameManager.getInstance().registerBrokenBank(); } return negative; *************** *** 151,162 **** public boolean isBroken() { ! return broken; } ! public boolean isJustBroken() { ! boolean result = broken && !brokenReported; ! brokenReported = true; ! return result; ! } /** --- 152,163 ---- public boolean isBroken() { ! return broken.booleanValue(); } ! // public boolean isJustBroken() { ! // boolean result = broken.booleanValue() && !brokenReported.booleanValue(); ! // brokenReported.set(true); ! // return result; ! // } /** Index: GameManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** GameManager.java 12 Mar 2010 20:28:27 -0000 1.90 --- GameManager.java 14 Mar 2010 08:06:41 -0000 1.91 *************** *** 998,1001 **** --- 998,1013 ---- } } + + public void registerBrokenBank(){ + ReportBuffer.add(LocalText.getText("BankIsBrokenReportText")); + String msgContinue; + if (gameEndsAfterSetOfORs) + msgContinue = LocalText.getText("bankIsBrokenPlaySetOfORs"); + else + msgContinue = LocalText.getText("bankIsBrokenPlayOnlyOR"); + String msg = LocalText.getText("BankIsBrokenDisplayText", msgContinue); + DisplayBuffer.add(msg); + addToNextPlayerMessages(msg, true); + } private void finishGame() { Index: GameManagerI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManagerI.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** GameManagerI.java 31 Jan 2010 22:22:28 -0000 1.27 --- GameManagerI.java 14 Mar 2010 08:06:39 -0000 1.28 *************** *** 8,11 **** --- 8,12 ---- import rails.game.action.PossibleAction; import rails.game.model.ModelObject; + import rails.game.move.AddToList; import rails.game.move.MoveStack; import rails.game.move.MoveableHolder; *************** *** 61,64 **** --- 62,67 ---- public abstract void registerBankruptcy(); + public abstract void registerBrokenBank(); + /** * To be called by the UI to check if the rails.game is over. *************** *** 186,189 **** --- 189,193 ---- public MoveStack getMoveStack (); public DisplayBuffer getDisplayBuffer(); + public void addToNextPlayerMessages(String s, boolean undoable); public ReportBuffer getReportBuffer(); public GuiHints getUIHints(); |
From: Erik V. <ev...@us...> - 2010-03-13 22:01:21
|
Update of /cvsroot/rails/18xx/data/1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21194/data/1856 Modified Files: CompanyManager.xml Log Message: Fixed CV start city in Toronto Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1856/CompanyManager.xml,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** CompanyManager.xml 9 Mar 2010 21:18:03 -0000 1.36 --- CompanyManager.xml 13 Mar 2010 22:01:06 -0000 1.37 *************** *** 134,138 **** </Company> <Company name="CV" type="Public" tokens="3" fgColour="FFFFFF" bgColour="800080"> ! <Home hex="N11"/> <Destination hex="I14"/> </Company> --- 134,138 ---- </Company> <Company name="CV" type="Public" tokens="3" fgColour="FFFFFF" bgColour="800080"> ! <Home hex="N11" city="2"/> <Destination hex="I14"/> </Company> |
From: Erik V. <ev...@us...> - 2010-03-13 18:43:09
|
Update of /cvsroot/rails/18xx/rails/game/specific/_1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20206/rails/game/specific/_1856 Modified Files: PublicCompany_CGR.java Log Message: Strengthen check on no-share-price-change when withholding Index: PublicCompany_CGR.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1856/PublicCompany_CGR.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PublicCompany_CGR.java 31 Jan 2010 22:22:32 -0000 1.8 --- PublicCompany_CGR.java 13 Mar 2010 18:42:59 -0000 1.9 *************** *** 96,100 **** public void withhold(int amount) { if (amount > 0) new CashMove(bank, this, amount); ! if (hasStockPrice && !runsWithBorrowedTrain()) { stockMarket.withhold(this); } --- 96,100 ---- public void withhold(int amount) { if (amount > 0) new CashMove(bank, this, amount); ! if (hasStockPrice && canSharePriceVary.booleanValue()) { stockMarket.withhold(this); } |
From: Erik V. <ev...@us...> - 2010-03-13 18:41:42
|
Update of /cvsroot/rails/18xx/rails/game/specific/_1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20030/rails/game/specific/_1856 Modified Files: OperatingRound_1856.java Log Message: Set GuiHints in resume to trigger rebuilding ORPanel Index: OperatingRound_1856.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1856/OperatingRound_1856.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** OperatingRound_1856.java 6 Feb 2010 23:48:26 -0000 1.30 --- OperatingRound_1856.java 13 Mar 2010 18:41:25 -0000 1.31 *************** *** 466,469 **** --- 466,470 ---- finalLoanRepaymentPending.set(false); guiHints.setActivePanel(GuiDef.Panel.MAP); + guiHints.setCurrentRoundType(getClass()); if (!resetOperatingCompanies(mergingCompanies)) return; |
From: Erik V. <ev...@us...> - 2010-03-12 20:29:06
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv630/rails/game Modified Files: StockRound.java GameManager.java GameDef.java Log Message: 1856: disallow selling share bought in the same SR turn Index: GameManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** GameManager.java 12 Mar 2010 17:18:47 -0000 1.89 --- GameManager.java 12 Mar 2010 20:28:27 -0000 1.90 *************** *** 81,86 **** protected EnumMap<GameDef.Parm, Object> gameParameters = new EnumMap<GameDef.Parm, Object>(GameDef.Parm.class); ! ! // protected EnumSet<CorrectionType> activeCorrections // = EnumSet.noneOf(CorrectionType.class); --- 81,86 ---- protected EnumMap<GameDef.Parm, Object> gameParameters = new EnumMap<GameDef.Parm, Object>(GameDef.Parm.class); ! ! // protected EnumSet<CorrectionType> activeCorrections // = EnumSet.noneOf(CorrectionType.class); *************** *** 160,164 **** */ protected List<String> nextPlayerMessages = new ArrayList<String>(); ! /** * The ReportBuffer collectes messages to be shown in the Game Report. --- 160,164 ---- */ protected List<String> nextPlayerMessages = new ArrayList<String>(); ! /** * The ReportBuffer collectes messages to be shown in the Game Report. *************** *** 231,235 **** throw new ConfigurationException("GameOption without name"); if (gameOptions.containsKey(optionName)) continue; ! // Include missing option option = new GameOption(optionName); --- 231,235 ---- throw new ConfigurationException("GameOption without name"); if (gameOptions.containsKey(optionName)) continue; ! // Include missing option option = new GameOption(optionName); *************** *** 247,255 **** if (optionDefault != null) option.setDefaultValue(optionDefault); ! gameOptions.put(optionName, optionDefault); } } ! Tag gameParmTag = tag.getChild("GameParameters"); --- 247,255 ---- if (optionDefault != null) option.setDefaultValue(optionDefault); ! gameOptions.put(optionName, optionDefault); } } ! Tag gameParmTag = tag.getChild("GameParameters"); *************** *** 293,296 **** --- 293,298 ---- } else if (ruleTagName.equals("NoSaleIfNotOperated")) { setGameParameter(GameDef.Parm.NO_SALE_IF_NOT_OPERATED, true); + } else if (ruleTagName.equals("NoSaleOfJustBoughtShare")) { + setGameParameter(GameDef.Parm.NO_SALE_OF_JUST_BOUGHT_CERT, true); } *************** *** 500,507 **** } ! if (GameOption.convertValueToBoolean(getGameOption("NoMapMode"))) guiParameters.put(GuiDef.Parm.NO_MAP_MODE, true); ! } --- 502,509 ---- } ! if (GameOption.convertValueToBoolean(getGameOption("NoMapMode"))) guiParameters.put(GuiDef.Parm.NO_MAP_MODE, true); ! } *************** *** 804,809 **** } ! ! // logging of game actions activated for (PossibleAction pa : possibleActions.getList()) { log.debug(((Player) currentPlayer.getObject()).getName() + " may: " --- 806,811 ---- } ! ! // logging of game actions activated for (PossibleAction pa : possibleActions.getList()) { log.debug(((Player) currentPlayer.getObject()).getName() + " may: " *************** *** 814,818 **** } ! /** * Adds all Game actions --- 816,820 ---- } ! /** * Adds all Game actions *************** *** 827,831 **** possibleActions.clear(); } ! } // if (!activeCorrections.isEmpty()) { --- 829,833 ---- possibleActions.clear(); } ! } // if (!activeCorrections.isEmpty()) { *************** *** 834,838 **** // // and set GuiHints for corrections - removed // } ! // CorrectionMode Actions // EnumSet<CorrectionType> possibleCorrections = EnumSet.allOf(CorrectionType.class); --- 836,840 ---- // // and set GuiHints for corrections - removed // } ! // CorrectionMode Actions // EnumSet<CorrectionType> possibleCorrections = EnumSet.allOf(CorrectionType.class); *************** *** 840,844 **** // possibleActions.add( // new CorrectionModeAction(ct, activeCorrections.contains(ct))); ! // Correction Actions for (CorrectionType ct:EnumSet.allOf(CorrectionType.class)) { --- 842,846 ---- // possibleActions.add( // new CorrectionModeAction(ct, activeCorrections.contains(ct))); ! // Correction Actions for (CorrectionType ct:EnumSet.allOf(CorrectionType.class)) { *************** *** 847,855 **** } } ! private boolean processCorrectionActions(PossibleAction a){ boolean result = false; ! // if (a instanceof CorrectionModeAction) { // CorrectionModeAction cma = (CorrectionModeAction)a; --- 849,857 ---- } } ! private boolean processCorrectionActions(PossibleAction a){ boolean result = false; ! // if (a instanceof CorrectionModeAction) { // CorrectionModeAction cma = (CorrectionModeAction)a; *************** *** 874,878 **** // result = true; // } ! if (a instanceof CorrectionAction) { CorrectionAction ca= (CorrectionAction)a; --- 876,880 ---- // result = true; // } ! if (a instanceof CorrectionAction) { CorrectionAction ca= (CorrectionAction)a; *************** *** 881,885 **** result = cm.executeCorrection(ca); } ! return result; } --- 883,887 ---- result = cm.executeCorrection(ca); } ! return result; } *************** *** 916,920 **** getCurrentRound().setPossibleActions(); setCorrectionActions(); ! } catch (Exception e) { log.debug("Error while reprocessing " + action.toString(), e); --- 918,922 ---- getCurrentRound().setPossibleActions(); setCorrectionActions(); ! } catch (Exception e) { log.debug("Error while reprocessing " + action.toString(), e); *************** *** 926,930 **** } ! // DisplayBuffer.clear(); // previous line removed to allow display of nextPlayerMessages guiHints.clearVisibilityHints(); --- 928,932 ---- } ! // DisplayBuffer.clear(); // previous line removed to allow display of nextPlayerMessages guiHints.clearVisibilityHints(); *************** *** 1409,1415 **** return displayBuffer; } ! public void addToNextPlayerMessages(String s, boolean undoable) { ! if (undoable) new AddToList<String>(nextPlayerMessages, s, "nextPlayerMessages"); else --- 1411,1417 ---- return displayBuffer; } ! public void addToNextPlayerMessages(String s, boolean undoable) { ! if (undoable) new AddToList<String>(nextPlayerMessages, s, "nextPlayerMessages"); else *************** *** 1420,1424 **** return reportBuffer; } ! public GuiHints getUIHints() { return guiHints; --- 1422,1426 ---- return reportBuffer; } ! public GuiHints getUIHints() { return guiHints; Index: GameDef.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameDef.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GameDef.java 17 Feb 2010 22:11:49 -0000 1.5 --- GameDef.java 12 Mar 2010 20:28:27 -0000 1.6 *************** *** 18,22 **** TREASURY_SHARE_LIMIT(50), FIXED_PRICE_TRAINS_BETWEEN_PRESIDENTS(false), ! SKIP_FIRST_STOCK_ROUND(false); private Object defaultValue; --- 18,23 ---- TREASURY_SHARE_LIMIT(50), FIXED_PRICE_TRAINS_BETWEEN_PRESIDENTS(false), ! SKIP_FIRST_STOCK_ROUND(false), ! NO_SALE_OF_JUST_BOUGHT_CERT(false); private Object defaultValue; *************** *** 35,39 **** */ public enum OrStep { ! /* In-sequence steps */ INITIAL, --- 36,40 ---- */ public enum OrStep { ! /* In-sequence steps */ INITIAL, *************** *** 46,53 **** REPAY_LOANS, FINAL, ! /* Out-of-sequence steps*/ DISCARD_TRAINS; ! } --- 47,54 ---- REPAY_LOANS, FINAL, ! /* Out-of-sequence steps*/ DISCARD_TRAINS; ! } Index: StockRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/StockRound.java,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** StockRound.java 4 Mar 2010 22:55:35 -0000 1.68 --- StockRound.java 12 Mar 2010 20:28:27 -0000 1.69 *************** *** 401,404 **** --- 401,405 ---- price /= company.getShareUnitsForSharePrice(); + /* Allow for different share units (as in 1835) */ for (int i = 1; i <= 4; i++) { number = shareCountPerUnit[i]; *************** *** 407,411 **** Math.min(number, maxShareToSell / (i * company.getShareUnit())); ! if (number == 0) continue; possibleActions.add(new SellShares(compName, i, number, price)); --- 408,419 ---- Math.min(number, maxShareToSell / (i * company.getShareUnit())); ! ! /* In some games (1856), a just bought share may not be sold */ ! // This code ignores the possibility of different share units ! if ((Boolean)gameManager.getGameParameter(GameDef.Parm.NO_SALE_OF_JUST_BOUGHT_CERT) ! && company.equals(companyBoughtThisTurnWrapper.getObject())) { ! number--; ! } ! if (number <= 0) continue; possibleActions.add(new SellShares(compName, i, number, price)); |
From: Erik V. <ev...@us...> - 2010-03-12 20:28:43
|
Update of /cvsroot/rails/18xx/data/1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv630/data/1856 Modified Files: Game.xml Log Message: 1856: disallow selling share bought in the same SR turn Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1856/Game.xml,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Game.xml 12 Mar 2010 17:15:03 -0000 1.37 --- Game.xml 12 Mar 2010 20:28:27 -0000 1.38 *************** *** 11,14 **** --- 11,15 ---- sequence="SellBuyOrBuySell"> <NoSaleInFirstSR/> + <NoSaleOfJustBoughtShare/> </StockRound> <OperatingRound class="rails.game.specific._1856.OperatingRound_1856"/> |
From: Erik V. <ev...@us...> - 2010-03-12 20:24:11
|
Update of /cvsroot/rails/18xx/data/18AL In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31810/data/18AL Modified Files: TileSet.xml Log Message: 18AL: fixed 446 tile lay: on Birmingham only Index: TileSet.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18AL/TileSet.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** TileSet.xml 23 Jan 2010 17:04:55 -0000 1.12 --- TileSet.xml 12 Mar 2010 20:23:45 -0000 1.13 *************** *** 120,124 **** <Tile id="70" quantity="1" /> <Tile id="1444" extId="444" quantity="2"><!--Missing!--> ! <Upgrade id="446" /> </Tile> --- 120,124 ---- <Tile id="70" quantity="1" /> <Tile id="1444" extId="444" quantity="2"><!--Missing!--> ! <Upgrade id="446" hex="G4"/> </Tile> |
From: Stefan F. <ste...@us...> - 2010-03-12 17:18:55
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14259/rails/game Modified Files: GameManager.java Added Files: EndOfGameRound.java Log Message: GameOver and endedByBankruptcy are state variables, added EndofGameRound to allow undo. --- NEW FILE: EndOfGameRound.java --- package rails.game; import rails.common.GuiDef; import rails.common.GuiHints; import rails.util.LocalText; /** * EndOfGameRound is a dummy implementation of the Round class * It generates no additional actions. * It also sets guiHints (default: shows map, stock market and activates status) * * */ public class EndOfGameRound extends Round { public EndOfGameRound(GameManagerI gameManager) { super(gameManager); guiHints.setVisibilityHint(GuiDef.Panel.MAP, true); guiHints.setActivePanel(GuiDef.Panel.STATUS); } @Override public boolean setPossibleActions() { possibleActions.clear(); return true; } public GuiHints getGuiHints() { return guiHints; } public void setGuiHints(GuiHints guiHints) { this.guiHints = guiHints; } @Override public String getHelp() { return LocalText.getText("EndOfGameHelpText"); } @Override public String toString() { return "EndOfGameRound "; } @Override public String getRoundName() { return toString(); } } Index: GameManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** GameManager.java 10 Mar 2010 21:02:13 -0000 1.88 --- GameManager.java 12 Mar 2010 17:18:47 -0000 1.89 *************** *** 17,20 **** --- 17,21 ---- import rails.game.special.SpecialPropertyI; import rails.game.special.SpecialTokenLay; + import rails.game.state.BooleanState; import rails.game.state.IntegerState; import rails.game.state.State; *************** *** 102,107 **** protected int numOfORs; ! protected boolean gameOver = false; ! protected boolean endedByBankruptcy = false; /** UI display hints */ --- 103,108 ---- protected int numOfORs; ! protected BooleanState gameOver = new BooleanState("GameOver" ,false); ! protected BooleanState endedByBankruptcy = new BooleanState("EndedByBankruptcy", false); /** UI display hints */ *************** *** 985,989 **** */ public void registerBankruptcy() { ! endedByBankruptcy = true; String message = LocalText.getText("PlayerIsBankrupt", --- 986,990 ---- */ public void registerBankruptcy() { ! endedByBankruptcy.set(true); String message = LocalText.getText("PlayerIsBankrupt", *************** *** 997,1003 **** private void finishGame() { ! gameOver = true; ReportBuffer.add(LocalText.getText("GameOver")); ! currentRound.set(null); logGameReport(); --- 998,1004 ---- private void finishGame() { ! gameOver.set(true); ReportBuffer.add(LocalText.getText("GameOver")); ! createRound(EndOfGameRound.class); logGameReport(); *************** *** 1008,1012 **** */ public boolean isGameOver() { ! return gameOver; } --- 1009,1013 ---- */ public boolean isGameOver() { ! return gameOver.booleanValue(); } |
From: Stefan F. <ste...@us...> - 2010-03-12 17:15:51
|
Update of /cvsroot/rails/18xx/data/1851 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12941/data/1851 Modified Files: Game.xml Log Message: Added NoMap option to 1851 and 18Kaas, removed from 1856 Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1851/Game.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Game.xml 19 Feb 2010 19:58:23 -0000 1.12 --- Game.xml 12 Mar 2010 17:15:04 -0000 1.13 *************** *** 3,6 **** --- 3,7 ---- <Component name="GameManager" class="rails.game.GameManager"> <Game name="1851"/> + <GameOption name="NoMapMode" type="toggle" default="no" /> <GameOption name="UnlimitedTiles" type="toggle" default="no"/> <GameParameters> |
From: Stefan F. <ste...@us...> - 2010-03-12 17:15:51
|
Update of /cvsroot/rails/18xx/data/18Kaas In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12941/data/18Kaas Modified Files: Game.xml Log Message: Added NoMap option to 1851 and 18Kaas, removed from 1856 Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18Kaas/Game.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Game.xml 8 Mar 2010 20:31:01 -0000 1.13 --- Game.xml 12 Mar 2010 17:15:05 -0000 1.14 *************** *** 3,6 **** --- 3,7 ---- <Component name="GameManager" class="rails.game.GameManager"> <Game name="18Kaas"/> + <GameOption name="NoMapMode" type="toggle" default="no" /> <GameOption name="WithOptional6Train" type="toggle" default="no"/> <GameOption name="UnlimitedTiles" type="toggle" default="no"/> |
From: Stefan F. <ste...@us...> - 2010-03-12 17:15:42
|
Update of /cvsroot/rails/18xx/data/1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12941/data/1856 Modified Files: Game.xml Log Message: Added NoMap option to 1851 and 18Kaas, removed from 1856 Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1856/Game.xml,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Game.xml 17 Feb 2010 22:02:52 -0000 1.36 --- Game.xml 12 Mar 2010 17:15:03 -0000 1.37 *************** *** 3,7 **** <Component name="GameManager" class="rails.game.specific._1856.GameManager_1856"> <Game name="1856"/> ! <Option name="NoMapMode" type="toggle" default="no" /> <GameOption name="UnlimitedBonusTokens" type="toggle" default="no"/> <GameOption name="UnlimitedTiles" type="toggle" default="no"/> --- 3,7 ---- <Component name="GameManager" class="rails.game.specific._1856.GameManager_1856"> <Game name="1856"/> ! <!-- <Option name="NoMapMode" type="toggle" default="no" /> --> <GameOption name="UnlimitedBonusTokens" type="toggle" default="no"/> <GameOption name="UnlimitedTiles" type="toggle" default="no"/> |