(tic-tac-toe): Clearing board on game end.
This commit is contained in:
parent
ca1865b850
commit
f83ae5ce71
1 changed files with 3 additions and 0 deletions
|
|
@ -169,6 +169,9 @@ async function handleTTT(): Promise<RouteHandlerReturn> {
|
|||
|
||||
socket.on('gameEnd', () => {
|
||||
curGame = null;
|
||||
for (let idx = 0 ; idx < 9 ; idx++) {
|
||||
cells[idx].innerText = " ";
|
||||
};
|
||||
currentPlayerTimer.innerText = "Waiting for match...";
|
||||
joinQueueBtn.innerText = QueueState.Idle;
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue