From 39b1eb3399d24325f3ee3ecd360529bf018ce5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 21 Sep 2014 04:18:55 +0200 Subject: MapNode: fix tilesToDraw management --- core/src/ch/asynk/tankontank/engine/MapNode.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/ch/asynk/tankontank/engine/MapNode.java b/core/src/ch/asynk/tankontank/engine/MapNode.java index e9b8ed9..740074e 100644 --- a/core/src/ch/asynk/tankontank/engine/MapNode.java +++ b/core/src/ch/asynk/tankontank/engine/MapNode.java @@ -144,9 +144,10 @@ public class MapNode extends Image implements Map private int removePawnFrom(Pawn pawn, int col, int row) { Tile tile = board[row][col]; + int n = tile.remove(pawn); if (!tile.mustBeDrawn()) tilesToDraw.remove(tile); - return tile.remove(pawn); + return n; } @Override -- cgit v1.1-2-g2b99