Used gameWon and gameLost flags to prevent gameOver called multiple times