diff options
Diffstat (limited to 'mock/jrummikub/model')
-rw-r--r-- | mock/jrummikub/model/MockRoundState.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mock/jrummikub/model/MockRoundState.java b/mock/jrummikub/model/MockRoundState.java index ee483c6..1ebc575 100644 --- a/mock/jrummikub/model/MockRoundState.java +++ b/mock/jrummikub/model/MockRoundState.java @@ -104,4 +104,13 @@ public class MockRoundState implements IRoundState { } activePlayer = j; } + + @Override + public IPlayer getNthPlayer(int i) { + int j = i % players.size(); + if (j < 0) { + j += players.size(); + } + return players.get(j); + } } |