cellsize assert windowwidth cellsize = "window width must be multiple of cell size assert windowheight cellsize = "window height must be multiple of cell size cellwidth int(windowwidth cellsize cellheight int(windowheight cellsize white ( black red ( green darkgreen darkgray bgcolor black up 'up down 'down left 'left right 'right head syntactic sugarindex of the worm' head def main() global fpsclockdisplaysurfbasicfont pygame init( fpsclock pygame time clock( displaysurf pygame display set_mode((windowwidthwindowheight) basicfont pygame font font('freesansbold ttf' pygame display set_caption('wormy' showstartscreen( while true rungame( showgameoverscreen( def rungame() set random start point startx random randint( cellwidth starty random randint( cellheight wormcoords [{' 'startx' 'starty} {' 'startx ' 'starty} {' 'startx ' 'starty}email questions to the authoral@inventwithpython com