method for pausing the game