TileConstants: implement isCombustible()

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@725 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-07-07 13:16:54 +00:00
parent 94dc4ea7be
commit 6406c12c14
5 changed files with 14 additions and 9 deletions

View file

@ -294,7 +294,12 @@ public class TileConstants
public static boolean isBridge(int tile)
{
return (((tile & LOMASK) >= ROADBASE && (tile & LOMASK) <= LASTROAD)
&& ((tile & BURNBIT) == 0));
&& !isCombustible(tile));
}
public static boolean isCombustible(int tile)
{
return (tile & BURNBIT) != 0;
}
public static boolean isFire(int tile)
@ -413,7 +418,7 @@ public class TileConstants
static boolean isFloodable(int tile)
{
return (tile == DIRT || ((tile & BULLBIT) != 0 && (tile & BURNBIT) != 0));
return (tile == DIRT || ((tile & BULLBIT) != 0 && isCombustible(tile)));
}
public static boolean isRoad(int tile)