Browse Source

hfeiu

master
Enora 5 days ago
parent
commit
3a8e95173a
  1. 23
      bataille.py

23
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:
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()
Loading…
Cancel
Save