1 changed files with 19 additions and 1 deletions
@ -1,3 +1,21 @@ |
|||
from traitement import traitement |
|||
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) |
|||
|
|||
|
Loading…
Reference in new issue