diff --git a/chess_menu.py b/chess_menu.py index 8efb7b0..31a42dd 100644 --- a/chess_menu.py +++ b/chess_menu.py @@ -15,22 +15,22 @@ def mainMenu(): """Initial menu for choosing settings in the chess game.""" WINDOW_TITLE = "Chess Menu" - WINDOW_BG = "#5285B4" - TEXT_COLOR = "#F5F5F5" + WINDOW_BG = "#5285b4" + TEXT_COLOR = "#f5f5f5" SCREEN_SIZE = "500x300" TEXT_KWARGS = dict( bg = WINDOW_BG, fg = TEXT_COLOR, # padx = 0, ) - + root = tk.Tk() root.geometry(SCREEN_SIZE) root.title(WINDOW_TITLE) root.configure(bg=WINDOW_BG) tk.Label( root, text="Chess", font="Helvetica 20 bold", **TEXT_KWARGS).pack() - + # Menu line for choosing to play a human opponent or the computer. tk.Label( root, text="Play with:", font="Helvetica 14 bold", **TEXT_KWARGS).place( @@ -44,7 +44,7 @@ def mainMenu(): root, text="Computer", font="Helvetica 14", variable=opponentIsAI, value=True) # , **TEXT_KWARGS) rBtn_Computer.place(x=300, y=50) - + # Menu line for choosing player color. tk.Label( root, text= "Play as:", font="Helvetica 14 bold", **TEXT_KWARGS).place( @@ -59,7 +59,7 @@ def mainMenu(): rBtn_White.place(x=200, y=90) rBtn_Black.place(x=290, y=90) rBtn_Random.place(x=380, y=90) - + # Theme tk.Label( root, text="Theme:", font="Helvetica 14 bold", **TEXT_KWARGS).place( @@ -68,7 +68,7 @@ def mainMenu(): themeMenu = ttk.Combobox(root, values=theme_list, state="READONLY") themeMenu.set("Select a theme") themeMenu.place(x=200, y=136) - + # Start game button def getValues(): global humanWhite, humanBlack, theme @@ -84,9 +84,9 @@ def getValues(): elif color == 1: humanWhite, humanBlack = False, True theme = themeMenu.get() - + root.destroy() - + tk.Button( root, text="Play Chess!",