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