From a389640ea0a7994e8928a012bffbbb6ed05bb225 Mon Sep 17 00:00:00 2001 From: truetype Date: Tue, 16 Jun 2026 17:47:12 +0200 Subject: [PATCH] Fix: salva stato dopo inserimento nome e su toggleX, clear su nuova partita --- game.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/game.js b/game.js index 63499f3..257606c 100644 --- a/game.js +++ b/game.js @@ -452,6 +452,7 @@ if (cell.hasCat) return; // Can't X a cat cell cell.hasX = !cell.hasX; renderGrid(); + saveGameState(); } function flashError(row, col) { @@ -640,6 +641,7 @@ state.score = 0; state.hints = 3; state.sessionRecords = []; + clearGameState(); // Cancella stato salvato per nuova partita showNameInput(); }); @@ -675,6 +677,7 @@ } hideNameInput(); initGame(); + saveGameState(); // Salva subito dopo aver inserito il nome } });