drawBoard(board, coveredBoxes) for boxGroup in boxGroups: revealBoxesAnimation(board, boxGroup) coverBoxesAnimation(board, boxGroup)
First, we draw the board. Since every value in
coveredBoxes is set to
False, this call to
drawBoard() will end up drawing only covered up white boxes. The
coverBoxesAnimation() functions will draw over the spaces of these white boxes.
for loop will go through each of the inner lists in the
boxGroups lists. We pass these to
revealBoxesAnimation(), which will perform the animation of the white boxes being pulled away to reveal the icon underneath. Then the call to
coverBoxesAnimation() will animate the white boxes expanding to cover up the icons. Then the
for loop goes to the next iteration to animate the next set of 8 boxes.