summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model
diff options
context:
space:
mode:
authorBennet Gerlach <bennet_gerlach@web.de>2011-05-10 04:02:46 +0200
committerBennet Gerlach <bennet_gerlach@web.de>2011-05-10 04:02:46 +0200
commit1f799ad15ec258f8bf8d12ff954c29f50c2ab09e (patch)
tree3d41daee7fe8d2b71fdaa303bbb643780377a847 /src/jrummikub/model
parent07e2388b95fc58dfa6c053b9384c883fb5dfc8e3 (diff)
downloadJRummikub-1f799ad15ec258f8bf8d12ff954c29f50c2ab09e.tar
JRummikub-1f799ad15ec258f8bf8d12ff954c29f50c2ab09e.zip
Fixed mloc in stone tray
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@215 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/model')
-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()) {