we can add endGame() function and move the stop game logic from the timer() function into it.
we can add endGame() function and move the stop game logic from the timer() function into it.