Update of /cvsroot/rails/18xx/rails/game
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv18933/rails/game
Modified Files:
MapHex.java
Log Message:
Fixed reserved token spot detection
Index: MapHex.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/game/MapHex.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** MapHex.java 11 Apr 2010 15:49:47 -0000 1.42
--- MapHex.java 15 Apr 2010 19:49:02 -0000 1.43
***************
*** 975,978 ****
--- 975,979 ----
*/
public boolean isBlockedForTokenLays(PublicCompanyI company, int cityNumber) {
+
if (isHomeFor(company))
// Company can always lay a home base
***************
*** 984,989 ****
return isBlockedForTokenLays.booleanValue();
} else if (homes != null && !homes.isEmpty()) {
// Check if this token lay does not block an unlaid home base
! for (City city : homes.values()) {
if (cityNumber == city.getNumber()
// Assume that a city is never home to more than one company
--- 985,993 ----
return isBlockedForTokenLays.booleanValue();
} else if (homes != null && !homes.isEmpty()) {
+ City city;
// Check if this token lay does not block an unlaid home base
! for (PublicCompanyI comp : homes.keySet()) {
! if (comp.hasLaidHomeBaseTokens() || comp.isClosed()) continue;
! city = homes.get(comp);
if (cityNumber == city.getNumber()
// Assume that a city is never home to more than one company
|