From 3d1843c3f01f99bc798d09967e29ac8e66283c68 Mon Sep 17 00:00:00 2001 From: Bastien <> Date: Tue, 16 Dec 2025 14:13:33 +0100 Subject: [PATCH] TeSt --- bataille.py | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/bataille.py b/bataille.py index 3e27f2c..df650a1 100644 --- a/bataille.py +++ b/bataille.py @@ -1,5 +1,6 @@ from File import File_chaine as File import random +from time import sleep class Carte: "carte" @@ -64,7 +65,32 @@ def partie(jeu1, jeu2): elif resultat == -1 : while not gain.est_vide(): jeu2.enfiler(gain.defiler()) - - - - \ No newline at end of file + + + +""" +def partie_TeSt(j1, j2): + while not (j1.est_vide() or j2.est_vide()): + c1 = j1.defiler() + c2 = j2.defiler() + gain = File() + gain.enfiler(c1) + gain.enfiler(c2) + resultat = c1.compare(c2) + while resultat == 0 and j1.taille() >= 2 and j2.taille() >= 2: + gain.enfiler(j1.defiler()) + gain.enfiler(j2.defiler()) + c1 = j1.defiler() + c2 = j2.defiler() + gain.enfiler(c1) + gain.enfiler(c2) + resultat = c1.compare(c2) + if resultat == 1: + while not gain.est_vide(): + j1.enfiler(gain.defiler()) + elif resultat == -1: + while not gain.est_vide(): + j2.enfiler(gain.defiler()) + else: + +""" \ No newline at end of file