()
| 1 | function resetGameStatus(){ |
| 2 | activePlayer=0; |
| 3 | currentRound=0; |
| 4 | gameOver.firstElementChild.innerHTML='You Won,<span id="winner">Player name</span>!'; |
| 5 | gameOver.style.display='none'; |
| 6 | |
| 7 | let gameBoardIndex=0; |
| 8 | for(let i=0;i<3;i++){ |
| 9 | for(let j=0;j<3;j++){ |
| 10 | gameData[i][j]=0; |
| 11 | const gameBoardItemElement=gameboard.children[gameBoardIndex]; |
| 12 | gameBoardItemElement.textContent=''; |
| 13 | gameBoardItemElement.classList.remove('disabled') |
| 14 | gameBoardIndex++; |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | |
| 20 |