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 (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);
|
slotMap.put(currentState.getSlot(), null);
|
||||||
|
|
||||||
for (Map.Entry<Slot,Player> entry : slotMap.entrySet()) {
|
for (Map.Entry<Slot,Player> entry : slotMap.entrySet()) {
|
||||||
if (entry.getValue() != null) {
|
if (entry.getValue() != null) {
|
||||||
|
|
||||||
if(disconnetedPlayers.containsKey(entry.getValue())&&disconnetedPlayers.get(currentState.getCurrentPlayer()))
|
if(disconnetedPlayers.containsKey(entry.getValue())&&disconnetedPlayers.get(currentState.getCurrentPlayer()))
|
||||||
{
|
{
|
||||||
|
orderLogicCard.push(entry.getValue());
|
||||||
entry.setValue(null);
|
entry.setValue(null);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,10 +70,7 @@ public abstract class OrderLogicCard implements Serializable {
|
|||||||
playerList=new ArrayList<>();
|
playerList=new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
if(players.stream().anyMatch(x->x.getUserName().equals(player.getUserName())))
|
players.removeIf(x->player.getUserName().equals(x.getUserName()));
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
playerList.removeIf(x->player.getUserName().equals(x.player.getUserName()));
|
playerList.removeIf(x->player.getUserName().equals(x.player.getUserName()));
|
||||||
playerList.add(new OrderPlayer(player,false));
|
playerList.add(new OrderPlayer(player,false));
|
||||||
players.add(player);
|
players.add(player);
|
||||||
|
|||||||
Reference in New Issue
Block a user