diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-23 22:18:43 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-11-23 22:18:43 +0100 |
commit | 95016312a86c742e76f630aab2af5e64ceed327b (patch) | |
tree | 7e8dda17bc9b7ca060a321f0e0443930b5b20b52 /core/src | |
parent | cfc4fb12266f8630412bd58261d35d9087541f54 (diff) | |
download | RustAndDust-95016312a86c742e76f630aab2af5e64ceed327b.zip RustAndDust-95016312a86c742e76f630aab2af5e64ceed327b.tar.gz |
Board: removePawn does nothing is pawn is not on a tile
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/ch/asynk/tankontank/engine/Board.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/src/ch/asynk/tankontank/engine/Board.java b/core/src/ch/asynk/tankontank/engine/Board.java index d6426bb..b17170d 100644 --- a/core/src/ch/asynk/tankontank/engine/Board.java +++ b/core/src/ch/asynk/tankontank/engine/Board.java @@ -383,6 +383,8 @@ public abstract class Board implements Disposable public int removePawn(Pawn pawn) { Tile tile = pawn.getTile(); + if (tile == null) + return 0; int n = tile.remove(pawn); if (!tile.mustBeDrawn()) tilesToDraw.remove(tile); |