lefttop lefttopcoordsofbox(box[ ]box[ ] pygame draw rect(displaysurfbgcolor(lefttopboxsizeboxsize) shapecolor getshapeandcolor(boardbox[ ]box[ ] drawicon(shapecolorbox[ ]box[ ] if coverage only draw the cover if there is an coverage pygame draw rect(displaysurfboxcolor(lefttopcoverageboxsize) pygame display update( fpsclock tick(fpsthe drawboxcovers(function has three parametersthe board data structurea list of (xytuples for each box that should have the cover drawnand then the amount of coverage to draw for the boxes since we want to use the same drawing code for each box in the boxes parameterwe will use for loop on line so we execute the same code on each box in the boxes list inside this for loopthe code should do three thingsdraw the background color (to paint over anything that was there before)draw the iconthen draw however much of the white box over the icon that is needed the lefttopcoordsofbox(function will return the pixel coordinates of the top left corner of the box the if statement on line makes sure that if the number in coverage happens to be less than we won' call the pygame draw rect(function when the coverage parameter is there is no coverage at all when the coverage is set to there is pixel wide white box covering the icon the largest size we'll want the coverage set to is the number in boxsizewhere the entire icon is completely covered drawboxcovers(is going to be called from separate loop than the game loop because of thisit needs to have its own calls to pygame display update(and fpsclock tick(fpsto display the animation (this does mean that while inside this loopthere is no code being run to handle any events being generated that' finesince the cover and reveal animations only take second or so to play handling the revealing and covering animation def revealboxesanimation(boardboxestoreveal) do the "box revealanimation for coverage in range(boxsize(-revealspeed revealspeed) drawboxcovers(boardboxestorevealcoverage def coverboxesanimation(boardboxestocover) do the "box coveranimation