maze[(xy)character elif character =start pxpy xy maze[(xy)empty elif character =exit exitxexity xy maze[(xy)empty + height assert px !none and py !none'no start point in file assert exitx !none and exity !none'no exit point in file pdir north while truemain game loop displaywalldict(makewalldict(mazepxpypdirexitxexity) while trueget user move print('location ({}{}direction{}format(pxpypdir) print(( )' print('enter direction( (dor quit ' move input(''upper( if move ='quit' print('thanks for playing!' sys exit( if (move not in [' '' '' '' '' '' ' and not move startswith(' ')) print('please enter one of flor (or wad' continue move the player according to their intended move if move ='for move =' ' if pdir =north and maze[(pxpy )=empty py - break if pdir =south and maze[(pxpy )=empty py + break if pdir =east and maze[(px py)=empty px + break if pdir =west and maze[(px py)=empty px - break elif move ='lor move =' ' pdir {northwestwestsouth southeasteastnorth}[pdir break elif move ='ror move =' ' pdir {northeasteastsouth southwestwestnorth}[pdir break project #