Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- # Erzeugung des Fensters
- tkFenster = Tk()
- tkFenster.title('TicTacToe')
- tkFenster.geometry('940x940')
- #Globale Variablen
- Auswahl = 1
- B1 = 1
- B2 = 1
- B3 = 1
- B4 = 1
- B5 = 1
- B6 = 1
- B7 = 1
- B8 = 1
- B9 = 1
- #Ereignisbehandlung
- def buttonBeendenClick():
- tkFenster.destroy()
- tkErgebnis.destroy()
- def buttonNochmalClick():
- global B1
- global B2
- global B3
- global B4
- global B5
- global B6
- global B7
- global B8
- global B9
- global Auswahl
- buttonClick1.config(state='normal')
- buttonClick2.config(state='normal')
- buttonClick3.config(state='normal')
- buttonClick4.config(state='normal')
- buttonClick5.config(state='normal')
- buttonClick6.config(state='normal')
- buttonClick7.config(state='normal')
- buttonClick8.config(state='normal')
- buttonClick9.config(state='normal')
- buttonClick1.config(text='')
- buttonClick2.config(text='')
- buttonClick3.config(text='')
- buttonClick4.config(text='')
- buttonClick5.config(text='')
- buttonClick6.config(text='')
- buttonClick7.config(text='')
- buttonClick8.config(text='')
- buttonClick9.config(text='')
- Auswahl = 1
- B1 = 1
- B2 = 1
- B3 = 1
- B4 = 1
- B5 = 1
- B6 = 1
- B7 = 1
- B8 = 1
- B9 = 1
- tkErgebnis.destroy()
- def buttonClick1() :
- global B1
- if B1 == 1:
- global Auswahl
- if Auswahl == 1 or Auswahl == 3 or Auswahl == 5 or Auswahl == 7 or Auswahl == 9:
- buttonClick1.config(text='T', font=('Arial', 300), fg= 'red')
- elif Auswahl == 2 or Auswahl == 4 or Auswahl == 6 or Auswahl == 8:
- buttonClick1.config(text='L', font=('Arial', 300), fg= 'blue')
- Auswahl = Auswahl + 1
- else:
- pass
- B1 = 0
- if buttonClick1.cget('text') == 'T' and buttonClick2.cget('text') == 'T' and buttonClick3.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick2.cget('text') == 'L' and buttonClick3.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick6.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick6.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'T' and buttonClick8.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'L' and buttonClick8.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick4.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick4.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick8.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick8.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick6.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick6.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') != '' and buttonClick2.cget('text') != '' and buttonClick3.cget('text') != '' and buttonClick4.cget('text') != '' and buttonClick5.cget('text') != '' and buttonClick6.cget('text') != '' and buttonClick7.cget('text') != '' and buttonClick8.cget('text') != '' and buttonClick9.cget('text') != '':
- tkErgebnis = Tk()
- tkErgebnis.title('Unentschieden')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Unentschieden', font=('Arial', 50), fg='black')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- if labelErgebnis.cget('text') == ('Spieler T gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Spieler L gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Unentschieden'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- def buttonClick2() :
- global B2
- if B2 == 1:
- global Auswahl
- if Auswahl == 1 or Auswahl == 3 or Auswahl == 5 or Auswahl == 7 or Auswahl == 9:
- buttonClick2.config(text='T', font=('Arial', 300), fg= 'red')
- elif Auswahl == 2 or Auswahl == 4 or Auswahl == 6 or Auswahl == 8:
- buttonClick2.config(text='L', font=('Arial', 300), fg= 'blue')
- Auswahl = Auswahl + 1
- else:
- pass
- B2 = 0
- if buttonClick1.cget('text') == 'T' and buttonClick2.cget('text') == 'T' and buttonClick3.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick2.cget('text') == 'L' and buttonClick3.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick6.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick6.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'T' and buttonClick8.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'L' and buttonClick8.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick4.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick4.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick8.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick8.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick6.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick6.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') != '' and buttonClick2.cget('text') != '' and buttonClick3.cget('text') != '' and buttonClick4.cget('text') != '' and buttonClick5.cget('text') != '' and buttonClick6.cget('text') != '' and buttonClick7.cget('text') != '' and buttonClick8.cget('text') != '' and buttonClick9.cget('text') != '':
- tkErgebnis = Tk()
- tkErgebnis.title('Unentschieden')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Unentschieden', font=('Arial', 50), fg='black')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- if labelErgebnis.cget('text') == ('Spieler T gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Spieler L gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Unentschieden'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- def buttonClick3() :
- global B3
- if B3 == 1:
- global Auswahl
- if Auswahl == 1 or Auswahl == 3 or Auswahl == 5 or Auswahl == 7 or Auswahl == 9:
- buttonClick3.config(text='T', font=('Arial', 300), fg= 'red')
- elif Auswahl == 2 or Auswahl == 4 or Auswahl == 6 or Auswahl == 8:
- buttonClick3.config(text='L', font=('Arial', 300), fg= 'blue')
- Auswahl = Auswahl + 1
- else:
- pass
- B3 = 0
- if buttonClick1.cget('text') == 'T' and buttonClick2.cget('text') == 'T' and buttonClick3.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick2.cget('text') == 'L' and buttonClick3.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick6.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick6.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'T' and buttonClick8.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'L' and buttonClick8.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick4.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick4.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick8.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick8.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick6.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick6.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') != '' and buttonClick2.cget('text') != '' and buttonClick3.cget('text') != '' and buttonClick4.cget('text') != '' and buttonClick5.cget('text') != '' and buttonClick6.cget('text') != '' and buttonClick7.cget('text') != '' and buttonClick8.cget('text') != '' and buttonClick9.cget('text') != '':
- tkErgebnis = Tk()
- tkErgebnis.title('Unentschieden')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Unentschieden', font=('Arial', 50), fg='black')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- if labelErgebnis.cget('text') == ('Spieler T gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Spieler L gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Unentschieden'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- def buttonClick4() :
- global B4
- if B4 == 1:
- global Auswahl
- if Auswahl == 1 or Auswahl == 3 or Auswahl == 5 or Auswahl == 7 or Auswahl == 9:
- buttonClick4.config(text='T', font=('Arial', 300), fg= 'red')
- elif Auswahl == 2 or Auswahl == 4 or Auswahl == 6 or Auswahl == 8:
- buttonClick4.config(text='L', font=('Arial', 300), fg= 'blue')
- Auswahl = Auswahl + 1
- else:
- pass
- B4 = 0
- if buttonClick1.cget('text') == 'T' and buttonClick2.cget('text') == 'T' and buttonClick3.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick2.cget('text') == 'L' and buttonClick3.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick6.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick6.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'T' and buttonClick8.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'L' and buttonClick8.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick4.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick4.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick8.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick8.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick6.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick6.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') != '' and buttonClick2.cget('text') != '' and buttonClick3.cget('text') != '' and buttonClick4.cget('text') != '' and buttonClick5.cget('text') != '' and buttonClick6.cget('text') != '' and buttonClick7.cget('text') != '' and buttonClick8.cget('text') != '' and buttonClick9.cget('text') != '':
- tkErgebnis = Tk()
- tkErgebnis.title('Unentschieden')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Unentschieden', font=('Arial', 50), fg='black')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- if labelErgebnis.cget('text') == ('Spieler T gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Spieler L gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Unentschieden'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- def buttonClick5() :
- global B5
- if B5 == 1:
- global Auswahl
- if Auswahl == 1 or Auswahl == 3 or Auswahl == 5 or Auswahl == 7 or Auswahl == 9:
- buttonClick5.config(text='T', font=('Arial', 300), fg= 'red')
- elif Auswahl == 2 or Auswahl == 4 or Auswahl == 6 or Auswahl == 8:
- buttonClick5.config(text='L', font=('Arial', 300), fg= 'blue')
- Auswahl = Auswahl + 1
- else:
- pass
- B5 = 0
- if buttonClick1.cget('text') == 'T' and buttonClick2.cget('text') == 'T' and buttonClick3.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick2.cget('text') == 'L' and buttonClick3.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick6.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick6.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'T' and buttonClick8.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'L' and buttonClick8.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick4.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick4.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick8.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick8.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick6.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick6.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') != '' and buttonClick2.cget('text') != '' and buttonClick3.cget('text') != '' and buttonClick4.cget('text') != '' and buttonClick5.cget('text') != '' and buttonClick6.cget('text') != '' and buttonClick7.cget('text') != '' and buttonClick8.cget('text') != '' and buttonClick9.cget('text') != '':
- tkErgebnis = Tk()
- tkErgebnis.title('Unentschieden')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Unentschieden', font=('Arial', 50), fg='black')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- if labelErgebnis.cget('text') == ('Spieler T gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Spieler L gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Unentschieden'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- def buttonClick6() :
- global B6
- if B6 == 1:
- global Auswahl
- if Auswahl == 1 or Auswahl == 3 or Auswahl == 5 or Auswahl == 7 or Auswahl == 9:
- buttonClick6.config(text='T', font=('Arial', 300), fg= 'red')
- elif Auswahl == 2 or Auswahl == 4 or Auswahl == 6 or Auswahl == 8:
- buttonClick6.config(text='L', font=('Arial', 300), fg= 'blue')
- Auswahl = Auswahl + 1
- else:
- pass
- B6 = 0
- if buttonClick1.cget('text') == 'T' and buttonClick2.cget('text') == 'T' and buttonClick3.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick2.cget('text') == 'L' and buttonClick3.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick6.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick6.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'T' and buttonClick8.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'L' and buttonClick8.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick4.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick4.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick8.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick8.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick6.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick6.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') != '' and buttonClick2.cget('text') != '' and buttonClick3.cget('text') != '' and buttonClick4.cget('text') != '' and buttonClick5.cget('text') != '' and buttonClick6.cget('text') != '' and buttonClick7.cget('text') != '' and buttonClick8.cget('text') != '' and buttonClick9.cget('text') != '':
- tkErgebnis = Tk()
- tkErgebnis.title('Unentschieden')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Unentschieden', font=('Arial', 50), fg='black')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- if labelErgebnis.cget('text') == ('Spieler T gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Spieler L gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Unentschieden'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- def buttonClick7() :
- global B7
- if B7 == 1:
- global Auswahl
- if Auswahl == 1 or Auswahl == 3 or Auswahl == 5 or Auswahl == 7 or Auswahl == 9:
- buttonClick7.config(text='T', font=('Arial', 300), fg= 'red')
- elif Auswahl == 2 or Auswahl == 4 or Auswahl == 6 or Auswahl == 8:
- buttonClick7.config(text='L', font=('Arial', 300), fg= 'blue')
- Auswahl = Auswahl + 1
- else:
- pass
- B7 = 0
- if buttonClick1.cget('text') == 'T' and buttonClick2.cget('text') == 'T' and buttonClick3.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick2.cget('text') == 'L' and buttonClick3.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick6.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick6.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'T' and buttonClick8.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'L' and buttonClick8.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick4.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick4.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick8.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick8.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick6.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick6.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') != '' and buttonClick2.cget('text') != '' and buttonClick3.cget('text') != '' and buttonClick4.cget('text') != '' and buttonClick5.cget('text') != '' and buttonClick6.cget('text') != '' and buttonClick7.cget('text') != '' and buttonClick8.cget('text') != '' and buttonClick9.cget('text') != '':
- tkErgebnis = Tk()
- tkErgebnis.title('Unentschieden')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Unentschieden', font=('Arial', 50), fg='black')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- if labelErgebnis.cget('text') == ('Spieler T gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Spieler L gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Unentschieden'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- def buttonClick8() :
- global B8
- if B8 == 1:
- global Auswahl
- if Auswahl == 1 or Auswahl == 3 or Auswahl == 5 or Auswahl == 7 or Auswahl == 9:
- buttonClick8.config(text='T', font=('Arial', 300), fg= 'red')
- elif Auswahl == 2 or Auswahl == 4 or Auswahl == 6 or Auswahl == 8:
- buttonClick8.config(text='L', font=('Arial', 300), fg= 'blue')
- Auswahl = Auswahl + 1
- else:
- pass
- B8 = 0
- if buttonClick1.cget('text') == 'T' and buttonClick2.cget('text') == 'T' and buttonClick3.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick2.cget('text') == 'L' and buttonClick3.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick6.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick6.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'T' and buttonClick8.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'L' and buttonClick8.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick4.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick4.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick8.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick8.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick6.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick6.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') != '' and buttonClick2.cget('text') != '' and buttonClick3.cget('text') != '' and buttonClick4.cget('text') != '' and buttonClick5.cget('text') != '' and buttonClick6.cget('text') != '' and buttonClick7.cget('text') != '' and buttonClick8.cget('text') != '' and buttonClick9.cget('text') != '':
- tkErgebnis = Tk()
- tkErgebnis.title('Unentschieden')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Unentschieden', font=('Arial', 50), fg='black')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- if labelErgebnis.cget('text') == ('Spieler T gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Spieler L gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Unentschieden'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- def buttonClick9() :
- global B9
- if B9 == 1:
- global Auswahl
- if Auswahl == 1 or Auswahl == 3 or Auswahl == 5 or Auswahl == 7 or Auswahl == 9:
- buttonClick9.config(text='T', font=('Arial', 300), fg= 'red')
- elif Auswahl == 2 or Auswahl == 4 or Auswahl == 6 or Auswahl == 8:
- buttonClick9.config(text='L', font=('Arial', 300), fg= 'blue')
- Auswahl = Auswahl + 1
- else:
- pass
- B9 = 0
- if buttonClick1.cget('text') == 'T' and buttonClick2.cget('text') == 'T' and buttonClick3.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick2.cget('text') == 'L' and buttonClick3.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick6.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick4.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick6.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'T' and buttonClick8.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick7.cget('text') == 'L' and buttonClick8.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick4.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick4.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick8.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick2.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick8.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick6.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick6.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick9.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick9.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'T' and buttonClick5.cget('text') == 'T' and buttonClick7.cget('text') == 'T':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler T gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler T gewinnt', font=('Arial', 50), fg='red')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick3.cget('text') == 'L' and buttonClick5.cget('text') == 'L' and buttonClick7.cget('text') == 'L':
- tkErgebnis = Tk()
- tkErgebnis.title('Spieler L gewinnt')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Spieler L gewinnt', font=('Arial', 50), fg='blue')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- elif buttonClick1.cget('text') != '' and buttonClick2.cget('text') != '' and buttonClick3.cget('text') != '' and buttonClick4.cget('text') != '' and buttonClick5.cget('text') != '' and buttonClick6.cget('text') != '' and buttonClick7.cget('text') != '' and buttonClick8.cget('text') != '' and buttonClick9.cget('text') != '':
- tkErgebnis = Tk()
- tkErgebnis.title('Unentschieden')
- tkErgebnis.geometry('600x400')
- labelErgebnis = Label(master=tkErgebnis, text='Unentschieden', font=('Arial', 50), fg='black')
- labelErgebnis.place(x=0, y=0, width='600', height='200')
- buttonNochmal = Button(master=tkErgebnis, text='NOCHMAL', font=('Arial', 20), fg='black', command=buttonNochmalClick)
- buttonNochmal.place(x=50, y=210, width='200', height='100')
- buttonBeenden = Button(master=tkErgebnis, text='BEENDEN', font=('Arial', 20), fg='black', command=buttonBeendenClick)
- buttonBeenden.place(x=300, y=210, width='200', height='100')
- if labelErgebnis.cget('text') == ('Spieler T gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Spieler L gewinnt'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- elif labelErgebnis.cget('text') == ('Unentschieden'):
- buttonClick1.config(state='disabled')
- buttonClick2.config(state='disabled')
- buttonClick3.config(state='disabled')
- buttonClick4.config(state='disabled')
- buttonClick5.config(state='disabled')
- buttonClick6.config(state='disabled')
- buttonClick7.config(state='disabled')
- buttonClick8.config(state='disabled')
- buttonClick9.config(state='disabled')
- # Leinwand
- canvas = Canvas(master=tkFenster, background="black")
- canvas.place(x=0, y=0, width=949, height=949)
- #Button
- buttonClick1 = Button(master=tkFenster, text='', bg='white', command=buttonClick1)
- buttonClick1.place(x=10, y=10, width=300, height=300)
- buttonClick2 = Button(master=tkFenster, text='', bg='white', command=buttonClick2)
- buttonClick2.place(x=320, y=10, width=300, height=300)
- buttonClick3 = Button(master=tkFenster, text='', bg='white', command=buttonClick3)
- buttonClick3.place(x=630, y=10, width=300, height=300)
- buttonClick4 = Button(master=tkFenster, text='', bg='white', command=buttonClick4)
- buttonClick4.place(x=10, y=320, width=300, height=300)
- buttonClick5 = Button(master=tkFenster, text='', bg='white', command=buttonClick5)
- buttonClick5.place(x=320, y=320, width=300, height=300)
- buttonClick6 = Button(master=tkFenster, text='', bg='white', command=buttonClick6)
- buttonClick6.place(x=630, y=320, width=300, height=300)
- buttonClick7 = Button(master=tkFenster, text='', bg='white', command=buttonClick7)
- buttonClick7.place(x=10, y=630, width=300, height=300)
- buttonClick8 = Button(master=tkFenster, text='', bg='white', command=buttonClick8)
- buttonClick8.place(x=320, y=630, width=300, height=300)
- buttonClick9 = Button(master=tkFenster, text='', bg='white', command=buttonClick9)
- buttonClick9.place(x=630, y=630, width=300, height=300)
- tkFenster.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement