Punkte vergabe hinzugefügt
This commit is contained in:
parent
692439d1f6
commit
eda6f11400
@ -1,6 +1,8 @@
|
||||
from tkinter import *
|
||||
root = Tk()
|
||||
root.geometry("900x500")
|
||||
punkte = 0
|
||||
punkte1 = 0
|
||||
|
||||
f1 = StringVar(value="1")
|
||||
f2 = StringVar(value="2")
|
||||
@ -36,12 +38,18 @@ def result():
|
||||
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="Neue Runde", command=reset).grid(row=9, column=2)
|
||||
|
||||
global punkte
|
||||
punkte += 1
|
||||
Label(root, text="Punkte:" ).grid(row=10, column=0)
|
||||
Label(root, text=punkte).grid(row=11,column=0)
|
||||
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)
|
||||
|
||||
global punkte1
|
||||
punkte1 += 1
|
||||
Label(root, text="Punkte:" ).grid(row=10, column=7)
|
||||
Label(root, text=punkte).grid(row=11,column=7)
|
||||
|
||||
def ok():
|
||||
zug=zug_wert.get()
|
||||
|
Loading…
x
Reference in New Issue
Block a user