def drawNextPiece(piece): # draw the "next" text nextSurf = BASICFONT.render('Next:', True, TEXTCOLOR) nextRect = nextSurf.get_rect() nextRect.topleft = (WINDOWWIDTH - 120, 80) DISPLAYSURF.blit(nextSurf, nextRect) # draw the "next" piece drawPiece(piece, pixelx=WINDOWWIDTH-120, pixely=100) if __name__ == '__main__': main()
drawNextPiece() draws the "Next" piece in the upper right corner of the screen. It does this by calling the
drawPiece() function and passing in arguments for
That’s the last function. Line 11  and 12  are run after all the function definitions have been executed, and then the
main() function is called to begin the main part of the program.