diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2020-06-01 13:52:50 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2020-06-01 13:52:50 +0200 |
commit | 1a9d984f25b07a5c45484825274c177ea39bc1c3 (patch) | |
tree | 030620c68f741ae7b8e878a4bb04d063befedd16 /test | |
parent | d355fc5e47a1019bde41f2d92398371922e1c9af (diff) | |
download | gdx-boardgame-1a9d984f25b07a5c45484825274c177ea39bc1c3.zip gdx-boardgame-1a9d984f25b07a5c45484825274c177ea39bc1c3.tar.gz |
BoardScreen : improve adjacents management
Diffstat (limited to 'test')
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java b/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java index b48c953..8388959 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java @@ -122,8 +122,10 @@ public class BoardScreen extends AbstractScreen private void clearAdjacents() { for (Tile tile : board.getAdjacents()) { - if (tile != null) + if (tile != null) { + tilesToDraw.remove(tile); tile.enableOverlay(12, false); + } } } @@ -137,11 +139,6 @@ public class BoardScreen extends AbstractScreen tile.enableOverlay(12, true); } } - for (Tile tile : tilesToDraw) { - if (!tile.overlaysEnabled()) { - tilesToDraw.remove(tile); - } - } } private Tile getTile(int x, int y) |