see if the player can move in that direction if iswall(mapobjplayerx xoffsetplayery yoffset) return false else if (playerx xoffsetplayery yoffsetin stars there is star in the waysee if the player can push it if not isblocked(mapobjgamestateobjplayerx (xoffset* )playery (yoffset* )) move the star ind stars index((playerx xoffsetplayery yoffset) stars[ind(stars[ind][ xoffsetstars[ind][ yoffset else return false move the player upwards gamestateobj['player'(playerx xoffsetplayery yoffset return true the makemove(function checks to make sure if moving the player in particular direction is valid move as long as there isn' wall blocking the pathor star that has wall or star behind itthe player will be able to move in that direction the gamestateobj variable will be updated to reflect thisand the true value will be returned to tell the function' caller that the player was moved if there was star in the space that the player wanted to movethat star' position is also changed and this information is updated in the gamestateobj variable as well this is how the --star pushing|is implemented if the player is blocked from moving in the desired directionthen the gamestateobj is not modified and the function returns false def startscreen() """display the start screen (which has the title and instructions until the player presses key returns none "" position the title image titlerect imagesdict['title'get_rect( topcoord topcoord tracks where to position the top of the text titlerect top topcoord titlerect centerx half_winwidth topcoord +titlerect height unfortunatelypygame' font text system only shows one line at