Update ARE-DYNAMIC.py

This commit is contained in:
lucieho 2017-04-10 20:58:40 +02:00 committed by GitHub
parent cbc4ef6d15
commit d7c0be768a
1 changed files with 3 additions and 1 deletions

View File

@ -484,6 +484,8 @@ def strat_meilleur_gain (joueur, adversaire):
nveau_etat = joueur['etat']
for i in range (-1,2):
for j in range (-1,2): #(i,j) sont les coordonnées de l'adversaire
x = joueur['x']
y = joueur['y']
if (0 <= x+i and x+i < len(Grille)) and (0 <= y+j and y+j < len(Grille[0])) and i != 0 and j != 0:
if Grille[i][j]['annees_de_prison'] < max_gain :
max_gain = Grille[i][j]['annees_de_prison']