Tennis
Par Ramy • 19 Septembre 2017 • 1 171 Mots (5 Pages) • 529 Vues
...
= 15
elif points[1] == 15:
points[1] = 30
elif points[1] == 30:
points[1] = 40
elif points[1] == 40:
if points[2] == 40:
points[1] = av
if points[2] != 40 and points[2]!=av:
Jeux(1)
elif points[2] == av:
points[1] = 40
points[2] = 40
Label(fenprinc,width=8,text=points[1],fg=’white’,bg=’dark green’).grid(row=1,column=6)
elif joueur == 2:
if points[2] == av and points[1] == 40:
Jeux(2)
elif points[2] ==0:
points[2] = 15
elif points[2] == 15:
points[2] = 30
elif points[2] == 30:
points[2] = 40
elif points[2] == 40:
if points[1] == 40:
points[2] = av
if points[1] != 40 and points[1]!=av:
Jeux(2)
elif points[1] == av:
points[2]= 40
points[1]= 40
Label(fenprinc,width=8,text=points[2],fg=’white’,bg=’dark green’).grid(row=2,column=6)
Label(fenprinc,width=8,text=points[2],fg=’white’,bg=’dark green’).grid(row=2,column=6)
if service%2==0:
Label(fenprinc,text="Joueur 1",fg=’black’,bg="green").grid(row=4,column=1)
else:
Label(fenprinc,text="Joueur 2",fg=’black’,bg="green").grid(row=4,column=1)
def inter():
Points(1)
def inter2():
Points(2)
cadre=Frame(fenprinc)
cadre.grid(column=0,row=0)
Jeux(0)
L0C0=Label(fenprinc,text="N°Joueur |",fg=’black’,bg=’dark green’).grid(row=0,column=0,sticky=W)
L0C1=Label(fenprinc,text="Nom Joueurs |",fg=’black’,bg=’dark green’).grid(row=0,column=1,sticky=W)
L0C2=Label(fenprinc,text="Sets |",fg=’black’,bg=’dark green’).grid(row=0,column=2,sticky=W)
L0C3=Label(fenprinc,text="Jeux 1 |",fg=’blue’,bg=’dark green’).grid(row=0,column=3,sticky=W)
L0C3=Label(fenprinc,text="Jeux 2 |",fg=’blue’,bg=’dark green’).grid(row=0,column=4,sticky=W)
L0C3=Label(fenprinc,text="Jeux 3 |",fg=’blue’,bg=’dark green’).grid(row=0,column=5,sticky=W)
L0C4=Label(fenprinc,text="Points |",fg=’black’,bg=’dark green’).grid(row=0,column=6,sticky=W)
Label(fenprinc,text=" Joueur 1 ",fg=’black’,bg=’green’).grid(row=1,column=0)
Label(fenprinc,text=" Joueur 2 ",fg=’black’,bg=’green’).grid(row=2,column=0)
Label(fenprinc,text="Service :",fg="black",bg="light green").grid(row=4,column=0)
Label(fenprinc,text="Joueur 1",fg=’black’,bg="green").grid(row=4,column=1)
boutton1=Button(fenprinc,text="Joueur 1",command=inter)
boutton1.grid(row=5,column=1)
boutton2=Button(fenprinc,text="Joueur 2",command=inter2)
boutton2.grid(row=5,column=2)
Button(fenprinc,text="Quitter",bg=’blue’,command=fenprinc.destroy).grid(row=5,column=3)
fenprinc.mainloop()
...