From 305f19c7b02980dc9c338b960378597bf5cd84f9 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Thu, 7 Aug 2025 23:54:52 -0600 Subject: [PATCH] fix: reset game status to playing when changing variant after finished state --- server/src/rooms/GameRoom.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/rooms/GameRoom.ts b/server/src/rooms/GameRoom.ts index f707483..1e3472b 100644 --- a/server/src/rooms/GameRoom.ts +++ b/server/src/rooms/GameRoom.ts @@ -17,6 +17,10 @@ export class GameRoom extends Room { // Reset to round 1 and clear decisions when variant changes this.state.currentRound = 1; this.state.resetRound(); + // Reset game status if it was finished + if (this.state.gameStatus === GameStatus.FINISHED) { + this.state.gameStatus = GameStatus.PLAYING; + } // G2: Force offer by default if (variant === 'G2') { this.state.forcedByP2 = true;