drawicon(shapecolorboxxboxythe drawboard(function makes call to drawicon(for each of the boxes on the board the nested for loops on lines and will loop through every possible and coordinate for the boxesand will either draw the icon at that location or draw white square instead (to represent covered up boxdrawing the highlight def drawhighlightbox(boxxboxy) lefttop lefttopcoordsofbox(boxxboxy pygame draw rect(displaysurfhighlightcolor(left top boxsize boxsize ) to help the player recognize that they can click on covered box to reveal itwe will make blue outline appear around box to highlight it this outline is drawn with call to pygame draw rect(to make rectangle with width of pixels the "start gameanimation def startgameanimation(board) randomly reveal the boxes at time coveredboxes generaterevealedboxesdata(false boxes [ for in range(boardwidth) for in range(boardheight) boxes append(xy random shuffle(boxes boxgroups splitintogroupsof( boxesthe animation that plays at the beginning of the game gives the player quick hint as to where all the icons are located in order to make this animationwe have to reveal and cover up groups of boxes one group after another to do thisfirst we'll create list of every possible space on the board the nested for loops on lines and will add (xytuples to list in the boxes variable we will reveal and cover up the first boxes in this listthen the next then the next after thatand so on howeversince the order of the (xytuples in boxes would be the same each timethen the same order of boxes would be displayed (try commenting out line and then running to program few times to see this effect to change up the boxes each time game startswe will call the random shuffle(function to randomly shuffle the order of the tuples in the boxes list then when we reveal and cover up