Updated: Order now apply effect to disconnected during resolving but then put it last

This commit is contained in:
rubenpirreram
2026-05-17 15:48:14 +02:00
parent 12979c719d
commit d9ef7983f8
2 changed files with 3 additions and 7 deletions
@@ -758,15 +758,14 @@ public class Game implements Serializable {
}
if (GameStages.RES_ACTIONS == currentState.getGameStage()) {
if(!disconnetedPlayers.containsKey(currentState.getCurrentPlayer())|| !disconnetedPlayers.get(currentState.getCurrentPlayer()))
orderLogicCard.push(currentState.getCurrentPlayer());
orderLogicCard.push(currentState.getCurrentPlayer());
slotMap.put(currentState.getSlot(), null);
for (Map.Entry<Slot,Player> entry : slotMap.entrySet()) {
if (entry.getValue() != null) {
if(disconnetedPlayers.containsKey(entry.getValue())&&disconnetedPlayers.get(currentState.getCurrentPlayer()))
{
orderLogicCard.push(entry.getValue());
entry.setValue(null);
continue;
}
@@ -70,10 +70,7 @@ public abstract class OrderLogicCard implements Serializable {
playerList=new ArrayList<>();
}
if(players.stream().anyMatch(x->x.getUserName().equals(player.getUserName())))
{
return;
}
players.removeIf(x->player.getUserName().equals(x.getUserName()));
playerList.removeIf(x->player.getUserName().equals(x.player.getUserName()));
playerList.add(new OrderPlayer(player,false));
players.add(player);