Fix finishGame function and implement game completion functionality
This commit is contained in:
10
index.html
10
index.html
@@ -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');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user