summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/tankontank
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java2
-rw-r--r--core/src/ch/asynk/tankontank/engine/Pawn.java1
-rw-r--r--core/src/ch/asynk/tankontank/game/Unit.java6
3 files changed, 1 insertions, 8 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);
diff --git a/core/src/ch/asynk/tankontank/game/Unit.java b/core/src/ch/asynk/tankontank/game/Unit.java
index 5670c1b..71182a2 100644
--- a/core/src/ch/asynk/tankontank/game/Unit.java
+++ b/core/src/ch/asynk/tankontank/game/Unit.java
@@ -195,12 +195,6 @@ public class Unit extends HeadedPawn
}
@Override
- public boolean canBeAttacked(Pawn other)
- {
- return true;
- }
-
- @Override
public void rotate(Orientation o)
{
hasMoved = true;