implementing pause and resume game