Fin de la tâche 1

This commit is contained in:
Adrien Bourmault 2023-04-28 10:16:36 +02:00
parent 71dc09d42f
commit 2d21119841
No known key found for this signature in database
GPG Key ID: 6EB408FE0ACEC664
1 changed files with 15 additions and 3 deletions

View File

@ -208,8 +208,8 @@ def calcul_chemin(donjon, position, dragons, visite):
if couple[1] > niveau:
niveau = couple[1]
candidat = (couple[0], couple[1])
print("[{} calcul_chemin()] Meilleur candidat : {}".format(cid, candidat))
return candidat
print("[{} calcul_chemin()] Meilleur chemin : {}".format(cid, candidat))
return ([position] + candidat[0], candidat[1])
def intention(donjon, position, dragons):
"""
@ -253,7 +253,19 @@ def rencontre(aventurier, dragons):
aventurier["vivant"] = False
def appliquer_chemin(aventurier, dragons, chemin):
pass
"""
déplace l'aventurier
@return rien
"""
([(2, 1), (2, 0)], 16)
position = chemin[0][0]
chemin[0].remove(position)
aventurier["position"] = position
rencontre(aventurier, dragons)
def fin_partie(aventurier, dragons):
"""