From 8cf208a92b7d95fcee239413f4f6db8a067d6f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 7 Oct 2014 23:34:40 +0200 Subject: Pawn,Unit: add isHq() --- core/src/ch/asynk/tankontank/engine/Pawn.java | 1 + core/src/ch/asynk/tankontank/game/Unit.java | 6 ++++++ 2 files changed, 7 insertions(+) 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; -- cgit v1.1-2-g2b99