summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-10 08:55:29 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-10 08:55:29 +0200
commit8424081ce754f2b71ec76bcae74bae4ac79791cd (patch)
treea2f93c7c89df23ae7e172b9a806c1bad4fceea70
parent197dd079a5729bb733e13173a88958a2a327d91b (diff)
downloadRustAndDust-8424081ce754f2b71ec76bcae74bae4ac79791cd.zip
RustAndDust-8424081ce754f2b71ec76bcae74bae4ac79791cd.tar.gz
Pawn: add abstract move(int), rotate(Orientation), attack(Pawn), reset(), revertLastMove()
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index 6243cf6..fb4304a 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -30,15 +30,24 @@ public abstract class Pawn implements Drawable, Disposable
public abstract int getMovementPoints();
public abstract int getRoadMarchBonus();
+ public abstract int getAngleOfAttack();
+ public abstract int getAttackRangeFrom(Tile tile);
+
public abstract boolean isHq();
public abstract boolean isUnit();
public abstract boolean isEnemy(Pawn other);
+
public abstract boolean canMove();
public abstract boolean canRotate();
public abstract boolean canAttack();
public abstract boolean canAttack(Pawn other);
- public abstract int getAngleOfAttack();
- public abstract int getAttackRangeFrom(Tile tile);
+
+ public abstract void move(int cost);
+ public abstract void rotate(Orientation o);
+ public abstract void attack(Pawn target);
+
+ public abstract void reset();
+ public abstract void revertLastMove();
protected Pawn()
{