'stars'starslevelobj {'width'maxwidth'height'len(mapobj)'mapobj'mapobj'goals'goals'startstate'gamestateobjlevels append(levelobjfinallythese objects are stored in the game state objectwhich itself is stored in the level object the level object is added to list of level objects on line it is this levels list that will be returned by the readlevelsfile(function when all of the maps have been processed reset the variables for reading the next map maptextlines [mapobj [gamestateobj {levelnum + return levels now that this level is done processingthe variables for maptextlinesmapobjand gamestateobj should be reset to blank values for the next level that will be read in from the level file the levelnum variable is also incremented by for the next level' level number recursive functions before you can learn how the floodfill(function worksyou need to learn about recursion recursion is simple concepta recursive function is just function that calls itselflike the one in the following program(don' type the letters at the beginning of each line thougha def passfortytwowhenyoucallthisfunction(param) print('start of function ' if param ! print('you did not pass when you called this function ' print('fine will do it myself ' passfortytwowhenyoucallthisfunction( this is the recursive call if param = print('thank you for passing when you called this function ' print('end of function ' passfortytwowhenyoucallthisfunction( (in your own programsdon' make functions have names as long as passfortytwowhenyoucallthisfunction( ' just being stupid and silly stupilly email questions to the authoral@inventwithpython com