Collection<NetPlayerState> seatStates = msg.getHandStartMessage().getSeatStatesList();
// Check whether the correct default seat states are sent.
assertEquals(10, seatStates.size());
for (Iterator<NetPlayerState> it = seatStates.iterator(); it.hasNext(); ) {
NetPlayerState state = it.next();
assertEquals(NetPlayerState.netPlayerStateNormal, state);
}
// All other players leave (and are in autofold state then).
for (int i = 0; i < 9; i++) {
s[i].close();
}
// Wait for next seat state list.
do {
msg = receiveMessage();
failOnErrorMessage(msg);
assertTrue(!msg.hasEndOfGameMessage());
} while (!msg.hasHandStartMessage());
seatStates = msg.getHandStartMessage().getSeatStatesList();
// Check whether the correct seat states are sent.
assertEquals(10, seatStates.size());
int stateNormalCounter = 0;
int stateInactiveCounter = 0;
int seatPos = 0;
for (Iterator<NetPlayerState> it = seatStates.iterator(); it.hasNext(); ) {
NetPlayerState state = it.next();
assertTrue(NetPlayerState.netPlayerStateNoMoney != state);
if (NetPlayerState.netPlayerStateNormal == state) {
assertEquals(firstPlayerPos, seatPos);
stateNormalCounter++;
}