From: Erik V. <ev...@us...> - 2009-09-12 09:41:08
|
Update of /cvsroot/rails/18xx/rails/game In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30193/rails/game Modified Files: PublicCompanyI.java PublicCompany.java Player.java Log Message: 1856: Deduct $10 per outstanding loan from player worth. Index: Player.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Player.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Player.java 4 Sep 2009 18:56:16 -0000 1.20 --- Player.java 12 Sep 2009 09:40:56 -0000 1.21 *************** *** 85,89 **** for (PublicCertificateI cert : portfolio.getCertificates()) { ! worth += cert.getCompany().getMarketPrice(); } for (PrivateCompanyI priv : portfolio.getPrivateCompanies()) { --- 85,89 ---- for (PublicCertificateI cert : portfolio.getCertificates()) { ! worth += cert.getCompany().getGameEndPrice(); } for (PrivateCompanyI priv : portfolio.getPrivateCompanies()) { Index: PublicCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompany.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** PublicCompany.java 8 Sep 2009 21:48:59 -0000 1.58 --- PublicCompany.java 12 Sep 2009 09:40:56 -0000 1.59 *************** *** 956,959 **** --- 956,968 ---- } } + + /** Return the price per share at game end. + * Normally, it is equal to the market price, + * but in some games (e.g. 1856) deductions may apply. + * @return + */ + public int getGameEndPrice() { + return getMarketPrice(); + } /** Index: PublicCompanyI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompanyI.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** PublicCompanyI.java 6 Sep 2009 12:27:32 -0000 1.34 --- PublicCompanyI.java 12 Sep 2009 09:40:56 -0000 1.35 *************** *** 145,149 **** public int getMarketPrice (); ! public int getPublicNumber(); --- 145,150 ---- public int getMarketPrice (); ! public int getGameEndPrice(); ! public int getPublicNumber(); |