summaryrefslogtreecommitdiffstats
path: root/mock/jrummikub
diff options
context:
space:
mode:
Diffstat (limited to 'mock/jrummikub')
-rw-r--r--mock/jrummikub/model/MockRoundState.java14
-rw-r--r--mock/jrummikub/view/MockTablePanel.java3
2 files changed, 15 insertions, 2 deletions
diff --git a/mock/jrummikub/model/MockRoundState.java b/mock/jrummikub/model/MockRoundState.java
index 1ebc575..bf2f475 100644
--- a/mock/jrummikub/model/MockRoundState.java
+++ b/mock/jrummikub/model/MockRoundState.java
@@ -22,8 +22,10 @@ public class MockRoundState implements IRoundState {
public GameSettings gameSettings;
/** */
public IPlayer lastPlayer;
-
/** */
+ public int turnNumber;
+ /** */
+
public MockRoundState() {
table = new MockTable();
players = new ArrayList<MockPlayer>();
@@ -39,6 +41,7 @@ public class MockRoundState implements IRoundState {
gameHeap = new StoneHeap();
gameSettings = new GameSettings();
gameSettings.setInitialMeldThreshold(30);
+ turnNumber = -3;
}
@Override
@@ -113,4 +116,13 @@ public class MockRoundState implements IRoundState {
}
return players.get(j);
}
+
+ public int getTurnNumber() {
+ return turnNumber;
+ }
+
+ @Override
+ public void nextTurn() {
+ turnNumber++;
+ }
}
diff --git a/mock/jrummikub/view/MockTablePanel.java b/mock/jrummikub/view/MockTablePanel.java
index ca3db6e..212452c 100644
--- a/mock/jrummikub/view/MockTablePanel.java
+++ b/mock/jrummikub/view/MockTablePanel.java
@@ -7,6 +7,7 @@ import jrummikub.util.Event1;
import jrummikub.util.Event2;
import jrummikub.util.IEvent1;
import jrummikub.util.IEvent2;
+import jrummikub.util.MockEvent1;
import jrummikub.util.Pair;
/**
@@ -21,7 +22,7 @@ public class MockTablePanel implements ITablePanel {
/** */
public Event2<Stone, Boolean> rangeClickEvent = new Event2<Stone, Boolean>();
/** */
- public Event1<Position> clickEvent = new Event1<Position>();
+ public MockEvent1<Position> clickEvent = new MockEvent1<Position>();
/** */
public Event1<StoneSet> leftConnectorClickEvent = new Event1<StoneSet>();
/** */