last draw the player on the board if (xy=gamestateobj['player'] notethe value "currentimagerefers to key in "playerimageswhich has the specific player image we want to show mapsurf blit(playerimages[currentimage]spacerect return mapsurf def islevelfinished(levelobjgamestateobj) """returns true if all the goals have stars in them "" for goal in levelobj['goals'] if goal not in gamestateobj['stars'] found space with goal but no star on it return false return true def terminate() pygame quit( sys exit( if __name__ ='__main__' main(the initial setup star pusher ( sokoban clone by al sweigart al@inventwithpython com creative commons by-nc-sa us import randomsyscopyospygame from pygame locals import fps frames per second to update the screen winwidth width of the program' windowin pixels winheight height in pixels half_winwidth int(winwidth half_winheight int(winheight the total width and height of each tile in pixels tilewidth email questions to the authoral@inventwithpython com