summaryrefslogtreecommitdiffstats
path: root/src/jrummikub
diff options
context:
space:
mode:
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;
+ }
}