summaryrefslogtreecommitdiffstats
path: root/src/jrummikub
diff options
context:
space:
mode:
authorJannis Harder <harder@informatik.uni-luebeck.de>2011-05-03 19:06:12 +0200
committerJannis Harder <harder@informatik.uni-luebeck.de>2011-05-03 19:06:12 +0200
commit88292e9304afd644db9f54a526ecbe9bae314dd6 (patch)
tree304dc323fee29578f547993b44645e2c2b56e555 /src/jrummikub
parentf8f75fde6d6392aee2504df5bde05459d0b0c36f (diff)
downloadJRummikub-88292e9304afd644db9f54a526ecbe9bae314dd6.tar
JRummikub-88292e9304afd644db9f54a526ecbe9bae314dd6.zip
tested and implemented clone() in StoneTray
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@84 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub')
-rw-r--r--src/jrummikub/model/StoneTray.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/jrummikub/model/StoneTray.java b/src/jrummikub/model/StoneTray.java
index 7f97e1b..f215164 100644
--- a/src/jrummikub/model/StoneTray.java
+++ b/src/jrummikub/model/StoneTray.java
@@ -209,11 +209,16 @@ public class StoneTray<E extends Sizeable> implements
};
}
- /**
- * @param object
- */
public void pickUp(E object) {
objects.remove(object);
}
+
+
+ @Override
+ public StoneTray<E> clone() {
+ StoneTray<E> copy = new StoneTray();
+ copy.objects = (HashMap<E, Position>) objects.clone();
+ return copy;
+ }
}