}
public void playNext(Game game, UUID activePlayerId, SimulationNode node) {
boolean skip = false;
while (true) {
Phase currentPhase = game.getPhase();
if (!skip)
currentPhase.getStep().endStep(game, activePlayerId);
game.applyEffects();
switch (currentPhase.getStep().getType()) {
case UNTAP:
game.getPhase().setStep(new UpkeepStep());
break;
case UPKEEP:
game.getPhase().setStep(new DrawStep());
break;
case DRAW:
game.getTurn().setPhase(new PreCombatMainPhase());
game.getPhase().setStep(new PreCombatMainStep());
break;
case PRECOMBAT_MAIN:
game.getTurn().setPhase(new CombatPhase());
game.getPhase().setStep(new BeginCombatStep());
break;
case BEGIN_COMBAT:
game.getPhase().setStep(new DeclareAttackersStep());
break;
case DECLARE_ATTACKERS:
game.getPhase().setStep(new DeclareBlockersStep());
break;
case DECLARE_BLOCKERS:
game.getPhase().setStep(new CombatDamageStep(true));
break;
case COMBAT_DAMAGE:
if (((CombatDamageStep)currentPhase.getStep()).getFirst())
game.getPhase().setStep(new CombatDamageStep(false));
else
game.getPhase().setStep(new EndOfCombatStep());
break;
case END_COMBAT: