if that is the casewe want to play the --game won|animation by calling gamewonanimation()then pause slightly to let the player revel in their victoryand then reset the data structures in mainboard and revealedboxes to start new game line plays the --start game|animation again after thatthe program execution will just loop through the game loop as usualand the player can continue playing until they quit the program no matter if the two boxes were matching or notafter the second box was clicked line will set the firstselection variable back to none so that the next box the player clicks on will be interpreted as the first clicked box of pair of possibly matching icons drawing the game state to the screen redraw the screen and wait clock tick pygame display update(fpsclock tick(fpsat this pointthe game state has been updated depending on the player' inputand the latest game state has been drawn to the displaysurf display surface object we've reached the end of the game loopso we call pygame display update(to draw the displaysurf surface object to the computer screen line set the fps constant to the integer value meaning we want the game to run (at mostat frames per second if we want the program to run fasterwe can increase this number if we want the program to run slowerwe can decrease this number it can even be set to float value like which will run the program at half frame per secondthat isone frame per two seconds in order to run at frames per secondeach frame must be drawn in / th of second this means that pygame display update(and all the code in the game loop must execute in under milliseconds any modern computer can do this easily with plenty of time left over to prevent the program from running too fastwe call the tick(method of the pygame clock object in fpsclock to have to it pause the program for the rest of the milliseconds since this is done at the very end of the game loopit ensures that each iteration of the game loop takes (at least milliseconds if for some reason the pygame display update(call and the code in the game loop takes longer than millisecondsthen the tick(method will not wait at all and immediately return