windowwidth windowheight fps blank none black white ( brightblue darkturquoise green bgcolor darkturquoise tilecolor green textcolor white bordercolor brightblue basicfontsize buttoncolor white buttontextcolor black messagecolor white xmargin int((windowwidth (tilesize boardwidth (boardwidth )) ymargin int((windowheight (tilesize boardheight (boardheight )) up 'up down 'down left 'left right 'right def main() global fpsclockdisplaysurfbasicfontreset_surfreset_rectnew_surfnew_rectsolve_surfsolve_rect pygame init( fpsclock pygame time clock( displaysurf pygame display set_mode((windowwidthwindowheight) pygame display set_caption('slide puzzle' basicfont pygame font font('freesansbold ttf'basicfontsize store the option buttons and their rectangles in options reset_surfreset_rect maketext('reset'textcolortilecolorwindowwidth windowheight email questions to the authoral@inventwithpython com