def drawcolorschemeboxes(xyschemenum) draws the color scheme boxes that appear on the "settingsscreen for boxy in range( ) for boxx in range( ) pygame draw rect(displaysurfcolorschemes[schemenum][ boxy boxx ]( mediumboxsize boxxy mediumboxsize boxymediumboxsizemediumboxsize) if palettecolors =colorschemes[schemenum][ :] put the ink spot next to the selected color scheme displaysurf blit(spotimage( ) def flashborderanimation(colorboardanimationspeed= ) origsurf displaysurf copy( flashsurf pygame surface(displaysurf get_size() flashsurf flashsurf convert_alpha( for startendstep in (( )( - )) the first iteration on the outer loop will set the inner loop to have transparency go from to the second iteration will have it go from to this is the "flash for transparency in range(startendanimationspeed step) displaysurf blit(origsurf( ) rgb color flashsurf fill((rgbtransparency) displaysurf blit(flashsurf( ) drawboard(boarddraw board on top of the transparency layer pygame display update( fpsclock tick(fps displaysurf blit(origsurf( )redraw the original surface def floodanimation(boardpaletteclickedanimationspeed= ) origboard copy deepcopy(board floodfill(boardboard[ ][ ]paletteclicked for transparency in range( animationspeed) the "newboard slowly become opaque over the original board drawboard(origboard drawboard(boardtransparency pygame display update( fpsclock tick(fps def generaterandomboard(widthheightdifficulty=medium)email questions to the authoral@inventwithpython com