if floodfill(boardoldcolornewcolorxy on box to up if boardheight floodfill(boardoldcolornewcolorxy on box to down def lefttoppixelcoordofbox(boxxboxy) returns the and of the left-topmost pixel of the xth yth box xmargin int((windowwidth (boardwidth boxsize) ymargin int((windowheight (boardheight boxsize) return (boxx boxsize xmarginboxy boxsize ymargin if __name__ ='__main__' main(email questions to the authoral@inventwithpython com