Там же где и создаётся c.create_text он удаляет, а надо сделать так, чтобы при нажатии на кнопку RestartButton он удалял WinBlue или WinRed(c.create_text)
def ButtonStartEnd():
global PLAYER_1_SCORE, PLAYER_2_SCORE
RestartButton.place(relx=.5, rely=.5)
ExitButton.place(relx=.5, rely=.6)
PLAYER_1_SCORE = -1
PLAYER_2_SCORE = -1
def restartButton():
global PLAYER_1_SCORE, PLAYER_2_SCORE, WinRed, WinBlue
PLAYER_1_SCORE = -1
PLAYER_2_SCORE = -1
RestartButton.place(relx=-.1, rely=-.1)
ExitButton.place(relx=-.1, rely=-.1)
c.delete(WinRed)
c.delete(WinBlue)
def winGame():
global PLAYER_1_SCORE, PLAYER_2_SCORE
if(PLAYER_1_SCORE == 7):
WinBlue = c.create_text(WIDTH-WIDTH/2, PAD_H*1,
text="Победил синий",
font="Tahoma 72",
fill="blue")
ButtonStartEnd()
elif(PLAYER_2_SCORE == 7):
WinRed = c.create_text(WIDTH-WIDTH/2, PAD_H*1,
text="Победил красный",
font="Tahoma 72",
fill="red")
ButtonStartEnd()
root = Tk()
c = Canvas(root, width=WIDTH, height=HEIGHT, background="#00AA00")
c.pack()
# Кнопка рестарт
RestartButton = Button(text="Заново", font='Tahoma', command=restartButton)
RestartButton.place(relx=-.1, rely=-.1, anchor="c", height=40, width=200, bordermode=OUTSIDE)