From 198545a324dd215f2ef4e4011d20970cfefaa4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 10 Oct 2014 13:49:46 +0200 Subject: Board: pawns that cannot move cannot assist moves --- core/src/ch/asynk/tankontank/engine/Board.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); + } } } } -- cgit v1.1-2-g2b99