Skip to content

Commit

Permalink
Update isFilled to check for draw after 8th turn
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraBergstrom committed Dec 1, 2023
1 parent d97fcd0 commit 03e6bb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function checkIfWin() {
}

let isFilled = () => {
return Array.from(boxes).every(box => box.textContent !== "");
return Array.from(boxes).filter(box => box.textContent !== "").length === 8;
};

// Below functions will increase winners score
Expand Down

0 comments on commit 03e6bb6

Please sign in to comment.