Fix finishGame function and implement game completion functionality

This commit is contained in:
Frank Schwenk
2025-04-08 15:25:37 +02:00
parent b417f8f29a
commit fb45dadfd5

View File

@@ -1508,6 +1508,16 @@
showScreen('game-detail-screen'); 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 // Initialize with game list screen
showScreen('game-list-screen'); showScreen('game-list-screen');