From 1f799ad15ec258f8bf8d12ff954c29f50c2ab09e Mon Sep 17 00:00:00 2001 From: Bennet Gerlach Date: Tue, 10 May 2011 04:02:46 +0200 Subject: Fixed mloc in stone tray git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@215 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/StoneTray.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/jrummikub/model') 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 implements IStoneTray { } } - @SuppressWarnings("unchecked") private void drop(E object, Position position, Direction direction) { Pair update = fixInvalidDrop(object, position, direction); @@ -63,6 +62,11 @@ public class StoneTray implements IStoneTray { direction = update.getSecond(); } + dropUnchecked(object, position, direction); + } + + @SuppressWarnings("unchecked") + private void dropUnchecked(E object, Position position, Direction direction) { objects.put(object, new Pair(object, position)); for (Pair i : ((Map>) objects.clone()) .values()) { -- cgit v1.2.3