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.
|
|
|
def traitement(stats):
|
|
|
|
"""renvoie 4 listes du fichier texte stats,
|
|
|
|
lst_joueur,lst_action, lst_x, lst_y"""
|
|
|
|
lst_joueur = []
|
|
|
|
lst_action = []
|
|
|
|
lst_x = []
|
|
|
|
lst_y = []
|
|
|
|
with open ('stats.txt') as s:
|
|
|
|
for ligne in s:
|
|
|
|
ligne = ligne.strip()
|
|
|
|
lst_ele = ligne.split(' ')
|
|
|
|
joueur = str(lst_ele[0])
|
|
|
|
action = str(lst_ele[1])
|
|
|
|
x = int(lst_ele[2])
|
|
|
|
y = int(lst_ele[3])
|
|
|
|
lst_joueur.append(joueur)
|
|
|
|
lst_action.append(action)
|
|
|
|
lst_x.append(x)
|
|
|
|
lst_y.append(y)
|
|
|
|
return lst_joueur , lst_action , lst_x , lst_y
|
|
|
|
|