def getboardcopyminusgems(boardgems) creates and returns copy of the passed board data structure with the gems in the "gemslist removed from it gems is list of dictswith keys xydirectionimagenum boardcopy copy deepcopy(board remove some of the gems from this board data structure copy for gem in gems if gem[' '!rowaboveboard boardcopy[gem[' ']][gem[' ']empty_space return boardcopy def drawscore(score) scoreimg basicfont render(str(score) scorecolor scorerect scoreimg get_rect( scorerect bottomleft ( windowheight displaysurf blit(scoreimgscorerect if __name__ ='__main__' main(summary hope these game programs have given you your own ideas about what games you' like to make and how you can write the code for them even if you don' have any ideas of your ownit' great practice to try to program clones of other games you've played here are several websites that can teach you more about programming pythongames that people have written that make use of the pygame library you can learn lot by downloading and reading other people' source code modules and functions pygame users that could help you with finding resources to learn programming email questions to the authoral@inventwithpython com