Prismatic Piper and same cards - fixed game error on disconnected player before game begin

This commit is contained in:
Oleg Agafonov 2023-10-21 17:37:32 +04:00
parent d6171e20a2
commit c148e2f5d7

View file

@ -80,11 +80,14 @@ public abstract class GameCommanderImpl extends GameImpl {
true, "Choose a color for " + commander.getName() true, "Choose a color for " + commander.getName()
); );
player.choose(Outcome.Neutral, choiceColor, this); player.choose(Outcome.Neutral, choiceColor, this);
color = choiceColor.getColor(); color = choiceColor.getColor(); // can be null on disconnect
} else { } else {
color = iterator.next(); color = iterator.next();
} }
commander.getColor().addColor(color);
if (color != null) {
commander.getColor().addColor(color);
}
} }
} }