From 173715662329bf58afca3dcdea3676d2f56a82b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 13 Oct 2014 16:00:47 +0200 Subject: Pawn,Unit: add int getFlankSides() --- core/src/ch/asynk/tankontank/engine/Pawn.java | 1 + core/src/ch/asynk/tankontank/game/Unit.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java index a3b0a26..f468b03 100644 --- a/core/src/ch/asynk/tankontank/engine/Pawn.java +++ b/core/src/ch/asynk/tankontank/engine/Pawn.java @@ -33,6 +33,7 @@ public abstract class Pawn implements Drawable, Disposable public abstract int getMovementPoints(); public abstract int getRoadMarchBonus(); public abstract int getAngleOfAttack(); + public abstract int getFlankSides(); public abstract int getAttackRangeFrom(Tile tile); public abstract boolean isHq(); diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java index 2d79a5c..f6c6c1a 100644 --- a/core/src/ch/asynk/tankontank/game/Unit.java +++ b/core/src/ch/asynk/tankontank/game/Unit.java @@ -95,6 +95,12 @@ public class Unit extends HeadedPawn } @Override + public int getFlankSides() + { + return orientation.getBackSides(); + } + + @Override public boolean isHq() { return hq; -- cgit v1.1-2-g2b99