refactor(GameRunner): remove pendingTurns and hasPendingTurns methods

- Removed the pendingTurns and hasPendingTurns methods from GameRunner
- Updated Worker.worker.ts to simplify the check for pending turns
This commit is contained in:
scamiv
2026-02-01 16:15:55 +01:00
parent 44a7839147
commit 0ed6c0b428
2 changed files with 1 additions and 9 deletions
-8
View File
@@ -181,10 +181,6 @@ export class GameRunner {
return true;
}
public pendingTurns(): number {
return Math.max(0, this.turns.length - this.currTurn);
}
public playerActions(
playerID: PlayerID,
x?: number,
@@ -268,8 +264,4 @@ export class GameRunner {
}
return player.bestTransportShipSpawn(targetTile);
}
public hasPendingTurns(): boolean {
return this.currTurn < this.turns.length;
}
}
+1 -1
View File
@@ -42,7 +42,7 @@ async function processPendingTurns() {
}
const gr = await gameRunner;
if (!gr || !gr.hasPendingTurns()) {
if (!gr) {
return;
}