summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Tile.java1
-rw-r--r--core/src/ch/asynk/tankontank/game/Hex.java6
2 files changed, 7 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Tile.java b/core/src/ch/asynk/tankontank/engine/Tile.java
index 8e64ce6..aaa6029 100644
--- a/core/src/ch/asynk/tankontank/engine/Tile.java
+++ b/core/src/ch/asynk/tankontank/engine/Tile.java
@@ -21,6 +21,7 @@ public abstract class Tile implements Drawable
public abstract boolean road(Board.Orientation side);
public abstract int costFrom(Pawn pawn, Board.Orientation side, boolean road);
public abstract boolean hasTargetsFor(Pawn pawn);
+ public abstract boolean isOffMap();
public Tile(float x, float y, TextureAtlas atlas)
{
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java
index 2d36960..f7b1e23 100644
--- a/core/src/ch/asynk/tankontank/game/Hex.java
+++ b/core/src/ch/asynk/tankontank/game/Hex.java
@@ -36,6 +36,12 @@ public class Hex extends Tile
}
@Override
+ public boolean isOffMap()
+ {
+ return terrain == Terrain.OFFMAP;
+ }
+
+ @Override
public boolean atLeastOneMove(Pawn pawn)
{
if (occupied() || (terrain == Terrain.BLOCKED) || (terrain == Terrain.OFFMAP))