of seconds between those two times (the extra comes from very small rounding errors that happen when you do math with floating point numbers they only happen sometimes and are usually too tiny to matter you can learn more about floating point rounding errors at going back to line if time time(timeout lastclicktime evaluates to truethen it has been longer than seconds since time time(was called and stored in lastclicktime if it evaluates to falsethen it has been less than seconds pushed the incorrect buttonor has timed out gameoveranimation(reset the variables for new gamepattern [currentstep waitingforinput false score pygame time wait( changebackgroundanimation(if either the player clicked on the wrong button or has timed outthe program should play the --game over|animation and then reset the variables for new game this involves setting the pattern list to blank listcurrentstep to waitingforinput to falseand then score to small pause and new background color will be set to indicate to the player the start of new gamewhich will begin on the next iteration of the game loop drawing the board to the screen pygame display update(fpsclock tick(fpsjust like the other game programsthe last thing done in the game loop is drawing the display surface object to the screen and calling the tick(method same old terminate(function def terminate() pygame quit( sys exit( def checkforquit() for event in pygame event get(quit)get all the quit events terminate(terminate if any quit events are present for event in pygame event get(keyup)get all the keyup events email questions to the authoral@inventwithpython com