MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / countDown

Function countDown

assets/js/AppleGameController.js:99–108  ·  view source on GitHub ↗

* Performs countDown and the displays the time left. * if the time has end it will end the game *

()

Source from the content-addressed store, hash-verified

97 *
98 */
99function countDown() {
100 time = time - 1;
101 timeBoard.innerText = time;
102 if (time == 0) {
103 //clear the interval by using the timer refrence
104 clearInterval(timer);
105 //call end game
106 endGame();
107 }
108}
109
110/**
111 * Ends the game by setting IsPlaying to false,

Callers

nothing calls this directly

Calls 1

endGameFunction · 0.70

Tested by

no test coverage detected