* Makes the game playable by setting IsPlaying flag to true. *
()
| 80 | * |
| 81 | */ |
| 82 | function 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. |
nothing calls this directly
no test coverage detected