summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust/engine
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-01-09 19:02:29 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2016-01-09 19:02:29 +0100
commitd4e5e1f73b6ac7e0b06a2fe749b8f90376df9f91 (patch)
treed56dc8d2e280f9193ae869796d59d057feee248e /core/src/ch/asynk/rustanddust/engine
parent39bcc7375c7d9c17922ec76be6f7834ae8211b82 (diff)
downloadRustAndDust-d4e5e1f73b6ac7e0b06a2fe749b8f90376df9f91.zip
RustAndDust-d4e5e1f73b6ac7e0b06a2fe749b8f90376df9f91.tar.gz
TileSet: extends ArrayListIt
Diffstat (limited to 'core/src/ch/asynk/rustanddust/engine')
-rw-r--r--core/src/ch/asynk/rustanddust/engine/TileSet.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/engine/TileSet.java b/core/src/ch/asynk/rustanddust/engine/TileSet.java
index 76fa3a1..9531549 100644
--- a/core/src/ch/asynk/rustanddust/engine/TileSet.java
+++ b/core/src/ch/asynk/rustanddust/engine/TileSet.java
@@ -1,8 +1,8 @@
package ch.asynk.rustanddust.engine;
-import java.util.LinkedHashSet;
+import ch.asynk.rustanddust.engine.util.ArrayListIt;
-public class TileSet extends LinkedHashSet<Tile>
+public class TileSet extends ArrayListIt<Tile>
{
private final Board board;
@@ -17,4 +17,12 @@ public class TileSet extends LinkedHashSet<Tile>
for (Tile tile : this)
board.enableOverlayOn(tile, i, enable);
}
+
+ @Override
+ public boolean add(Tile tile)
+ {
+ if (contains(tile)) return false;
+ super.add(tile);
+ return true;
+ }
}