Merge pull request #77 from uecasm/skip-kick-fix
Don't reset game when kicking idle players
This commit is contained in:
commit
2a46c26c49
|
@ -880,8 +880,9 @@ public class Game {
|
|||
}
|
||||
|
||||
synchronized (playedCards) {
|
||||
if (state == GameState.PLAYING || playersToRemove.size() == 0) {
|
||||
// not sure how much of this check is actually required
|
||||
if (players.size() < 3 || playedCards.size() < 2 || state != GameState.PLAYING) {
|
||||
if (players.size() < 3 || playedCards.size() < 2) {
|
||||
logger.info(String.format(
|
||||
"Resetting game %d due to insufficient players after removing %d idle players.",
|
||||
id, playersToRemove.size()));
|
||||
|
@ -890,6 +891,7 @@ public class Game {
|
|||
judgingState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// have to do this after we move to judging state
|
||||
for (final Player player : playersToUpdateStatus) {
|
||||
|
|
Loading…
Reference in New Issue