summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r--src/jrummikub/model/GameState.java5
-rw-r--r--src/jrummikub/model/IGameState.java2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/jrummikub/model/GameState.java b/src/jrummikub/model/GameState.java
index 3bd4d94..0539ea0 100644
--- a/src/jrummikub/model/GameState.java
+++ b/src/jrummikub/model/GameState.java
@@ -44,6 +44,11 @@ public class GameState implements IGameState {
}
@Override
+ public IPlayer getNthNextPlayer(int i) {
+ return players.get((activePlayer + i) % players.size());
+ }
+
+ @Override
public IPlayer getActivePlayer() {
return players.get(activePlayer);
}
diff --git a/src/jrummikub/model/IGameState.java b/src/jrummikub/model/IGameState.java
index 56ab917..46ea0b0 100644
--- a/src/jrummikub/model/IGameState.java
+++ b/src/jrummikub/model/IGameState.java
@@ -15,4 +15,6 @@ public interface IGameState {
public StoneHeap getGameHeap();
+ public IPlayer getNthNextPlayer(int i);
+
} \ No newline at end of file