summaryrefslogtreecommitdiffstats
path: root/mock/jrummikub/model/MockHand.java
diff options
context:
space:
mode:
Diffstat (limited to 'mock/jrummikub/model/MockHand.java')
-rw-r--r--mock/jrummikub/model/MockHand.java54
1 files changed, 54 insertions, 0 deletions
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<Stone> stones = new ArrayList<Stone>();
+
+ public Iterable<Pair<Stone, Position>> 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<Pair<Stone, Position>> iterator() {
+ return iterable.iterator();
+ }
+
+ public MockHand clone() {
+ try {
+ return (MockHand) super.clone();
+ } catch (CloneNotSupportedException e) {
+ return null;
+ }
+ }
+}