diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Pawn.java | 2 | ||||
-rw-r--r-- | core/src/ch/asynk/tankontank/game/Unit.java | 14 | ||||
-rw-r--r-- | core/test/ch/asynk/tankontank/Helpers.java | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index b86625c..949803e 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -33,6 +33,8 @@ public abstract class Pawn implements Drawable, Disposable public abstract boolean isHq(); public abstract boolean isUnit(); public abstract boolean isEnemy(Pawn other); + public abstract boolean canMove(); + public abstract boolean canAttack(); public abstract boolean canAttack(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 3a61ab6..0a066e0 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -63,6 +63,20 @@ public class Unit extends HeadedPawn } @Override + public boolean canMove() + { + // TODO + return true; + } + + @Override + public boolean canAttack() + { + // TODO + return true; + } + + @Override public boolean canAttack(Pawn other) { return isEnemy(other); diff --git a/core/test/ch/asynk/tankontank/Helpers.java b/core/test/ch/asynk/tankontank/Helpers.java index e63f3d1..51fdc2e 100644 --- a/core/test/ch/asynk/tankontank/Helpers.java +++ b/core/test/ch/asynk/tankontank/Helpers.java @@ -21,6 +21,8 @@ public class Helpers public boolean isHq() { return true; } public boolean isUnit() { return true; } public boolean isEnemy(Pawn other) { return true; } + public boolean canMove() { return true; } + public boolean canAttack() { return true; } public boolean canAttack(Pawn other) { return true; } public int getAngleOfAttack() { return 0; } public int getAttackRangeFrom(Tile tile) { return 3; } |