break out main loop step

This commit is contained in:
marthinwurer
2025-07-26 00:02:11 -06:00
committed by Chris H
parent d2d6b7bc53
commit cd3a26e434

View File

@@ -1030,10 +1030,14 @@ public class PhaseHandler implements java.io.Serializable {
} }
public void mainGameLoop() { public void mainGameLoop() {
StopWatch sw = new StopWatch();
// MAIN GAME LOOP // MAIN GAME LOOP
while (!game.isGameOver()) { while (!game.isGameOver() && !(game.getAge() == GameStage.RestartedByKarn)) {
mainLoopStep();
}
}
public void mainLoopStep() {
StopWatch sw = new StopWatch();
if (givePriorityToPlayer) { if (givePriorityToPlayer) {
if (DEBUG_PHASES) { if (DEBUG_PHASES) {
sw.start(); sw.start();
@@ -1161,7 +1165,6 @@ public class PhaseHandler implements java.io.Serializable {
p.setHasPriority(getPriorityPlayer() == p); p.setHasPriority(getPriorityPlayer() == p);
} }
} }
}
private boolean checkStateBasedEffects() { private boolean checkStateBasedEffects() {
final Set<Card> allAffectedCards = new HashSet<>(); final Set<Card> allAffectedCards = new HashSet<>();