Fixed: ErrorType Totem, Server Output Cleaned

This commit is contained in:
rubenpirreram
2026-06-19 19:47:21 +02:00
parent 63ffb02112
commit e660a530e9
11 changed files with 25 additions and 12 deletions
@@ -162,6 +162,7 @@ public class Game implements Serializable {
nextPlayerSetup();
}
else {
totemChoiceQueue.removeIf(x->x.getUserName().equals(player.getUserName()));
if (totemChoiceQueue.isEmpty()) {
player.setTotem(getAvailableTotems().get(new Random().nextInt(getAvailableTotems().size())));
} else {
@@ -207,6 +208,11 @@ public class Game implements Serializable {
disconnectedPlayers.remove(player);
}
}
else if(currentState.getGameStage() == GameStages.TOTEM_CHOICE)
{
totemChoiceQueue.removeIf(x->x.getUserName().equals(player.getUserName()));
totemChoiceQueue.add(player);
}
return true;
}