From ce982fcdaf1a15981419e7a88802bc225795e6a4 Mon Sep 17 00:00:00 2001 From: Jannis Harder Date: Tue, 10 May 2011 01:39:32 +0200 Subject: Tests for dropping on hand git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@206 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/IStoneTray.java | 2 +- src/jrummikub/model/StoneTray.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jrummikub/model') diff --git a/src/jrummikub/model/IStoneTray.java b/src/jrummikub/model/IStoneTray.java index bdf7f86..11fcbbb 100644 --- a/src/jrummikub/model/IStoneTray.java +++ b/src/jrummikub/model/IStoneTray.java @@ -33,7 +33,7 @@ public interface IStoneTray extends */ public Position getPosition(E object); - public void pickUp(E object); + public boolean pickUp(E object); public IStoneTray clone(); diff --git a/src/jrummikub/model/StoneTray.java b/src/jrummikub/model/StoneTray.java index 8b83371..3418aec 100644 --- a/src/jrummikub/model/StoneTray.java +++ b/src/jrummikub/model/StoneTray.java @@ -217,8 +217,8 @@ public class StoneTray implements IStoneTray { * @see jrummikub.model.IStoneTray#pickUp(E) */ @Override - public void pickUp(E object) { - objects.remove(object); + public boolean pickUp(E object) { + return null != objects.remove(object); } /* -- cgit v1.2.3