evalLot: replace hardcode tile number comparisons with isRoad/isRail

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@792 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-08-12 02:37:04 +00:00
parent ecba1ff5f9
commit 471b77a562
2 changed files with 15 additions and 10 deletions

View file

@ -80,7 +80,7 @@ public class TileConstants
public static final char LTRFBASE = 80;
public static final char BRWV = 95; //vert bridge, open
public static final char HTRFBASE = 144;
public static final char LASTROAD = 206;
private static final char LASTROAD = 206;
public static final char POWERBASE = 208;
public static final char HPOWER = 208; //underwater power-line
public static final char VPOWER = 209;
@ -664,6 +664,11 @@ public class TileConstants
|| (tmp >= SMOKEBASE2 && tmp < FOOTBALLGAME1);
}
public static boolean isResidentialClear(int tile)
{
return (tile & LOMASK) >= RESBASE && (tile & LOMASK) <= RESBASE+8;
}
/** Note: does not include hospital/church.
* @see #isHospitalOrChurch
*/