Implemented pausing and resuming game