summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jrummikub/model/StoneTray.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jrummikub/model/StoneTray.java b/src/jrummikub/model/StoneTray.java
index 16ffa46..b9902e8 100644
--- a/src/jrummikub/model/StoneTray.java
+++ b/src/jrummikub/model/StoneTray.java
@@ -54,7 +54,6 @@ public class StoneTray<E extends Sizeable> implements IStoneTray<E> {
}
}
- @SuppressWarnings("unchecked")
private void drop(E object, Position position, Direction direction) {
Pair<Position, Direction> update = fixInvalidDrop(object, position,
direction);
@@ -63,6 +62,11 @@ public class StoneTray<E extends Sizeable> implements IStoneTray<E> {
direction = update.getSecond();
}
+ dropUnchecked(object, position, direction);
+ }
+
+ @SuppressWarnings("unchecked")
+ private void dropUnchecked(E object, Position position, Direction direction) {
objects.put(object, new Pair<E, Position>(object, position));
for (Pair<E, Position> i : ((Map<E, Pair<E, Position>>) objects.clone())
.values()) {