summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-08 11:59:59 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-08 11:59:59 +0200
commitacdb3eefde378f1f34c101e9070f18a18d6f58a0 (patch)
tree6094fc986f7d65634bdbdc1f25b1493e88a32204 /core/src
parentcc1630d6571a107f6d6edd7b9e57fe6eb8d4996b (diff)
downloadRustAndDust-acdb3eefde378f1f34c101e9070f18a18d6f58a0.zip
RustAndDust-acdb3eefde378f1f34c101e9070f18a18d6f58a0.tar.gz
Pawn,Unit: add canMove() and canAttack()
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java2
-rw-r--r--core/src/ch/asynk/tankontank/game/Unit.java14
2 files changed, 16 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);