From 0ed6c0b4289e17925fcb3ed101867be5d3c44498 Mon Sep 17 00:00:00 2001 From: scamiv <6170744+scamiv@users.noreply.github.com> Date: Sun, 1 Feb 2026 16:15:55 +0100 Subject: [PATCH] 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 --- src/core/GameRunner.ts | 8 -------- src/core/worker/Worker.worker.ts | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/core/GameRunner.ts b/src/core/GameRunner.ts index 416b084c7..7e6a12eb1 100644 --- a/src/core/GameRunner.ts +++ b/src/core/GameRunner.ts @@ -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; - } } diff --git a/src/core/worker/Worker.worker.ts b/src/core/worker/Worker.worker.ts index d89ac03bb..41500b5e7 100644 --- a/src/core/worker/Worker.worker.ts +++ b/src/core/worker/Worker.worker.ts @@ -42,7 +42,7 @@ async function processPendingTurns() { } const gr = await gameRunner; - if (!gr || !gr.hasPendingTurns()) { + if (!gr) { return; }