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

Commit

Permalink
test evaluation v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandreiut committed Feb 9, 2024
1 parent 52631b0 commit 0252c7c
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions tests/engine/ia/test_evaluation_v2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import unittest

from app.engine.grille import Grille
from app.engine.jeton import Croix, Rond
from app.engine.ai.ai import lecture_alignement,evaluation_v2,get_pion_adverse,evaluation_placement,get_score_pion

class TestEvaluationV2(unittest.TesCase):

def test_evaluation_v2(self):
pass

def test_evaluation_placement(self):
pass

def test_lecture_score_alignement(self):
grille = Grille()
rond = Rond()
croix = Croix()
#test Nord
score_attendu = 13
grille.placer_pion(4,rond)
grille.placer_pion(4,rond)
grille.placer_pion(4,rond)
score = lecture_alignement(grille,1,4,0,1,rond.get_caractere)
self.assertTrue(score_attendu == score,"test Nord ok")

grille2 = Grille()
score_attendu = 0
grille2.placer_pion(4,rond)
grille2.placer_pion(3,rond)
grille2.placer_pion(3,rond)
grille2.placer_pion(5,rond)
grille2.placer_pion(5,rond)
score = lecture_alignement(grille,1,4,0,1,rond.get_caractere)
self.assertTrue(score_attendu == score,"Test Nord ok")
#test Nord-Est
#test Est
#test Sud-Est
#test Sud
#test Sud-Ouest
#test Ouest
#test Nord-Ouest

def test_get_pion(self):
caractere1 = "X"
caractere2 = "O"
if caractere2 == get_pion_adverse(caractere1):
print("test get pion adverse ok")
if caractere1 == get_pion_adverse(caractere2):
print("test get pion adverse ok")

def test_lecture_alignement(self):
pass

0 comments on commit 0252c7c

Please sign in to comment.