pygame draw circle(displaysurfcolor(left halftop half)half pygame draw circle(displaysurfbgcolor(left halftop half)quarter elif shape =square pygame draw rect(displaysurfcolor(left quartertop quarterboxsize halfboxsize half) elif shape =diamond pygame draw polygon(displaysurfcolor((left halftop)(left boxsize top half)(left halftop boxsize )(lefttop half)) elif shape =lines for in range( boxsize ) pygame draw line(displaysurfcolor(lefttop )(left itop) pygame draw line(displaysurfcolor(left itop boxsize )(left boxsize top ) elif shape =oval pygame draw ellipse(displaysurfcolor(lefttop quarterboxsizehalf)each of the donutsquarediamondlinesand oval functions require different drawing primitive function calls to make syntactic sugar with getting board space' icon' shape and color def getshapeandcolor(boardboxxboxy) shape value for xy spot is stored in board[ ][ ][ color value for xy spot is stored in board[ ][ ][ return board[boxx][boxy][ ]board[boxx][boxy][ the getshapeandcolor(function only has one line you might wonder why we would want function instead of just typing in that one line of code whenever we need it this is done for the same reason we use constant variablesit improves the readability of the code it' easy to figure out what code like shapecolor getshapeandcolor(does but if you looked code like shapecolor board[boxx][boxy][ ]board[boxx][boxy][ ]it would be bit more difficult to figure out drawing the box cover def drawboxcovers(boardboxescoverage) draws boxes being covered/revealed "boxesis list of two-item listswhich have the spot of the box for box in boxesemail questions to the authoral@inventwithpython com