summaryrefslogtreecommitdiffstats
path: root/test/src/ch/asynk/gdx
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-06-01 13:52:50 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-06-01 13:52:50 +0200
commit1a9d984f25b07a5c45484825274c177ea39bc1c3 (patch)
tree030620c68f741ae7b8e878a4bb04d063befedd16 /test/src/ch/asynk/gdx
parentd355fc5e47a1019bde41f2d92398371922e1c9af (diff)
downloadgdx-boardgame-1a9d984f25b07a5c45484825274c177ea39bc1c3.zip
gdx-boardgame-1a9d984f25b07a5c45484825274c177ea39bc1c3.tar.gz
BoardScreen : improve adjacents management
Diffstat (limited to 'test/src/ch/asynk/gdx')
-rw-r--r--test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java9
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)