diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-17 16:18:15 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-17 16:18:15 +0100 |
commit | a31850c31c0f2f70e9bd191f6d69f43abd619696 (patch) | |
tree | 2b77cdf63059751d9efb181121c6bbf03eb45eb7 /core/src/ch/asynk/tankontank/game | |
parent | bae96611e3659847f3bbf6583ae63ebcb960a2c6 (diff) | |
download | RustAndDust-a31850c31c0f2f70e9bd191f6d69f43abd619696.zip RustAndDust-a31850c31c0f2f70e9bd191f6d69f43abd619696.tar.gz |
Tile: add interface TileTerrain, boolean isA(TileTerrain terrain)
Diffstat (limited to 'core/src/ch/asynk/tankontank/game')
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Hex.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java index 656a1e6..7abf0d3 100644 --- a/core/src/ch/asynk/tankontank/game/Hex.java +++ b/core/src/ch/asynk/tankontank/game/Hex.java @@ -12,7 +12,7 @@ import ch.asynk.tankontank.engine.Orientation; public class Hex extends Tile { - public enum Terrain + public enum Terrain implements TileTerrain { OFFMAP, BLOCKED, @@ -52,6 +52,12 @@ public class Hex extends Tile } @Override + public boolean isA(TileTerrain terrain) + { + return (this.terrain == terrain); + } + + @Override public boolean isOffMap() { return terrain == Terrain.OFFMAP; |