newhead {' 'wormcoords[head][' ']' 'wormcoords[head][' ' elif direction =down newhead {' 'wormcoords[head][' ']' 'wormcoords[head][' ' elif direction =left newhead {' 'wormcoords[head][' ' ' 'wormcoords[head][' '] elif direction =right newhead {' 'wormcoords[head][' ' ' 'wormcoords[head][' '] wormcoords insert( newhead displaysurf fill(bgcolor drawgrid( drawworm(wormcoords drawapple(apple drawscore(len(wormcoords pygame display update( fpsclock tick(fps def drawpresskeymsg() presskeysurf basicfont render('press key to play 'truedarkgray presskeyrect presskeysurf get_rect( presskeyrect topleft (windowwidth windowheight displaysurf blit(presskeysurfpresskeyrect def checkforkeypress() if len(pygame event get(quit) terminate( keyupevents pygame event get(keyup if len(keyupevents= return none if keyupevents[ key =k_escape terminate( return keyupevents[ key def showstartscreen() titlefont pygame font font('freesansbold ttf' titlesurf titlefont render('wormy!'truewhitedarkgreen titlesurf titlefont render('wormy!'truegreen degrees email questions to the authoral@inventwithpython com