}
return getPlayer(currentPlayer);
}
public final PlayerState getNextActivePlayerAfter(PlayerId startPlayerId) {
PlayerState currentPlayer;
PlayerId currentPlayerId = startPlayerId;
do{
currentPlayer = getNextSeatedPlayerAfter(currentPlayerId);
if(currentPlayer==null){
return null;
}
currentPlayerId = currentPlayer.getPlayerId();
if(currentPlayerId.equals(startPlayerId)){
return null;
}
}while(!currentPlayer.isActivelyPlaying());
return currentPlayer;
}