From 8424081ce754f2b71ec76bcae74bae4ac79791cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 10 Oct 2014 08:55:29 +0200 Subject: Pawn: add abstract move(int), rotate(Orientation), attack(Pawn), reset(), revertLastMove() --- core/src/ch/asynk/tankontank/engine/Pawn.java | 13 +++++++++++-- 1 file 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() { -- cgit v1.1-2-g2b99