From 433a0c3561eeaec96c23656a347e38e3a3602597 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 5 May 2011 13:16:46 +0200 Subject: Moved mock classes to separate source folder git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@142 72836036-5685-4462-b002-a69064685172 --- mock/jrummikub/model/MockHand.java | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 mock/jrummikub/model/MockHand.java (limited to 'mock/jrummikub/model/MockHand.java') diff --git a/mock/jrummikub/model/MockHand.java b/mock/jrummikub/model/MockHand.java new file mode 100644 index 0000000..2132ff4 --- /dev/null +++ b/mock/jrummikub/model/MockHand.java @@ -0,0 +1,54 @@ +package jrummikub.model; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import jrummikub.util.Pair; + +public class MockHand implements IHand { + + public List stones = new ArrayList(); + + public Iterable> iterable; + + @Override + public Stone pickUp(Position position) { + return null; + } + + @Override + public void drop(Stone object, Position position) { + stones.add(object); + } + + @Override + public Position getPosition(Stone object) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void pickUp(Stone object) { + // TODO Auto-generated method stub + + } + + @Override + public int getSize() { + return stones.size(); + } + + @Override + public Iterator> iterator() { + return iterable.iterator(); + } + + public MockHand clone() { + try { + return (MockHand) super.clone(); + } catch (CloneNotSupportedException e) { + return null; + } + } +} -- cgit v1.2.3