fcc-project-tutorials
fcc-project-tutorials copied to clipboard
Generation continue running also after clearing grid.
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.
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);
}
}