Making the game close by clicking on the 'X' button