added color changes to gui

master^2
Celine Stewart 2018-05-06 19:29:27 -04:00
parent 4d75aad55b
commit 8ba15743a3
1 changed files with 13 additions and 0 deletions

View File

@ -62,9 +62,22 @@ def retrieve_input():
def update_gui(numDrinks, timeLeft):
if numDrinks <= 0:
change_red()
elif numDrinks == 1:
change_yellow()
else:
change_green()
v.set(numDrinks)
v1.set(timeLeft)
def change_red():
root.configure(background="red")
def change_yellow():
root.configure(background="yellow")
def change_green():
root.configure(background="green")
def checkpoint(message):
"""Prints [Checkpoint] <message>
"""