Added a pause function to the game