From db0a45007658a1a6c3cea7f05b79928e06612394 Mon Sep 17 00:00:00 2001 From: "jason@long.name" Date: Sun, 5 May 2013 18:52:21 +0000 Subject: [PATCH] TileConstants: two new helper methods: isDozeable, isZoneCenter git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@616 d9718cc8-9f43-0410-858b-315f434eb58c --- src/micropolisj/engine/TileConstants.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/micropolisj/engine/TileConstants.java b/src/micropolisj/engine/TileConstants.java index 53c1d98..ff7f39c 100644 --- a/src/micropolisj/engine/TileConstants.java +++ b/src/micropolisj/engine/TileConstants.java @@ -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; + } }