TileConstants: two new helper methods: isDozeable, isZoneCenter
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@616 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
e9f06bb1c2
commit
db0a450076
1 changed files with 10 additions and 0 deletions
|
@ -344,6 +344,11 @@ public class TileConstants
|
|||
return (tile & LOMASK) > 4 && (tile & LOMASK) < 21;
|
||||
}
|
||||
|
||||
public static boolean isDozeable(int tile)
|
||||
{
|
||||
return (tile & BULLBIT) != 0;
|
||||
}
|
||||
|
||||
static boolean isFloodable(int tile)
|
||||
{
|
||||
return (tile == DIRT || ((tile & BULLBIT) != 0 && (tile & BURNBIT) != 0));
|
||||
|
@ -360,4 +365,9 @@ public class TileConstants
|
|||
int tmp = tile & LOMASK;
|
||||
return (tmp >= RAILBASE && tmp < RESBASE);
|
||||
}
|
||||
|
||||
public static boolean isZoneCenter(int tile)
|
||||
{
|
||||
return (tile & ZONEBIT) != 0;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue