diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-10 08:55:29 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-10 08:55:29 +0200 |
commit | 8424081ce754f2b71ec76bcae74bae4ac79791cd (patch) | |
tree | a2f93c7c89df23ae7e172b9a806c1bad4fceea70 /core/src | |
parent | 197dd079a5729bb733e13173a88958a2a327d91b (diff) | |
download | RustAndDust-8424081ce754f2b71ec76bcae74bae4ac79791cd.zip RustAndDust-8424081ce754f2b71ec76bcae74bae4ac79791cd.tar.gz |
Pawn: add abstract move(int), rotate(Orientation), attack(Pawn), reset(), revertLastMove()
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Pawn.java | 13 |
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() { |