summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java1
-rw-r--r--core/src/ch/asynk/tankontank/game/Unit.java7
2 files changed, 8 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index 8ccc77b..27e6303 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -28,6 +28,7 @@ public abstract class Pawn extends Image implements Disposable
public abstract int getRoadMarchBonus();
public abstract boolean isEnemy(Pawn other);
public abstract int getAngleOfAttack();
+ public abstract int getAttackRangeFrom(Tile tile);
public Pawn(TextureRegion pawn, TextureAtlas overlays)
{
diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java
index 7567307..0a69249 100644
--- a/core/src/ch/asynk/tankontank/game/Unit.java
+++ b/core/src/ch/asynk/tankontank/game/Unit.java
@@ -4,6 +4,7 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import ch.asynk.tankontank.engine.Pawn;
+import ch.asynk.tankontank.engine.Tile;
import ch.asynk.tankontank.engine.HeadedPawn;
public class Unit extends HeadedPawn
@@ -31,6 +32,12 @@ public class Unit extends HeadedPawn
}
@Override
+ public int getAttackRangeFrom(Tile tile)
+ {
+ return rng;
+ }
+
+ @Override
public int getAngleOfAttack()
{
return orientation.getFrontSides();