diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/ch/asynk/rustanddust/engine/TileSet.java | 12 |
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; + } } |