Funktioniert
This commit is contained in:
parent
0fe540c992
commit
692439d1f6
@ -33,11 +33,14 @@ def reset():
|
||||
f9.set(value="9")
|
||||
Label(root, text=" ").grid(row=8, column=2)
|
||||
def result():
|
||||
if f1.get() and f2.get() and f3.get() == "O":
|
||||
if f1.get()==f2.get()==f3.get() == "O" or f1.get()==f5.get()==f9.get() == "O" or f1.get()==f4.get()==f7.get() == "O" or f4.get()==f5.get()==f6.get() == "O" or f7.get()==f8.get()==f9.get() == "O" or f2.get()==f5.get()==f8.get()== "O" or f3.get()==f6.get()==f9.get() == "O":
|
||||
Label(root, text="Spieler 1 Gewinnt").grid(row=8, column=2)
|
||||
Button(root, text="Reset", command=reset).grid(row=9, column=2)
|
||||
|
||||
Button(root, text="Neue Runde", command=reset).grid(row=9, column=2)
|
||||
|
||||
def result1():
|
||||
if f1.get()==f2.get()==f3.get() == "X" or f1.get()==f5.get()==f9.get() == "X" or f1.get()==f4.get()==f7.get() == "X" or f4.get()==f5.get()==f6.get() == "X" or f7.get()==f8.get()==f9.get() == "X" or f2.get()==f5.get()==f8.get()== "X" or f3.get()==f6.get()==f9.get() == "X":
|
||||
Label(root, text="Spieler 2 Gewinnt").grid(row=8, column=2)
|
||||
Button(root, text="Neue Runde", command=reset).grid(row=9, column=2)
|
||||
|
||||
|
||||
def ok():
|
||||
@ -75,22 +78,31 @@ def ok1():
|
||||
zug1=zug1_wert.get()
|
||||
if zug1 == "1":
|
||||
f1.set("X")
|
||||
result1()
|
||||
elif zug1 == "2":
|
||||
f2.set("X")
|
||||
result1()
|
||||
elif zug1 == "3":
|
||||
f3.set("X")
|
||||
result1()
|
||||
elif zug1 == "4":
|
||||
f4.set("X")
|
||||
result1()
|
||||
elif zug1 == "5":
|
||||
f5.set("X")
|
||||
result1()
|
||||
elif zug1 == "6":
|
||||
f6.set("X")
|
||||
result1()
|
||||
elif zug1 == "7":
|
||||
f7.set("X")
|
||||
result1()
|
||||
elif zug1 == "8":
|
||||
f8.set("X")
|
||||
result1()
|
||||
elif zug1 == "9":
|
||||
f9.set("X")
|
||||
result1()
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user