|
From: Erik V. <ev...@us...> - 2012-10-09 19:25:34
|
rails/game/OperatingRound.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit fa8142a7eec7a0ba5d2e5f795d0063908650db59
Author: Erik Vos <eri...@xs...>
Date: Tue Oct 9 21:24:48 2012 +0200
When buying trains from other companies, include companies that have floated but do not operate in the current round for any reason.
This fixes a bug reported by Volker Schnell where no train could be bought from the PR in the OR where the PR was formed.
diff --git a/rails/game/OperatingRound.java b/rails/game/OperatingRound.java
index d799ad9..4d77326 100644
--- a/rails/game/OperatingRound.java
+++ b/rails/game/OperatingRound.java
@@ -3062,7 +3062,9 @@ public class OperatingRound extends Round implements Observer {
companiesPerPlayer.add(new ArrayList<PublicCompanyI>(4));
List<PublicCompanyI> companies;
// Sort out which players preside over which companies.
- for (PublicCompanyI c : getOperatingCompanies()) {
+ //for (PublicCompanyI c : getOperatingCompanies()) {
+ for (PublicCompanyI c : companyManager.getAllPublicCompanies()) {
+ if (!c.hasFloated()) continue;
if (c.isClosed() || c == operatingCompany.get()) continue;
p = c.getPresident();
index = p.getIndex();
|