moved game.isPaused from keypress into pause and continue functions