Update of /cvsroot/rails/18xx/rails/ui/swing/hexmap
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv25475/rails/ui/swing/hexmap
Modified Files:
GUITile.java
Log Message:
Reinstated the brown-OO-upgrade-correctness check, which had disappeared in version 1.0.5 for unclear reasons.
Index: GUITile.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/ui/swing/hexmap/GUITile.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** GUITile.java 31 Jan 2010 22:22:36 -0000 1.22
--- GUITile.java 18 Apr 2010 15:09:58 -0000 1.23
***************
*** 138,141 ****
--- 138,142 ----
oldTrack.getEndPoint(prevTileSide));
} else {
+ // Downgraded
// Assume there are only two exits
// (this is the only known case for downgrading:
***************
*** 190,208 ****
if (oldCities.get(lll) == null) continue;
// If new tile is missing a connection, skip
! log.debug("Found " + oldCities.get(kk) + " & "
! + oldCities.get(ll));
! log.debug("Check " + newCities.get(kk) + " & "
+ newCities.get(ll));
if (newCities.get(kk) == null
|| newCities.get(ll) == null) continue rot;
// If connected cities do not correspond, skip
! // log.debug("Compare
! // "+oldCities.get(kkk)+"/"+oldCities.get(lll)
! // +" ~ "+newCities.get(kk)+"/"+newCities.get(ll));
! // if ((oldCities.get(kkk).equals(oldCities.get(lll)))
! // != (newCities.get(kk).equals(newCities.get(ll)))) {
! // log.debug("No match!");
! // continue rot;
! // }
}
}
--- 191,209 ----
if (oldCities.get(lll) == null) continue;
// If new tile is missing a connection, skip
! log.debug("Found " + oldCities.get(kkk) + " & "
! + oldCities.get(lll));
! log.debug("Check " + newCities.get(kkk) + " & "
+ newCities.get(ll));
if (newCities.get(kk) == null
|| newCities.get(ll) == null) continue rot;
// If connected cities do not correspond, skip
! // (this is the "OO brown upgrade get-right" feature)
! log.debug("Compare "+oldCities.get(kkk)+"/"+oldCities.get(lll)
! +" ~ "+newCities.get(kk)+"/"+newCities.get(ll));
! if ((oldCities.get(kkk).equals(oldCities.get(lll)))
! != (newCities.get(kk).equals(newCities.get(ll)))) {
! log.debug("No match!");
! continue rot;
! }
}
}
|