summaryrefslogtreecommitdiffstats
path: root/mock/jrummikub/view
diff options
context:
space:
mode:
Diffstat (limited to 'mock/jrummikub/view')
-rw-r--r--mock/jrummikub/view/MockHandPanel.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/mock/jrummikub/view/MockHandPanel.java b/mock/jrummikub/view/MockHandPanel.java
index 4fdd58e..42bc41e 100644
--- a/mock/jrummikub/view/MockHandPanel.java
+++ b/mock/jrummikub/view/MockHandPanel.java
@@ -1,5 +1,8 @@
package jrummikub.view;
+import java.util.ArrayList;
+import java.util.List;
+
import jrummikub.model.Position;
import jrummikub.model.Stone;
import jrummikub.util.Event2;
@@ -9,7 +12,7 @@ import jrummikub.util.Pair;
public class MockHandPanel implements IHandPanel {
public Event2<Stone, Boolean> stoneClickEvent = new Event2<Stone, Boolean>();
- public Iterable<Pair<Stone, Position>> stones;
+ public List<Pair<Stone, Position>> stones;
@Override
public IEvent2<Stone, Boolean> getStoneClickEvent() {
@@ -36,7 +39,11 @@ public class MockHandPanel implements IHandPanel {
@Override
public void setStones(Iterable<Pair<Stone, Position>> stones) {
- this.stones = stones;
+ this.stones = new ArrayList<Pair<Stone, Position>>();
+
+ for (Pair<Stone, Position> entry : stones) {
+ this.stones.add(entry);
+ }
}
}