From fb45dadfd53c8da380df92fbb0704f9e73b0786f Mon Sep 17 00:00:00 2001 From: Frank Schwenk Date: Tue, 8 Apr 2025 15:25:37 +0200 Subject: [PATCH] Fix finishGame function and implement game completion functionality --- index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.html b/index.html index fd5efda..cb7540d 100644 --- a/index.html +++ b/index.html @@ -1508,6 +1508,16 @@ showScreen('game-detail-screen'); } + function finishGame() { + const game = games.find(g => g.id === currentGameId); + if (!game) return; + + game.status = 'completed'; + game.updatedAt = new Date().toISOString(); + saveGames(); + showGameDetail(currentGameId); + } + // Initialize with game list screen showScreen('game-list-screen');