summaryrefslogtreecommitdiffstats
path: root/mock
diff options
context:
space:
mode:
authorJannis Harder <harder@informatik.uni-luebeck.de>2011-05-25 15:51:34 +0200
committerJannis Harder <harder@informatik.uni-luebeck.de>2011-05-25 15:51:34 +0200
commit157bd4f60635dc27d2c9baebea5589455b05f17b (patch)
treeb85dda7fea57ca297c79f26c3764954683465eec /mock
parente3b5a0790dbb5c9ffeb5c23db81528faef3a1a05 (diff)
downloadJRummikub-157bd4f60635dc27d2c9baebea5589455b05f17b.tar
JRummikub-157bd4f60635dc27d2c9baebea5589455b05f17b.zip
Tested and implemented scoring
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@272 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'mock')
-rw-r--r--mock/jrummikub/model/MockRoundState.java9
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);
+ }
}