summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-10-10 13:49:46 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-10-10 13:49:46 +0200
commit198545a324dd215f2ef4e4011d20970cfefaa4b1 (patch)
tree6035e8ff06abcf1151135dd75f2903d69eb56915 /core
parent118dfc1d77cbb566c3ed212d79cb29bfda7c99d9 (diff)
downloadRustAndDust-198545a324dd215f2ef4e4011d20970cfefaa4b1.zip
RustAndDust-198545a324dd215f2ef4e4011d20970cfefaa4b1.tar.gz
Board: pawns that cannot move cannot assist moves
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/tankontank/engine/Board.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java
index f40a6b8..40737ca 100644
--- a/core/src/ch/asynk/tankontank/engine/Board.java
+++ b/core/src/ch/asynk/tankontank/engine/Board.java
@@ -336,8 +336,9 @@ public abstract class Board implements Disposable
Tile t = getTileSafe(neighbour);
if (t != null) {
Pawn p = t.getTopPawn();
- if ((p != null) && (!pawn.isEnemy(p)))
+ if ((p != null) && p.canMove() && !pawn.isEnemy(p)) {
assists.add(neighbour);
+ }
}
}
}