changed return type of endTheGame()