diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-10 13:49:46 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-10-10 13:49:46 +0200 |
commit | 198545a324dd215f2ef4e4011d20970cfefaa4b1 (patch) | |
tree | 6035e8ff06abcf1151135dd75f2903d69eb56915 /core/src/ch/asynk/tankontank | |
parent | 118dfc1d77cbb566c3ed212d79cb29bfda7c99d9 (diff) | |
download | RustAndDust-198545a324dd215f2ef4e4011d20970cfefaa4b1.zip RustAndDust-198545a324dd215f2ef4e4011d20970cfefaa4b1.tar.gz |
Board: pawns that cannot move cannot assist moves
Diffstat (limited to 'core/src/ch/asynk/tankontank')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 3 |
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); + } } } } |