diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Pawn.java | 1 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Unit.java | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index b049b92..be3c04c 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -26,6 +26,7 @@ public abstract class Pawn extends Image implements Disposable public abstract int getMovementPoints(); public abstract int getRoadMarchBonus(); + public abstract boolean isUnit(); public abstract boolean isEnemy(Pawn other); public abstract int getAngleOfAttack(); public abstract int getAttackRangeFrom(Tile tile); diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java index 59f6d32..9d880fd 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -45,6 +45,12 @@ public class Unit extends HeadedPawn } @Override + public boolean isUnit() + { + return true; + } + + @Override public boolean isEnemy(Pawn other) { return army.isEnemy(((Unit) other).army); |