Fixed mloc in stone tray
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@215 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
07e2388b95
commit
1f799ad15e
1 changed files with 5 additions and 1 deletions
|
@ -54,7 +54,6 @@ public class StoneTray<E extends Sizeable> implements IStoneTray<E> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private void drop(E object, Position position, Direction direction) {
|
private void drop(E object, Position position, Direction direction) {
|
||||||
Pair<Position, Direction> update = fixInvalidDrop(object, position,
|
Pair<Position, Direction> update = fixInvalidDrop(object, position,
|
||||||
direction);
|
direction);
|
||||||
|
@ -63,6 +62,11 @@ public class StoneTray<E extends Sizeable> implements IStoneTray<E> {
|
||||||
direction = update.getSecond();
|
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));
|
objects.put(object, new Pair<E, Position>(object, position));
|
||||||
for (Pair<E, Position> i : ((Map<E, Pair<E, Position>>) objects.clone())
|
for (Pair<E, Position> i : ((Map<E, Pair<E, Position>>) objects.clone())
|
||||||
.values()) {
|
.values()) {
|
||||||
|
|
Reference in a new issue