Updated: Order now apply effect to disconnected during resolving but then put it last
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user