Skip to content

Commit

Permalink
Minor edit
Browse files Browse the repository at this point in the history
- Changed hex values to lower case letters
  • Loading branch information
zachartrand committed Jul 21, 2021
1 parent 95a0a98 commit a13833d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions chess_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand All @@ -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
Expand All @@ -84,9 +84,9 @@ def getValues():
elif color == 1:
humanWhite, humanBlack = False, True
theme = themeMenu.get()

root.destroy()

tk.Button(
root,
text="Play Chess!",
Expand Down

0 comments on commit a13833d

Please sign in to comment.