Fix: Preventing segfault by moving cleanup code (originally in endGame) into endGame_cleanup called by timerEvent
If the window is closing while playing, user is asked if they wish to exit.