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-01-01 14:34:15
|
Update of /cvsroot/rails/18xx/rails/game/action In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10820/rails/game/action Modified Files: ExchangeTokens.java Log Message: Catch an unexpected error condition - to be sorted out later Index: ExchangeTokens.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/action/ExchangeTokens.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExchangeTokens.java 3 Aug 2009 21:26:20 -0000 1.2 --- ExchangeTokens.java 1 Jan 2010 14:34:06 -0000 1.3 *************** *** 58,63 **** StringBuffer b = new StringBuffer(); b.append("ExchangeTokens for "+companyName+":"); ! for (ExchangeableToken token : tokensToExchange) { ! b.append(" ").append(token.toString()); } b.append(" min=").append (minNumberToExchange); --- 58,68 ---- StringBuffer b = new StringBuffer(); b.append("ExchangeTokens for "+companyName+":"); ! if (tokensToExchange != null) { ! for (ExchangeableToken token : tokensToExchange) { ! b.append(" ").append(token.toString()); ! } ! } else { ! b.append ("-none?-"); ! log.error("No exchangable tokens found when expected - error seen during Undo CGR formation"); } b.append(" min=").append (minNumberToExchange); |
From: Erik V. <ev...@us...> - 2010-01-01 14:04:27
|
Update of /cvsroot/rails/18xx/rails/game/state In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5548/rails/game/state Modified Files: State.java Log Message: Call update when object is set. (to be checked of this causes duplicate updates). Index: State.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/state/State.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** State.java 7 Oct 2009 19:00:37 -0000 1.12 --- State.java 1 Jan 2010 14:04:19 -0000 1.13 *************** *** 50,53 **** --- 50,54 ---- new Exception("")); } + update(); } |
From: Erik V. <ev...@us...> - 2010-01-01 14:03:43
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5469/rails/ui/swing Modified Files: GameStatus.java Log Message: Added facility to hide closed company rows via a nested class RowVisibility Index: GameStatus.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameStatus.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** GameStatus.java 8 Dec 2009 19:31:33 -0000 1.31 --- GameStatus.java 1 Jan 2010 14:03:32 -0000 1.32 *************** *** 14,17 **** --- 14,20 ---- import rails.game.*; import rails.game.action.*; + import rails.game.model.ModelObject; + import rails.game.model.ViewUpdate; + import rails.game.state.BooleanState; import rails.ui.swing.elements.*; import rails.util.LocalText; *************** *** 88,91 **** --- 91,99 ---- protected int futureTrainsXOffset, futureTrainsYOffset, futureTrainsWidth; protected int rightCompCaptionXOffset; + + /** 2D-array of fields to enable show/hide per row or column */ + protected JComponent[][] fields; + /** Array of Observer objects to set row visibility */ + protected RowVisibility[] rowVisibilityObservers; private Caption[] upperPlayerCaption; *************** *** 247,250 **** --- 255,261 ---- futureTrainsWidth = rightCompCaptionXOffset - futureTrainsXOffset; + fields = new JComponent[1+lastX][2+lastY]; + rowVisibilityObservers = new RowVisibility[nc]; + addField(new Caption(LocalText.getText("COMPANY")), 0, 0, 1, 2, WIDE_RIGHT + WIDE_BOTTOM); *************** *** 307,310 **** --- 318,324 ---- c = companies[i]; companyIndex.put(c, new Integer(i)); + rowVisibilityObservers[i] + = new RowVisibility (certPerPlayerYOffset + i, c.getClosedModel()); + f = new Caption(c.getName()); f.setForeground(c.getFgColour()); *************** *** 532,535 **** --- 546,550 ---- add(comp, gbc); + if (fields[x][y] == null) fields[x][y] = comp; } *************** *** 751,755 **** lowerPlayerCaption[j].setHighlight(false); for (i = 0; i < nc; i++) { ! setPlayerCertButton(i, j, false); } } else if (j == -1 && compCanHoldOwnShares) { --- 766,772 ---- lowerPlayerCaption[j].setHighlight(false); for (i = 0; i < nc; i++) { ! if (rowVisibilityObservers[i].lastValue()) { ! setPlayerCertButton(i, j, false); ! } } } else if (j == -1 && compCanHoldOwnShares) { *************** *** 757,764 **** } for (i = 0; i < nc; i++) { ! setIPOCertButton(i, false); ! setPoolCertButton(i, false); ! setPlayerCertButton (i, actorIndex, false); ! if (compCanHoldOwnShares) setTreasuryCertButton(i, false); } --- 774,783 ---- } for (i = 0; i < nc; i++) { ! if (rowVisibilityObservers[i].lastValue) { ! setIPOCertButton(i, false); ! setPoolCertButton(i, false); ! setPlayerCertButton (i, actorIndex, false); ! if (compCanHoldOwnShares) setTreasuryCertButton(i, false); ! } } *************** *** 922,925 **** --- 941,991 ---- certInTreasuryButton[i].setVisible(clickable); } + + protected void setRowVisibility (int rowIndex, boolean value) { + for (int j=0; j < fields.length; j++) { + if (fields[j][rowIndex] != null) { + fields[j][rowIndex].setVisible(value); + } + } + parent.pack(); + } + + class RowVisibility implements ViewObject + { + private ModelObject modelObject; + private int rowIndex; + private boolean lastValue; + + RowVisibility (int rowIndex, ModelObject model) { + this.modelObject = model; + this.rowIndex = rowIndex; + modelObject.addObserver(this); + lastValue = !((BooleanState)modelObject).booleanValue(); + } + + protected boolean lastValue () { + return lastValue; + } + + /** Needed to satisfy the ViewObject interface. */ + public ModelObject getModel() { + return modelObject; + } + + /** Needed to satisfy the Observer interface. + * The closedObject model will send true if the company is closed. */ + public void update(Observable o1, Object o2) { + if (o2 instanceof Boolean) { + lastValue = !(Boolean)o2; + setRowVisibility(rowIndex, lastValue); + } + } + + /** Needed to satisfy the ViewObject interface. Currently not used. */ + public void deRegister() { + if (modelObject != null) + modelObject.deleteObserver(this); + } + } } |
From: Erik V. <ev...@us...> - 2010-01-01 14:02:58
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5417 Modified Files: LocalisedText.properties Log Message: Added MERGE Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** LocalisedText.properties 30 Dec 2009 18:38:05 -0000 1.88 --- LocalisedText.properties 1 Jan 2010 14:02:49 -0000 1.89 *************** *** 233,236 **** --- 233,237 ---- MayNotBuyAndSell={0} may not both buy and sell shares MayNotYetOperate={0} may not yet operate: {1}% sold whereas {2}% required + MERGE=MERGE MergeMinorConfirm=Do you want to merge minor {0} to start company {1}? MERGE_MINOR_LOG={0} merges minor {1} into {2}, with {3} cash and {4} train(s) |
From: Erik V. <ev...@us...> - 2010-01-01 14:02:40
|
Update of /cvsroot/rails/18xx/rails/game/state In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5393/rails/game/state Modified Files: BooleanState.java Log Message: Added getUpdate() to enable use as ModelObject. Index: BooleanState.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/state/BooleanState.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BooleanState.java 4 Jun 2008 19:00:36 -0000 1.2 --- BooleanState.java 1 Jan 2010 14:02:30 -0000 1.3 *************** *** 34,36 **** --- 34,43 ---- return ((Boolean) object).booleanValue(); } + + /** Update is the boolean value */ + public Object getUpdate () { + return object; + } + + } |
From: Erik V. <ev...@us...> - 2010-01-01 14:01:37
|
Update of /cvsroot/rails/18xx/rails/game/specific/_1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5199/rails/game/specific/_1856 Modified Files: CGRFormationRound.java Log Message: Set fixed text "MERGE" into loans model for merging companies Index: CGRFormationRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1856/CGRFormationRound.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** CGRFormationRound.java 28 Dec 2009 15:27:18 -0000 1.28 --- CGRFormationRound.java 1 Jan 2010 14:01:18 -0000 1.29 *************** *** 183,186 **** --- 183,187 ---- currentCompany.getName()), false); + currentCompany.getLoanValueModel().setText(LocalText.getText("MERGE")); } maxLoansToRepayByPresident = maxNumber; *************** *** 189,192 **** --- 190,194 ---- // President cannot help, this company will merge into CGR anyway mergingCompanies.add(currentCompany); + currentCompany.getLoanValueModel().setText(LocalText.getText("MERGE")); message = LocalText.getText("WillMergeInto", currentCompany.getName(), *************** *** 267,270 **** --- 269,273 ---- if (action.getCompany().getCurrentNumberOfLoans() > 0) { mergingCompanies.add(currentCompany); + currentCompany.getLoanValueModel().setText(LocalText.getText("MERGE")); String message = LocalText.getText("WillMergeInto", currentCompany.getName(), |
From: Erik V. <ev...@us...> - 2010-01-01 14:00:40
|
Update of /cvsroot/rails/18xx/rails/game/model In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4938/rails/game/model Modified Files: MoneyModel.java Log Message: Added fixed text facility (used for "MERGE"in 1856) Index: MoneyModel.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/model/MoneyModel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** MoneyModel.java 4 Jun 2008 19:00:37 -0000 1.8 --- MoneyModel.java 1 Jan 2010 14:00:31 -0000 1.9 *************** *** 5,8 **** --- 5,9 ---- import rails.game.state.BooleanState; import rails.game.state.IntegerState; + import rails.game.state.StringState; import rails.util.Util; *************** *** 13,17 **** public static final int ALLOW_NEGATIVE = 8; private BooleanState initialised; ! public MoneyModel(String name) { super(name, 0); --- 14,19 ---- public static final int ALLOW_NEGATIVE = 8; private BooleanState initialised; ! private StringState fixedText = null; ! public MoneyModel(String name) { super(name, 0); *************** *** 47,56 **** } public String getText() { int amount = intValue(); if (amount == 0 ! && (Util.bitSet(option, SUPPRESS_ZERO) || Util.bitSet(option, ! SUPPRESS_INITIAL_ZERO) ! && (initialised == null || !initialised.booleanValue()))) { return ""; } else if (amount < 0 && !Util.bitSet(option, ALLOW_NEGATIVE)) { --- 49,74 ---- } + /** Set a fixed text, which will override the money value + * as long as it is not null and not "". + * @param text + */ + public void setText (String text) { + if (fixedText == null) { + fixedText = new StringState (name+"_FixedText", text); + } else { + fixedText.set(text); + } + update(); + } + public String getText() { + if (fixedText != null && !"".equals(fixedText.getText())) { + return fixedText.getText(); + } int amount = intValue(); if (amount == 0 ! && (Util.bitSet(option, SUPPRESS_ZERO) ! || Util.bitSet(option, SUPPRESS_INITIAL_ZERO) ! && (initialised == null || !initialised.booleanValue()))) { return ""; } else if (amount < 0 && !Util.bitSet(option, ALLOW_NEGATIVE)) { |
From: Erik V. <ev...@us...> - 2010-01-01 13:59:41
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4506/rails/game Modified Files: PublicCompanyI.java PublicCompany.java Log Message: Expose closedModel. Remove unused closed attribute. Index: PublicCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompany.java,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** PublicCompany.java 30 Dec 2009 11:32:00 -0000 1.76 --- PublicCompany.java 1 Jan 2010 13:59:30 -0000 1.77 *************** *** 131,137 **** protected IntegerState extraTiles = null; - /** Is the company closed (or bankrupt)? */ - protected boolean closed = false; - /* Spendings in the current operating turn */ protected MoneyModel privatesCostThisTurn; --- 131,134 ---- *************** *** 931,934 **** --- 928,935 ---- } + + public ModelObject getClosedModel () { + return closedObject; + } /** Index: PublicCompanyI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompanyI.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** PublicCompanyI.java 30 Dec 2009 11:32:00 -0000 1.39 --- PublicCompanyI.java 1 Jan 2010 13:59:29 -0000 1.40 *************** *** 350,353 **** --- 350,356 ---- public int sharesOwnedByPlayers(); public String getExtraShareMarks (); + + public ModelObject getClosedModel (); + } |
From: Erik V. <ev...@us...> - 2009-12-31 09:59:17
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7048/rails/ui/swing Modified Files: ORUIManager.java Log Message: A null Destinations action is no longer sent to the server. Index: ORUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORUIManager.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** ORUIManager.java 30 Dec 2009 18:37:19 -0000 1.38 --- ORUIManager.java 31 Dec 2009 09:59:05 -0000 1.39 *************** *** 456,459 **** --- 456,464 ---- } } + + // Prevent that a null action gets processed + if (action.getReachedCompanies() == null + || action.getReachedCompanies().isEmpty()) return; + if (orWindow.process(action)) { updateMessage(); |
From: Erik V. <ev...@us...> - 2009-12-31 09:58:28
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6975/rails/ui/swing Modified Files: ORWindow.java Log Message: Added a precaution Index: ORWindow.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORWindow.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ORWindow.java 29 Dec 2009 21:58:11 -0000 1.30 --- ORWindow.java 31 Dec 2009 09:58:18 -0000 1.31 *************** *** 120,124 **** // Add the actor for safety checking in the server ! action.setPlayerName(orPanel.getORPlayer()); // Process the action boolean result = gameUIManager.processOnServer(action); --- 120,124 ---- // Add the actor for safety checking in the server ! if (action != null) action.setPlayerName(orPanel.getORPlayer()); // Process the action boolean result = gameUIManager.processOnServer(action); |
From: Erik V. <ev...@us...> - 2009-12-30 22:10:27
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv18635/rails/ui/swing Modified Files: GameUIManager.java Log Message: Repack status window at start of switchableRound because for some reason it squeezes a that time. Index: GameUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameUIManager.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** GameUIManager.java 30 Dec 2009 18:37:19 -0000 1.28 --- GameUIManager.java 30 Dec 2009 22:10:18 -0000 1.29 *************** *** 237,240 **** --- 237,241 ---- log.debug("UI entering switchable round type"); orWindow.setVisible(true); + statusWindow.pack(); stockChart.setVisible(true); } |
From: Erik V. <ev...@us...> - 2009-12-30 19:54:42
|
Update of /cvsroot/rails/18xx/rails/ui/swing/elements In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9072/rails/ui/swing/elements Modified Files: CheckBoxDialog.java Log Message: Minor change Index: CheckBoxDialog.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/elements/CheckBoxDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CheckBoxDialog.java 4 May 2009 20:29:14 -0000 1.2 --- CheckBoxDialog.java 30 Dec 2009 19:54:31 -0000 1.3 *************** *** 51,55 **** initialize(); pack(); ! this.setVisible(true); // Center on owner int x = --- 51,55 ---- initialize(); pack(); ! // Center on owner int x = *************** *** 61,64 **** --- 61,65 ---- setLocation(x, y); + setVisible(true); } *************** *** 123,132 **** } else if (arg0.getSource().equals(cancelButton)) { } ! this.setVisible(false); ! this.dispose(); ! } ! public boolean[] getSelectedOptions() { return selectedOptions; } --- 124,132 ---- } else if (arg0.getSource().equals(cancelButton)) { } ! setVisible(false); ! dispose(); } ! public synchronized boolean[] getSelectedOptions() { return selectedOptions; } |
From: Erik V. <ev...@us...> - 2009-12-30 18:38:37
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv2623/rails/ui/swing Modified Files: GameSetupWindow.java Log Message: fixed Select to SelectSomething Index: GameSetupWindow.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameSetupWindow.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** GameSetupWindow.java 25 Nov 2009 18:48:19 -0000 1.18 --- GameSetupWindow.java 30 Dec 2009 18:38:28 -0000 1.19 *************** *** 288,292 **** optionsPane.setLayout(new GridLayout( (availableOptions.size() + 1), 1)); ! optionsPane.add(new JLabel(LocalText.getText("Select", option.getLocalisedName()))); JComboBox dropdown = new JComboBox(); --- 288,292 ---- optionsPane.setLayout(new GridLayout( (availableOptions.size() + 1), 1)); ! optionsPane.add(new JLabel(LocalText.getText("SelectSomething", option.getLocalisedName()))); JComboBox dropdown = new JComboBox(); |
From: Erik V. <ev...@us...> - 2009-12-30 18:38:15
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv2570 Modified Files: LocalisedText.properties Log Message: Added "Has" and fixed second Select to SelectSomething Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** LocalisedText.properties 28 Dec 2009 14:53:00 -0000 1.87 --- LocalisedText.properties 30 Dec 2009 18:38:05 -0000 1.88 *************** *** 176,179 **** --- 176,180 ---- GetShareForMinor={0} gets a {1}% share of {2} from {3} in exchange for Minor {4} GetNoShareForMinor={0} does not get a share for Minor {1}, which closes + Has={0} has {1} HasFirstTurn={0} has the first turn HasMergedShares={0} has exchanged {1} old shares for {2} {3} shares *************** *** 360,364 **** START_ROUND_TITLE=Rails: Start Round STOCK_ROUND_TITLE=Rails: Game Status - STOCK ROUND {0} ! Select=Select {0}: SelectAHexForTile=Select hex to lay a tile on, or press the No Tile button. SelectAHexForToken=Select a city hex to lay a token on, or press the No Token button. --- 361,365 ---- START_ROUND_TITLE=Rails: Start Round STOCK_ROUND_TITLE=Rails: Game Status - STOCK ROUND {0} ! SelectSomething=Select {0}: SelectAHexForTile=Select hex to lay a tile on, or press the No Tile button. SelectAHexForToken=Select a city hex to lay a token on, or press the No Token button. |
From: Erik V. <ev...@us...> - 2009-12-30 18:37:29
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv2484/rails/ui/swing Modified Files: ORUIManager.java GameUIManager.java Log Message: Bring ORWindow to front at certain actions Index: ORUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORUIManager.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** ORUIManager.java 26 Dec 2009 12:50:15 -0000 1.37 --- ORUIManager.java 30 Dec 2009 18:37:19 -0000 1.38 *************** *** 443,446 **** --- 443,448 ---- if (options.size() > 0) { + orWindow.setVisible(true); + orWindow.toFront(); boolean[] destined = new CheckBoxDialog(orPanel, Index: GameUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameUIManager.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** GameUIManager.java 29 Dec 2009 23:41:17 -0000 1.27 --- GameUIManager.java 30 Dec 2009 18:37:19 -0000 1.28 *************** *** 412,415 **** --- 412,416 ---- if (options.size() > 0) { orWindow.setVisible(true); + orWindow.toFront(); boolean[] exchanged = new CheckBoxDialog(orWindow.getORPanel(), |
From: Erik V. <ev...@us...> - 2009-12-30 11:32:43
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13320/rails/game Modified Files: Round.java Log Message: Added a financials report to the end of each round. Index: Round.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Round.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Round.java 8 Dec 2009 19:32:44 -0000 1.32 --- Round.java 30 Dec 2009 11:32:31 -0000 1.33 *************** *** 342,345 **** --- 342,356 ---- protected void finishRound() { + // TEMPORARY? Report financials + for (PublicCompanyI c : companyManager.getAllPublicCompanies()) { + if (c.hasFloated() && !c.isClosed()) { + ReportBuffer.add(LocalText.getText("Has", c.getName(), + Bank.format(c.getCash()))); + } + } + for (Player p : playerManager.getPlayers()) { + ReportBuffer.add(LocalText.getText("Has", p.getName(), + Bank.format(p.getCash()))); + } // Inform GameManager gameManager.nextRound(this); |
From: Erik V. <ev...@us...> - 2009-12-30 11:32:11
|
Update of /cvsroot/rails/18xx/rails/game/specific/_1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13202/rails/game/specific/_1856 Modified Files: PublicCompany_CGR.java Log Message: Added mayBuyTrainType() to fix incorrect 4-train buy option for 1856 CGR. Index: PublicCompany_CGR.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1856/PublicCompany_CGR.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PublicCompany_CGR.java 9 Oct 2009 20:20:34 -0000 1.5 --- PublicCompany_CGR.java 30 Dec 2009 11:32:00 -0000 1.6 *************** *** 55,58 **** --- 55,62 ---- } } + + public boolean mayBuyTrainType (TrainI train) { + return !"4".equals(train.getName()); + } @Override |
From: Erik V. <ev...@us...> - 2009-12-30 11:32:10
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13202/rails/game Modified Files: PublicCompanyI.java OperatingRound.java PublicCompany.java Log Message: Added mayBuyTrainType() to fix incorrect 4-train buy option for 1856 CGR. Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** OperatingRound.java 28 Dec 2009 14:53:00 -0000 1.86 --- OperatingRound.java 30 Dec 2009 11:32:00 -0000 1.87 *************** *** 753,757 **** Bank.format(sbt.getValue()), seller.getName(), ! Bank.format(sbt.getValue()))); sbt.setExercised(); --- 753,757 ---- Bank.format(sbt.getValue()), seller.getName(), ! Bank.format(sbt.getPrice()))); sbt.setExercised(); *************** *** 2099,2102 **** --- 2099,2103 ---- trains = trainMgr.getAvailableNewTrains(); for (TrainI train : trains) { + if (!operatingCompany.mayBuyTrainType(train)) continue; if (!mayBuyMoreOfEachType && trainsBoughtThisTurn.contains(train.getType())) { Index: PublicCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompany.java,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** PublicCompany.java 28 Dec 2009 13:21:13 -0000 1.75 --- PublicCompany.java 30 Dec 2009 11:32:00 -0000 1.76 *************** *** 803,806 **** --- 803,811 ---- return mayTradeShares; } + + /** Stub that allows exclusions such as that 1856 CGR may not buy a 4 */ + public boolean mayBuyTrainType (TrainI train) { + return true; + } public boolean mustHaveOperatedToTradeShares() { Index: PublicCompanyI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompanyI.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** PublicCompanyI.java 9 Oct 2009 20:20:34 -0000 1.38 --- PublicCompanyI.java 30 Dec 2009 11:32:00 -0000 1.39 *************** *** 64,67 **** --- 64,69 ---- public boolean mayTradeShares(); + public boolean mayBuyTrainType (TrainI train); + /** * Start the company. |
From: Erik V. <ev...@us...> - 2009-12-30 11:30:47
|
Update of /cvsroot/rails/18xx/rails/game/action In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12952/rails/game/action Modified Files: ReachDestinations.java Log Message: Fix null "reached destination" created on an empty response. Index: ReachDestinations.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/action/ReachDestinations.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ReachDestinations.java 29 Oct 2009 19:41:29 -0000 1.3 --- ReachDestinations.java 30 Dec 2009 11:30:33 -0000 1.4 *************** *** 8,11 **** --- 8,12 ---- import rails.game.CompanyManagerI; import rails.game.PublicCompanyI; + import rails.util.Util; /** This class is needed until we have a means to determine reaching *************** *** 88,97 **** possibleCompanies = new ArrayList<PublicCompanyI>(); ! for (String cname : possibleCompanyNames.split(",")) { ! possibleCompanies.add(cmgr.getCompanyByName(cname)); } reachedCompanies = new ArrayList<PublicCompanyI>(); ! for (String cname : reachedCompanyNames.split(",")) { ! reachedCompanies.add(cmgr.getCompanyByName(cname)); } } --- 89,106 ---- possibleCompanies = new ArrayList<PublicCompanyI>(); ! if (Util.hasValue(possibleCompanyNames)) { ! for (String cname : possibleCompanyNames.split(",")) { ! if (!"".equals(cname)) { ! possibleCompanies.add(cmgr.getCompanyByName(cname)); ! } ! } } reachedCompanies = new ArrayList<PublicCompanyI>(); ! if (Util.hasValue(reachedCompanyNames)) { ! for (String cname : reachedCompanyNames.split(",")) { ! if (!"".equals(cname)) { ! reachedCompanies.add(cmgr.getCompanyByName(cname)); ! } ! } } } |
From: Erik V. <ev...@us...> - 2009-12-30 00:51:49
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27417/rails/ui/swing Modified Files: GameUIManager.java Log Message: Map is now visible during CGR formation (but the dialogs are still modal) Index: GameUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameUIManager.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** GameUIManager.java 26 Nov 2009 22:15:27 -0000 1.26 --- GameUIManager.java 29 Dec 2009 23:41:17 -0000 1.27 *************** *** 224,227 **** --- 224,229 ---- log.debug("UI entering Stock Round"); + orWindow.setVisible(false); + stockChart.setVisible(true); } else if (OperatingRound.class.isAssignableFrom(currentRoundType)) { *************** *** 229,234 **** --- 231,241 ---- log.debug("UI entering Operating Round"); orUIManager.initOR((OperatingRound) currentRound); + orWindow.setVisible(true); + stockChart.setVisible(false); + } else if (SwitchableUIRound.class.isAssignableFrom(currentRoundType) ) { log.debug("UI entering switchable round type"); + orWindow.setVisible(true); + stockChart.setVisible(true); } } *************** *** 245,249 **** } else if (OperatingRound.class.isAssignableFrom(previousRoundUItype)) { log.debug("Leaving Operating Round UI type"); ! orWindow.setVisible(false); } } --- 252,256 ---- } else if (OperatingRound.class.isAssignableFrom(previousRoundUItype)) { log.debug("Leaving Operating Round UI type"); ! //orWindow.setVisible(false); } } *************** *** 254,258 **** log.debug("Entering Start Round UI type"); activeWindow = startRoundWindow; ! stockChart.setVisible(false); } else if (StockRound.class.isAssignableFrom(currentRoundUItype)) { --- 261,265 ---- log.debug("Entering Start Round UI type"); activeWindow = startRoundWindow; ! //stockChart.setVisible(false); } else if (StockRound.class.isAssignableFrom(currentRoundUItype)) { *************** *** 260,265 **** log.debug("Entering Stock Round UI type"); activeWindow = statusWindow; ! stockChart.setVisible(true); ! statusWindow.setVisible(true); } else if (OperatingRound.class.isAssignableFrom(currentRoundUItype)) { --- 267,272 ---- log.debug("Entering Stock Round UI type"); activeWindow = statusWindow; ! //stockChart.setVisible(true); ! //statusWindow.setVisible(true); } else if (OperatingRound.class.isAssignableFrom(currentRoundUItype)) { *************** *** 267,272 **** log.debug("Entering Operating Round UI type "); activeWindow = orWindow; ! stockChart.setVisible(false); ! orWindow.setVisible(true); } } --- 274,279 ---- log.debug("Entering Operating Round UI type "); activeWindow = orWindow; ! //stockChart.setVisible(false); ! //orWindow.setVisible(true); } } |
From: Erik V. <ev...@us...> - 2009-12-29 22:10:20
|
Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17488/rails/ui/swing/hexmap Modified Files: GUIHex.java Log Message: Offboard value display made special throughout. This fixes display of offboard values for 1856 Goderich and 18EU Hamburg. Index: GUIHex.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/GUIHex.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** GUIHex.java 28 Dec 2009 14:52:05 -0000 1.32 --- GUIHex.java 29 Dec 2009 22:10:01 -0000 1.33 *************** *** 603,617 **** tt.append(" (").append(name).append(")"); } - // The next line is a temporary development aid, that can be removed - // later. - /* - * tt.append(" <small>(") .append(model.getX()) .append(",") - * .append(model.getY()) .append(")</small>"); - */ tt.append("<br><b>Tile</b>: ").append(currentTile.getId()); // TEMPORARY tt.append("<small> rot=" + currentTileOrientation + "</small>"); ! if (currentTile.hasStations()) { ! // for (Station st : currentTile.getStations()) Station st; int cityNumber; --- 603,621 ---- tt.append(" (").append(name).append(")"); } tt.append("<br><b>Tile</b>: ").append(currentTile.getId()); // TEMPORARY tt.append("<small> rot=" + currentTileOrientation + "</small>"); ! if (currentTile.getColourName().equalsIgnoreCase(Tile.RED_COLOUR_NAME)) { ! if (model.hasOffBoardValues()) { ! tt.append("<br>Offboard value "); ! tt.append(model.getCurrentOffBoardValue(hexMap.getPhase())).append(" ["); ! int[] values = model.getOffBoardValues(); ! for (int i = 0; i < values.length; i++) { ! if (i > 0) tt.append(","); ! tt.append(values[i]); ! } ! tt.append("]"); ! } ! } else if (currentTile.hasStations()) { Station st; int cityNumber; *************** *** 619,637 **** cityNumber = city.getNumber(); st = city.getRelatedStation(); ! tt.append("<br> ").append(st.getType()).append(" ").append( ! cityNumber) // .append("/").append(st.getNumber()) ! .append(" (").append(model.getConnectionString(cityNumber)).append( ! "): value "); ! if (model.hasOffBoardValues()) { ! tt.append(model.getCurrentOffBoardValue(hexMap.getPhase())).append(" ["); ! int[] values = model.getOffBoardValues(); ! for (int i = 0; i < values.length; i++) { ! if (i > 0) tt.append(","); ! tt.append(values[i]); ! } ! tt.append("]"); ! } else { ! tt.append(st.getValue()); ! } if (st.getBaseSlots() > 0) { tt.append(", ").append(st.getBaseSlots()).append(" slots"); --- 623,630 ---- cityNumber = city.getNumber(); st = city.getRelatedStation(); ! tt.append("<br> ").append(st.getType()).append(" ").append(cityNumber) ! .append(" (").append(model.getConnectionString(cityNumber)) ! .append("): value "); ! tt.append(st.getValue()); if (st.getBaseSlots() > 0) { tt.append(", ").append(st.getBaseSlots()).append(" slots"); |
From: Erik V. <ev...@us...> - 2009-12-29 21:58:21
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15007/rails/ui/swing Modified Files: ORWindow.java MessagePanel.java ORPanel.java Log Message: Cleanup help message at end of OR. Index: MessagePanel.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/MessagePanel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MessagePanel.java 4 Jun 2008 19:00:33 -0000 1.5 --- MessagePanel.java 29 Dec 2009 21:58:11 -0000 1.6 *************** *** 32,36 **** public void setMessage(String messageText) { ! if (Util.hasValue(messageText)) { int lines = messageText.split("<[Bb][Rr]>").length + 1; setLines(lines); --- 32,36 ---- public void setMessage(String messageText) { ! if (messageText != null) { int lines = messageText.split("<[Bb][Rr]>").length + 1; setLines(lines); Index: ORWindow.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORWindow.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ORWindow.java 7 Dec 2009 17:48:32 -0000 1.29 --- ORWindow.java 29 Dec 2009 21:58:11 -0000 1.30 *************** *** 187,190 **** --- 187,191 ---- orPanel.finish(); upgradePanel.finish(); + messagePanel.setMessage(""); setTitle(LocalText.getText("MapWindowTitle")); } Index: ORPanel.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORPanel.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** ORPanel.java 15 Dec 2009 18:56:11 -0000 1.35 --- ORPanel.java 29 Dec 2009 21:58:11 -0000 1.36 *************** *** 510,513 **** --- 510,515 ---- button2.setEnabled(false); button3.setEnabled(false); + undoButton.setEnabled(false); + redoButton.setEnabled(false); round = orUIManager.gameUIManager.getCurrentRound(); |
From: Erik V. <ev...@us...> - 2009-12-28 15:27:28
|
Update of /cvsroot/rails/18xx/rails/game/specific/_1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30375/rails/game/specific/_1856 Modified Files: CGRFormationRound.java Log Message: Fixed bug where CGR would in case of excess trains discard all 4-trains, in stead of discarding 4-trains until the limit was reached. Index: CGRFormationRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/specific/_1856/CGRFormationRound.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** CGRFormationRound.java 28 Dec 2009 13:21:12 -0000 1.27 --- CGRFormationRound.java 28 Dec 2009 15:27:18 -0000 1.28 *************** *** 82,93 **** if (companiesToRepayLoans == null) { finishRound(); return; } - ReportBuffer.add(LocalText.getText("StartFormationRound", - cgrName, - startingPlayer.getName())); - setStep(STEP_REPAY_LOANS); --- 82,90 ---- if (companiesToRepayLoans == null) { + ReportBuffer.add(LocalText.getText("DoesNotForm", cgr.getName())); finishRound(); return; } setStep(STEP_REPAY_LOANS); *************** *** 640,654 **** int trainLimit = cgr.getTrainLimit(gameManager.getCurrentPlayerIndex()); List<TrainI> trains = cgr.getPortfolio().getTrainList(); ! if (cgr.getNumberOfTrains() > trainLimit) ReportBuffer.add(""); ! outer: while (cgr.getNumberOfTrains() > trainLimit) { for (TrainI train : trains) { if (!train.getType().isPermanent()) { ! train.moveTo(pool); ! ReportBuffer.add(LocalText.getText("CompanyDiscardsTrain", ! cgrName, train.getName())); ! continue outer; } } ! break; } --- 637,655 ---- int trainLimit = cgr.getTrainLimit(gameManager.getCurrentPlayerIndex()); List<TrainI> trains = cgr.getPortfolio().getTrainList(); ! if (cgr.getNumberOfTrains() > trainLimit) { ! ReportBuffer.add(""); ! int numberToDiscard = cgr.getNumberOfTrains() - trainLimit; ! List<TrainI> trainsToDiscard = new ArrayList<TrainI>(4); for (TrainI train : trains) { if (!train.getType().isPermanent()) { ! trainsToDiscard.add(train); ! if (--numberToDiscard == 0) break; } } ! for (TrainI train : trainsToDiscard) { ! train.moveTo(pool); ! ReportBuffer.add(LocalText.getText("CompanyDiscardsTrain", ! cgrName, train.getName())); ! } } |
From: Erik V. <ev...@us...> - 2009-12-28 14:53:15
|
Update of /cvsroot/rails/18xx/rails/game/special In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27496/rails/game/special Modified Files: SellBonusToken.java Log Message: 1856: allowing unlimited Bridge/Tunnel bonus tokens as a game option Index: SellBonusToken.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/special/SellBonusToken.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SellBonusToken.java 28 Dec 2009 13:21:12 -0000 1.4 --- SellBonusToken.java 28 Dec 2009 14:53:00 -0000 1.5 *************** *** 44,48 **** throw new ConfigurationException("Price invalid ["+price+"] or missing"); ! maxNumberToSell = sellBonusTokenTag.getAttributeAsInteger("number", 1); seller = new State ("SellerOf_"+name+"_Bonus", CashHolder.class); --- 44,48 ---- throw new ConfigurationException("Price invalid ["+price+"] or missing"); ! maxNumberToSell = sellBonusTokenTag.getAttributeAsInteger("amount", 1); seller = new State ("SellerOf_"+name+"_Bonus", CashHolder.class); *************** *** 55,58 **** --- 55,60 ---- locations = gameManager.getMapManager().parseLocations(locationCodes); + + } *************** *** 66,69 **** --- 68,72 ---- } + @Override public boolean isExercised () { return maxNumberToSell >= 0 && numberSold.intValue() >= maxNumberToSell; *************** *** 106,110 **** return "SellBonusToken comp=" + privateCompany.getName() + " hex=" + locationCodes + " value=" + value + " price=" + price ! + " sold="+numberSold.intValue(); } --- 109,113 ---- return "SellBonusToken comp=" + privateCompany.getName() + " hex=" + locationCodes + " value=" + value + " price=" + price ! + " max="+maxNumberToSell+" sold="+numberSold.intValue(); } |
From: Erik V. <ev...@us...> - 2009-12-28 14:53:10
|
Update of /cvsroot/rails/18xx/data/1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27496/data/1856 Modified Files: Game.xml CompanyManager.xml Log Message: 1856: allowing unlimited Bridge/Tunnel bonus tokens as a game option Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1856/CompanyManager.xml,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** CompanyManager.xml 23 Sep 2009 21:38:57 -0000 1.30 --- CompanyManager.xml 28 Dec 2009 14:53:00 -0000 1.31 *************** *** 77,81 **** <SpecialProperty condition="ifOwnedByCompany" when="anyTimeDuringOR" class="rails.game.special.SellBonusToken" transfer="toGameManager"> ! <SellBonusToken name="Bridge" location="P17,P19" price="50" value="10" number="2"/> </SpecialProperty> </SpecialProperties> --- 77,88 ---- <SpecialProperty condition="ifOwnedByCompany" when="anyTimeDuringOR" class="rails.game.special.SellBonusToken" transfer="toGameManager"> ! <SellBonusToken name="Bridge" location="P17,P19" price="50" value="10"> ! <IfOption name="UnlimitedBonusTokens" value="yes"> ! <Attributes amount="-1"/> ! </IfOption> ! <IfOption name="UnlimitedBonusTokens" value="no"> ! <Attributes amount="3"/> ! </IfOption> ! </SellBonusToken> </SpecialProperty> </SpecialProperties> *************** *** 89,93 **** <SpecialProperty condition="ifOwnedByCompany" when="anyTimeDuringOR" class="rails.game.special.SellBonusToken" transfer="toGameManager"> ! <SellBonusToken name="Tunnel" location="B13" price="50" value="10" number="2"/> </SpecialProperty> </SpecialProperties> --- 96,107 ---- <SpecialProperty condition="ifOwnedByCompany" when="anyTimeDuringOR" class="rails.game.special.SellBonusToken" transfer="toGameManager"> ! <SellBonusToken name="Tunnel" location="B13" price="50" value="10"> ! <IfOption name="UnlimitedBonusTokens" value="yes"> ! <Attributes amount="-1"/> ! </IfOption> ! <IfOption name="UnlimitedBonusTokens" value="no"> ! <Attributes amount="3"/> ! </IfOption> ! </SellBonusToken> </SpecialProperty> </SpecialProperties> Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1856/Game.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Game.xml 23 Nov 2009 18:32:47 -0000 1.27 --- Game.xml 28 Dec 2009 14:53:00 -0000 1.28 *************** *** 4,7 **** --- 4,8 ---- <Game name="1856"/> <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> + <GameOption name="UnlimitedBonusTokens" type="toggle" default="no"/> <StockRound class="rails.game.specific._1856.StockRound_1856" sequence="SellBuyOrBuySell"/> |