From: Phil D. <de...@gm...> - 2010-01-20 20:32:52
|
Spotted this issue today whilst running through a game today. When a company purchases it's shares from the pool, it buys each share at (number of shares it is buying * current market price) rather than just current market price. I think this is the bit that is causing the problem (patch below), it has a loop for the share purchase but passes the price as shares*price through to executeTradeCertificate Phil Index: rails/game/TreasuryShareRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/TreasuryShareRound.java,v retrieving revision 1.18 diff -u -r1.18 TreasuryShareRound.java --- rails/game/TreasuryShareRound.java 18 Jan 2010 18:49:30 -0000 1.18 +++ rails/game/TreasuryShareRound.java 20 Jan 2010 20:25:40 -0000 @@ -360,7 +360,7 @@ PublicCertificateI cert2; for (int i = 0; i < number; i++) { cert2 = from.findCertificate(company, cert.getShares(), false); - executeTradeCertificate(cert2, portfolio, shares * price); + executeTradeCertificate(cert2, portfolio, price); } hasBought.set(true); |