drawing everything on the screen displaysurf fill(bgcolor drawboard(board drawstatus(scorelevel drawnextpiece(nextpiece if fallingpiece !none drawpiece(fallingpiece pygame display update( fpsclock tick(fps def maketextobjs(textfontcolor) surf font render(texttruecolor return surfsurf get_rect( def terminate() pygame quit( sys exit( def checkforkeypress() go through event queue looking for keyup event grab keydown events to remove them from the event queue checkforquit( for event in pygame event get([keydownkeyup]) if event type =keydown continue return event key return none def showtextscreen(text) this function displays large text in the center of the screen until key is pressed draw the text drop shadow titlesurftitlerect maketextobjs(textbigfonttextshadowcolor titlerect center (int(windowwidth )int(windowheight ) displaysurf blit(titlesurftitlerect draw the text titlesurftitlerect maketextobjs(textbigfonttextcolor