handling mismatched pair of icons if icon shape !icon shape or icon color !icon color icons don' match re-cover up both selections pygame time wait( milliseconds sec coverboxesanimation(mainboard[(firstselection[ ]firstselection[ ])(boxxboxy)] revealedboxes[firstselection[ ]][firstselection [ ]false revealedboxes[boxx][boxyfalse the if statement on line checks if either the shapes or colors of the two icons don' match if this is the casethen we want to pause the game for milliseconds (which is the same as secondby calling pygame time wait( so that the player has chance to see that the two icons don' match then the --cover up|animation plays for both boxes we also want to update the game state to mark these boxes as not revealed (that iscovered uphandling if the player won elif haswon(revealedboxes)check if all pairs found gamewonanimation(mainboardpygame time wait( reset the board mainboard getrandomizedboard(revealedboxes generaterevealedboxesdata(falseshow the fully unrevealed board for second drawboard(mainboardrevealedboxespygame display update(pygame time wait( replay the start game animation startgameanimation(mainboardfirstselection none reset firstselection variable otherwiseif line ' condition was falsethen the two icons must be match the program doesn' really have to do anything else to the boxes at that pointit can just leave both boxes in the revealed state howeverthe program should check if this was the last pair of icons on the board to be matched this is done inside our haswon(functionwhich returns true if the board is in winning state (that isall of the boxes are revealedemail questions to the authoral@inventwithpython com