Totem FIx?

This commit is contained in:
rubenpirreram
2026-06-19 20:39:52 +02:00
parent f8e6921368
commit 7f582f116b
@@ -109,7 +109,7 @@ public class Game implements Serializable {
if(nextPlayer==null)
{
currentState.gameStageUpdate(GameStages.SLOT_CHOICE);
currentState.playerUpdate(orderLogicCard.pull(),null);
nextPlayerSetup();
return true;
}
}
@@ -163,10 +163,12 @@ public class Game implements Serializable {
}
else {
totemChoiceQueue.removeIf(x->x.getUserName().equals(player.getUserName()));
player.setTotem(getAvailableTotems().get(new Random().nextInt(getAvailableTotems().size())));
if (totemChoiceQueue.isEmpty()) {
player.setTotem(getAvailableTotems().get(new Random().nextInt(getAvailableTotems().size())));
} else {
totemChoiceQueue.add(player);
currentState.gameStageUpdate(GameStages.SLOT_CHOICE);
nextPlayerSetup();
return true;
}
currentState.playerUpdate(totemChoiceQueue.poll(), null);
}