From 88292e9304afd644db9f54a526ecbe9bae314dd6 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Tue, 3 May 2011 19:06:12 +0200 Subject: tested and implemented clone() in StoneTray git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@84 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/StoneTray.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/jrummikub/model') 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 implements }; } - /** - * @param object - */ public void pickUp(E object) { objects.remove(object); } + + + @Override + public StoneTray clone() { + StoneTray copy = new StoneTray(); + copy.objects = (HashMap) objects.clone(); + return copy; + } } -- cgit v1.2.3