outsidedecomapping {' 'imagesdict['rock'] ' 'imagesdict['short tree'] ' 'imagesdict['tall tree'] ' 'imagesdict['ugly tree'] playerimages is list of all possible characters the player can be currentimage is the index of the player' current player image currentimage playerimages [imagesdict['princess'] imagesdict['boy'] imagesdict['catgirl'] imagesdict['horngirl'] imagesdict['pinkgirl'] startscreen(show the title screen until the user presses key read in the levels from the text file see the readlevelsfile(for details on the format of this file and how to make your own levels levels readlevelsfile('starpusherlevels txt' currentlevelindex the main game loop this loop runs single levelwhen the user finishes that levelthe next/previous level is loaded while truemain game loop run the level to actually start playing the game result runlevel(levelscurrentlevelindex if result in ('solved''next') go to the next level currentlevelindex + if currentlevelindex >len(levels) if there are no more levelsgo back to the first one currentlevelindex elif result ='back' go to the previous level currentlevelindex - if currentlevelindex if there are no previous levelsgo to the last one currentlevelindex len(levels)- elif result ='reset' pass do nothing loop re-calls runlevel(to reset the level def runlevel(levelslevelnum) global currentimage levelobj levels[levelnum