Skip to content

Commit

Permalink
Bug Fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaw145 committed Mar 3, 2024
1 parent b4752c3 commit bb971a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions JS/SinglePlayerscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ boxes.forEach((box) =>{

box.innerText = "O";
box.disabled = true;

checkwinner();
if(count < 9 && !checkwinner()){
RandomBox();
}

//Checks the draw condition
checkwinner();
if(count === 9 && !checkwinner()){
drawSound.play();
draw.classList.remove("hide");
Expand All @@ -63,7 +62,7 @@ const RandomBox = () =>{
count++;
touch.play();
boxes[randomNumber].disabled = true;

checkwinner();
});
};

Expand Down

0 comments on commit bb971a9

Please sign in to comment.