playermoveto up elif event key =k_downplayermoveto down set the camera move mode elif event key =k_acameraleft true elif event key =k_dcameraright true elif event key =k_wcameraup true elif event key =k_scameradown true elif event key =k_nreturn 'nextelif event key =k_breturn 'backelif event key =k_escapeterminate(esc key quits elif event key =k_backspacereturn 'resetreset the level elif event key =k_pchange the player image to the next one currentimage + if currentimage >len(playerimages)after the last player imageuse the first one currentimage mapneedsredraw true elif event type =keyupunset the camera move mode if event key =k_acameraleft false elif event key =k_dcameraright false elif event key =k_wcameraup false elif event key =k_scameradown false this code handles what to do when the various keys are pressed if playermoveto !none and not leveliscompleteif the player pushed key to movemake the move