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

Function startGame

assets/js/AppleGameController.js:82–92  ·  view source on GitHub ↗

* Makes the game playable by setting IsPlaying flag to true. *

()

Source from the content-addressed store, hash-verified

80 *
81 */
82function startGame() {
83 //disable the button to make it unclickable
84 btnStart.disabled = "disabled";
85 IsPlaying = true;
86 renderScore();
87 //start countDown function and call it every second
88 //1000 is in millisecond = 1 second
89 //timer variable stores refrence to the current setInterval
90 //which will be used to clearInterval later.
91 timer = setInterval(countDown, 1000);
92}
93
94/**
95 * Performs countDown and the displays the time left.

Callers

nothing calls this directly

Calls 1

renderScoreFunction · 0.85

Tested by

no test coverage detected