mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
break out main loop step
This commit is contained in:
@@ -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<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user