You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
from traitement import traitement
|
|
|
|
def manque(joueur):
|
|
|
|
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)
|
|
|
|
|