from scoretab import * round=1 shots=0 turn=0 global scores scores=[] v="" while not v: v=input("Joueur 1 > ") scores.append([v,0,0,0,0,0,0,0,0,0,0]) def move(): global scores global turn global shots global round if turn>len(scores)-1: turn=0 round+=1 sleep(1) draw() if turn!=len(scores): if round>10: stop=1 def add(): global shots global turn global round global scores if shots: if round==11: v=input("3eme tir >") else: v=input("2eme tir > ") if v: if int(scores[turn][round])+int(v)<=10: if int(scores[turn][round])+int(v)==10: scores[turn][round]="/" if round==10: scores[turn].append(0) round+=1 shots=1 elif round==11: scores[turn][round]="X" if turn==len(scores)-1: round=12 else: round=10 else: scores[turn][round]=str(int(scores[turn][round])+int(v)) if round==10 or round==11: if turn==len(scores)-1: round=12 else: round=10 if round!=11: shots=0 turn+=1 else: e() v=input("1er tir > ") if v: if int(v)==10: scores[turn][round]="X" if round==10: scores[turn].append(0) round+=1 shots=1 else: turn+=1 elif int(v)<10 and int(v)>-1: scores[turn][round]=v shots=1 draw() def rem(): global scores if len(scores)!=1: v=input("Supprimer joueur... > ") if v: scores.pop(int(v)-1) turn-=1 def edit(): global scores e() v=input("Joueur "+str(len(scores)+1)+" > ") if v: scores.append([v,0,0,0,0,0,0,0,0,0,0]) draw() def draw(): global scores global turn global round width=68 height=18 fill_rect(0,0,320,222,(255,255,255)) j=-1 for j in range(len(scores)): player=scores[j] draw_string((player[0]+" "*8)[0:7],-1,100+(j-turn)*height,(255,255,255),(100,100,100)) if 1