Skip to content

Commit

Permalink
Merge pull request kunjgit#2180 from MisterMickey/issue-2179
Browse files Browse the repository at this point in the history
Fix Tic Tac Toe Game
  • Loading branch information
kunjgit authored Jul 5, 2023
2 parents 7b1a061 + d6c60cd commit 67945b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Games/Tic_Tac_Toe/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const checkWin = () => {
).style.transform = `translate(${e[3]}vw, ${e[4]}vw) rotate(${e[5]}deg)`;
document.querySelector(".line").style.width = "20vw";
isDraw = false;
document.querySelector(".imgbox").style.display = "block";
}
});

Expand Down Expand Up @@ -85,6 +86,9 @@ Array.from(boxes).forEach((element) => {

// Add onclick listener to reset button
reset.addEventListener("click", () => {

document.querySelector(".imgbox").style.display = "none";

let boxtexts = document.querySelectorAll(".boxtext");
Array.from(boxtexts).forEach((element) => {
element.innerText = "";
Expand Down

0 comments on commit 67945b6

Please sign in to comment.