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 5f08b4e..2939ef8 100644
--- a/core/src/ch/asynk/tankontank/engine/Tile.java
+++ b/core/src/ch/asynk/tankontank/engine/Tile.java
@@ -29,6 +29,7 @@ public abstract class Tile implements Drawable, Disposable, Iterable<Pawn>
private ArrayDeque<Pawn> stack;
public abstract int defense();
+ public abstract int exitCost();
public abstract int costFrom(Pawn pawn, Orientation side);
public abstract boolean isOffMap();
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java
index 1bb826c..f1ba86a 100644
--- a/core/src/ch/asynk/tankontank/game/Hex.java
+++ b/core/src/ch/asynk/tankontank/game/Hex.java
@@ -100,6 +100,12 @@ public class Hex extends Tile
}
@Override
+ public int exitCost()
+ {
+ return 1;
+ }
+
+ @Override
public int costFrom(Pawn pawn, Orientation side)
{
if (hasUnits()) return (Integer.MAX_VALUE / 2);