Update of /cvsroot/rails/18xx/rails/game
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv14708/rails/game
Modified Files:
OperatingRound.java PrivateCompany.java
Log Message:
Fixed 1856 W&SR closure
Index: OperatingRound.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -d -r1.122 -r1.123
*** OperatingRound.java 11 Apr 2010 15:49:47 -0000 1.122
--- OperatingRound.java 21 Apr 2010 19:16:44 -0000 1.123
***************
*** 1407,1414 ****
// Check if any privates must be closed
! // (now only applies to 1856 W&SR)
! for (PrivateCompanyI priv : gameManager.getAllPrivateCompanies()) {
! priv.checkClosingIfExercised(true);
! }
// OR done. Inform GameManager.
--- 1407,1414 ----
// Check if any privates must be closed
! // (now only applies to 1856 W&SR) - no, that is at end of TURN
! //for (PrivateCompanyI priv : gameManager.getAllPrivateCompanies()) {
! // priv.checkClosingIfExercised(true);
! //}
// OR done. Inform GameManager.
Index: PrivateCompany.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/game/PrivateCompany.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** PrivateCompany.java 11 Apr 2010 15:49:47 -0000 1.40
--- PrivateCompany.java 21 Apr 2010 19:16:44 -0000 1.41
***************
*** 30,35 ****
// Close at start of phase
protected String closeAtPhaseName = null;
!
! protected String blockedHexesString = null;
protected List<MapHex> blockedHexes = null;
--- 30,35 ----
// Close at start of phase
protected String closeAtPhaseName = null;
!
! protected String blockedHexesString = null;
protected List<MapHex> blockedHexes = null;
***************
*** 93,97 ****
String whenAttribute = spTag.getAttributeAsString("when");
if (whenAttribute != null) {
! closeAtEndOfTurn = whenAttribute.equalsIgnoreCase("atEndOfORTurn");
}
}
--- 93,97 ----
String whenAttribute = spTag.getAttributeAsString("when");
if (whenAttribute != null) {
! closeAtEndOfTurn = whenAttribute.equalsIgnoreCase("endOfORTurn");
}
}
***************
*** 351,357 ****
}
! public void checkClosingIfExercised (boolean endOfOR) {
! if (isClosed() || endOfOR != closeAtEndOfTurn) return;
if (closeIfAllExercised) {
--- 351,357 ----
}
! public void checkClosingIfExercised (boolean endOfTurn) {
! if (isClosed() || endOfTurn != closeAtEndOfTurn) return;
if (closeIfAllExercised) {
|