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:
parent
94dc4ea7be
commit
6406c12c14
5 changed files with 14 additions and 9 deletions
|
@ -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)
|
||||
|
|
Reference in a new issue