Select a random player for the first round
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@263 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
d9a0b0e37d
commit
92d1109954
5 changed files with 61 additions and 3 deletions
|
@ -91,4 +91,13 @@ public class MockRoundState implements IRoundState {
|
|||
public void setLastPlayer(IPlayer lastPlayer) {
|
||||
this.lastPlayer = lastPlayer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setActivePlayerNumber(int i) {
|
||||
int j = i % players.size();
|
||||
if (j < 0) {
|
||||
j += players.size();
|
||||
}
|
||||
activePlayer = j;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue