summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank/engine
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank/engine')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java2
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java1
2 files changed, 1 insertions, 2 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index 1eb68dd..42b8f23 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -275,7 +275,7 @@ public abstract class Board implements Disposable
targets.clear();
while (units.hasNext()) {
Pawn target = units.next();
- if (!target.canBeAttacked(pawn)) continue;
+ if (!pawn.canAttack(target)) continue;
Tile to = target.getTile();
if (searchBoard.collectAttack(pawn, true, target, from.getCol(), from.getRow(), to.getCol(), to.getRow()))
targets.add(target);
diff --git a/core/src/ch/asynk/tankontank/engine/Pawn.java b/core/src/ch/asynk/tankontank/engine/Pawn.java
index 42a4083..db54f36 100644
--- a/core/src/ch/asynk/tankontank/engine/Pawn.java
+++ b/core/src/ch/asynk/tankontank/engine/Pawn.java
@@ -62,7 +62,6 @@ public abstract class Pawn implements Moveable, Disposable
public abstract boolean canRotate();
public abstract boolean canAttack();
public abstract boolean canAttack(Pawn other);
- public abstract boolean canBeAttacked(Pawn other);
public abstract boolean canAssistAttackWithoutLos();
public abstract void move(int cost);