2 changed files with 38 additions and 1 deletions
@ -1,3 +1,21 @@ |
|||||
from traitement import traitement |
from traitement import traitement |
||||
def manque(joueur): |
def manque(joueur): |
||||
tb1 = traitement("stats.txt") |
tb1 = traitement("stats.txt") |
||||
|
lst_joueur = tb1[0] |
||||
|
lst_action = tb1[1] |
||||
|
perte_de_balle = 0 |
||||
|
tir_manque = 0 |
||||
|
lancer_rat = 0 |
||||
|
total_manque = 0 |
||||
|
for i in range(len(lst_joueur)): |
||||
|
if str(joueur) == str(lst_joueur[i]): |
||||
|
action = lst_action[i] |
||||
|
if action == "tir-manque": |
||||
|
tir_manque = tir_manque +1 |
||||
|
if action == "lancer-rat": |
||||
|
lancer_rat = lancer_rat + 1 |
||||
|
if action == "perteBalle": |
||||
|
perte_de_balle = perte_de_balle +1 |
||||
|
total_manque = tir_manque + lancer_rat + perte_de_balle |
||||
|
print(total_manque) |
||||
|
|
||||
|
@ -0,0 +1,19 @@ |
|||||
|
from traitement import traitement |
||||
|
def rebondPasses(joueur): |
||||
|
tb1 = traitement ("stats") |
||||
|
lst_joueur = tb1[0] |
||||
|
lst_action = tb1[1] |
||||
|
passe = 0 |
||||
|
rebondOff = 0 |
||||
|
rebondDef = 0 |
||||
|
for i in range(len(lst_joueur)): |
||||
|
if str(joueur) == str(lst_joueur[i]): |
||||
|
action = lst_action[i] |
||||
|
if action == "passe": |
||||
|
passe = passe +1 |
||||
|
if action == "rebondOff": |
||||
|
rebondOff = rebondOff + 1 |
||||
|
if action == "rebondDef": |
||||
|
rebondDef = rebondDef +1 |
||||
|
return("Passe:",passe,"RebondOff:",rebondOff,"rebondDef:",rebondDef) |
||||
|
|
Loading…
Reference in new issue