Added window focus change detection.
If the player loses focus of the game window, the game timer will be stopped, thus ensuring no calculations while the player isn't controlling the game. Upon returning focus to the window, the game resumes play as usual.