(( )( )( )( )( )( )( )) for in range(len(colorschemes)) assert len(colorschemes[ ]= 'color scheme % does not have exactly colors ( bgcolor colorschemes[ ][ palettecolors colorschemes[ ][ : def main() global fpsclockdisplaysurflogoimagespotimagesettingsimagesettingsbuttonimageresetbuttonimage pygame init( fpsclock pygame time clock( displaysurf pygame display set_mode((windowwidthwindowheight) load images logoimage pygame image load('inkspilllogo png' spotimage pygame image load('inkspillspot png' settingsimage pygame image load('inkspillsettings png' settingsbuttonimage pygame image load('inkspillsettingsbutton png' resetbuttonimage pygame image load('inkspillresetbutton png' pygame display set_caption('ink spill' mousex mousey mainboard generaterandomboard(boardwidthboardheightdifficulty life maxlife lastpaletteclicked none while truemain game loop paletteclicked none resetgame false draw the screen displaysurf fill(bgcolor drawlogoandbuttons( drawboard(mainboard drawlifemeter(life drawpalettes( checkforquit( for event in pygame event get()event handling loop if event type =mousebuttonup mousexmousey event pos