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.
15 lines
548 B
15 lines
548 B
def reussite(joueur, action):
|
|
with open('stats.txt', 'r') as stats:
|
|
stats = stats.readlines()
|
|
nb_action = 0
|
|
nb_reussite_action = 0
|
|
for ligne in stats:
|
|
ligne = ligne.strip().split(' ')
|
|
if ligne[0] == joueur and ligne[1].split('-')[0] == action:
|
|
nb_action += 1
|
|
if ligne[0] == joueur and ligne[1].split('-')[1] == "reussi":
|
|
nb_reussite_action += 1
|
|
return nb_action, nb_reussite_action
|
|
def total_points():
|
|
#c'est un test
|
|
return True
|