for coverage in range( boxsize revealspeedrevealspeed)drawboxcovers(boardboxestocovercoverageremember that an animation is simply just displaying different images for brief moments of timeand together they make it seem like things are moving on the screen the revealboxesanimation(and coverboxesanimation(only need to draw an icon with varying amount of coverage by the white box we can write single function called drawboxcovers(which can do thisand then have our animation function call drawboxcovers(for each frame of animation as we saw in the last sectiondrawboxcovers(makes call to pygame display update(and fpsclock tick(fpsitself to do thiswe'll set up for loop to make decreasing (in the case of revealboxesanimation()or increasing (in the case of coverboxesanimation()numbers for the converage parameter the amount that the coverage variable will decrease/increase by is the number in the revealspeed constant on line we set this constant to meaning that on each call to drawboxcovers()the white box will decrease/increase by pixels on each iteration if we increase this numberthen more pixels will be drawn on each callmeaning that the white box will decrease/increase in size faster if we set it to then the white box will only appear to decrease or increase by pixel on each iterationmaking the entire reveal or cover animation take longer think of it like climbing stairs if on each step you takeyou climbed one stairthen it would take normal amount of time to climb the entire staircase but if you climbed two stairs at time on each step (and the steps took just as long as before)you could climb the entire staircase twice as fast if you could climb the staircase stairs at timethen you would climb the entire staircase times as fast drawing the entire board def drawboard(boardrevealed) draws all of the boxes in their covered or revealed state for boxx in range(boardwidth) for boxy in range(boardheight) lefttop lefttopcoordsofbox(boxxboxy if not revealed[boxx][boxy] draw covered box pygame draw rect(displaysurfboxcolor(lefttopboxsizeboxsize) else draw the (revealedicon shapecolor getshapeandcolor(boardboxxboxyemail questions to the authoral@inventwithpython com