def drawlogoandbuttons() draw the ink spill logo and settings and reset buttons displaysurf blit(logoimage(windowwidth logoimage get_width() ) displaysurf blit(settingsbuttonimage(windowwidth settingsbuttonimage get_width()windowheight settingsbuttonimage get_height()) displaysurf blit(resetbuttonimage(windowwidth resetbuttonimage get_width()windowheight settingsbuttonimage get_height(resetbuttonimage get_height()) def drawboard(boardtransparency= ) the colored squares are drawn to temporary surface which is then drawn to the displaysurf surface this is done so we can draw the squares with transparency on top of displaysurf as it currently is tempsurf pygame surface(displaysurf get_size() tempsurf tempsurf convert_alpha( tempsurf fill(( ) for in range(boardwidth) for in range(boardheight) lefttop lefttoppixelcoordofbox(xy rgb palettecolors[board[ ][ ] pygame draw rect(tempsurf(rgbtransparency)(lefttopboxsizeboxsize) lefttop lefttoppixelcoordofbox( pygame draw rect(tempsurfblack(left- top- boxsize boardwidth boxsize boardheight ) displaysurf blit(tempsurf( ) def drawpalettes() draws the six color palettes at the bottom of the screen numcolors len(palettecolors xmargin int((windowwidth ((palettesize numcolors(palettegapsize (numcolors ))) for in range(numcolors) left xmargin ( palettesize( palettegapsize top windowheight palettesize pygame draw rect(displaysurfpalettecolors[ ](lefttoppalettesizepalettesize) pygame draw rect(displaysurfbgcolor(left top palettesize palettesize ) email questions to the authoral@inventwithpython com