From 3a8e95173af0df7ef2929919a55d2afb2cc4918a Mon Sep 17 00:00:00 2001 From: Enora <> Date: Thu, 11 Dec 2025 11:11:52 +0100 Subject: [PATCH] hfeiu --- bataille.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/bataille.py b/bataille.py index f4f7891..5f1cd15 100644 --- a/bataille.py +++ b/bataille.py @@ -40,6 +40,25 @@ class Jeux: i += 1 return jeu1, jeu2 - +def partie(jeu1, jeu2): + while not jeu1.est_vide() and not jeu2.est_vide(): + c1 = jeu1.defiler() + c2 = jeu2.defiler() + resultat = c1.compare(c2) + while resulat == 0: - \ No newline at end of file + if resultat == 1: + jeu1.enfiler(c1) + jeu1.enfiler(c2) + elif resultat == -1 : + jeu2.enfiler(c1) + jeu2.enfiler(c2) + elif resultat == 0: + + c1_1 = jeu1.defiler() + c2_1 = jeu2.defiler() + c1_2 = jeu1.defiler() + c2_2 = jeu2.defiler() + resultat = c1_2.compare() + + \ No newline at end of file