summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-07 23:34:40 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-07 23:34:40 +0200
commit8cf208a92b7d95fcee239413f4f6db8a067d6f8b (patch)
treeb052b534ee705539a469d8203bc0718eecbdcdca /core
parent9ec2a47c29300a7db60d778bc737baf7fe17f692 (diff)
downloadRustAndDust-8cf208a92b7d95fcee239413f4f6db8a067d6f8b.zip
RustAndDust-8cf208a92b7d95fcee239413f4f6db8a067d6f8b.tar.gz
Pawn,Unit: add isHq()
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java1
-rw-r--r--core/src/ch/asynk/tankontank/game/Unit.java6
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 bec7c68..b86625c 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -30,6 +30,7 @@ public abstract class Pawn implements Drawable, Disposable
public abstract int getMovementPoints();
public abstract int getRoadMarchBonus();
+ public abstract boolean isHq();
public abstract boolean isUnit();
public abstract boolean isEnemy(Pawn other);
public abstract boolean canAttack(Pawn other);
diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java
index 0ececb2..3a61ab6 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 isHq()
+ {
+ return hq;
+ }
+
+ @Override
public boolean isUnit()
{
return true;