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

Commit

Permalink
AJout d'un test pour estGagner qui échoue
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois389 committed Mar 5, 2024
1 parent 6cc7066 commit d165823
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion tests/engine/testGrille.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,28 @@ def test_est_gagnee_so_ne(self):

self.assertEqual(rond, grille.est_gagnee(2), "Les pion ronds doivent gagner")

grille = Grille()
rond = Rond()
croix = Croix()

grille.placer_pion(3, rond)

grille.placer_pion(0, croix)
grille.placer_pion(0, croix)
grille.placer_pion(0, croix)
grille.placer_pion(0, rond)

grille.placer_pion(1, croix)
grille.placer_pion(1, croix)
grille.placer_pion(1, rond)

grille.placer_pion(2, croix)
grille.placer_pion(2, rond)

self.assertEqual(rond, grille.est_gagnee(2), "Les pion ronds doivent gagner")



def test_est_gagnee(self):
grille = Grille()
rond = Rond()
Expand Down Expand Up @@ -209,7 +231,7 @@ def test_dernier_pion_colonne(self):
grille.placer_pion(1, Croix())

self.assertEqual(5, grille.dernier_pion_colonne(1))

def test_coups_possible(self):
grille = Grille()
self.assertEqual([0, 1, 2, 3, 4, 5, 6], grille.coups_possible())
Expand Down

0 comments on commit d165823

Please sign in to comment.