Implementing pause and resuming the game