elif pygame rect( collidepoint(mousexmousey) difficulty medium elif pygame rect( collidepoint(mousexmousey) difficulty hard check for clicks on the size buttons elif pygame rect( collidepoint(mousexmousey) small board size setting boxsize smallboxsize boardwidth smallboardsize boardheight smallboardsize maxlife smallmaxlife elif pygame rect( , collidepoint(mousexmousey) medium board size setting boxsize mediumboxsize boardwidth mediumboardsize boardheight mediumboardsize maxlife mediummaxlife elif pygame rect( collidepoint(mousexmousey) large board size setting boxsize largeboxsize boardwidth largeboardsize boardheight largeboardsize maxlife largemaxlife elif pygame rect( collidepoint(mousexmousey) clicked on the "learn programmingad webbrowser open(' web browser elif pygame rect( collidepoint(mousexmousey) clicked on the "back to gamebutton return not (origdifficulty =difficulty and origboxsize =boxsize for in range(len(colorschemes)) clicked on color scheme button if pygame rect( mediumboxsize mediumboxsize collidepoint(mousexmousey) bgcolor colorschemes[ ][ palettecolors colorschemes[ ][ :