Open himanshush200599 opened 6 years ago
Update this function...
Code..
function declareWinner(who) {
document.querySelector(".endgame").style.display = "block";
document.querySelector(".endgame .text").innerText = who;
for (var i = 0; i < cells.length; i++) {
cells[i].removeEventListener('click', turnClick, false);
}
}
If a clicked clear button, generation still increasing continuosly. i want, if clear button press then generation should set to 0 and stop till playButton press.