From f83ae5ce71983edbb341c72eb6c5e04ce5310d7c Mon Sep 17 00:00:00 2001 From: apetitco Date: Tue, 13 Jan 2026 16:33:49 +0100 Subject: [PATCH] (tic-tac-toe): Clearing board on game end. --- frontend/src/pages/ttt/ttt.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/pages/ttt/ttt.ts b/frontend/src/pages/ttt/ttt.ts index ad634bb..c44b0f8 100644 --- a/frontend/src/pages/ttt/ttt.ts +++ b/frontend/src/pages/ttt/ttt.ts @@ -169,6 +169,9 @@ async function handleTTT(): Promise { socket.on('gameEnd', () => { curGame = null; + for (let idx = 0 ; idx < 9 ; idx++) { + cells[idx].innerText = " "; + }; currentPlayerTimer.innerText = "Waiting for match..."; joinQueueBtn.innerText = QueueState.Idle; })