Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
Update ai.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandreiut authored Mar 20, 2024
1 parent a418ba0 commit 9d5f828
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions app/engine/ai/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,22 +258,7 @@ def get_pion_adverse(mon_pion: Jeton) -> Rond | Croix:
if mon_pion == "X":
symbole_adverse = Rond()
return symbole_adverse


def etat_suivant(grille: Grille, pion: Jeton) -> list[Grille]:
"""
Retourne l'état de la grille après avoir joué un coup
:param grille: la grille du jeu
:param pion: le pion à jouer
:return: la grille après avoir joué le coup
"""
resultat: list[Grille] = []
for coup in grille.coups_possible():
grille_copie = grille.__deepcopy__()
grille_copie.jouer_pion(coup, pion)
resultat.append(grille_copie)
return resultat



def evaluation_v3(grille: Grille) -> int:
"""
Expand Down

0 comments on commit 9d5f828

Please sign in to comment.