Skip to content

Commit

Permalink
Fix time counter
Browse files Browse the repository at this point in the history
  • Loading branch information
zz-hh-aa committed Nov 13, 2023
1 parent 8527c28 commit 3c61ebc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ document.addEventListener('DOMContentLoaded', function () {
// close the modal when button clicked
document.getElementById('startGame').addEventListener('click', function () {
setInterval(placePlastic, 5000) // new plastic every 5 seconds
setInterval(countTime, 1000);
instrModal.style.display = 'none';
});

Expand Down Expand Up @@ -73,7 +74,6 @@ window.onload = function() {
placeFood();
document.addEventListener("keyup", changeDirection)
setInterval(update, 1000/10); // reloads 10 times a second
setInterval(countTime, 1000);
}

// update game board through play
Expand Down

0 comments on commit 3c61ebc

Please sign in to comment.