|
|
|
@ -1,5 +1,6 @@ |
|
|
|
from File import File_chaine as File |
|
|
|
import random |
|
|
|
from time import sleep |
|
|
|
|
|
|
|
class Carte: |
|
|
|
"carte" |
|
|
|
@ -67,4 +68,29 @@ def partie(jeu1, jeu2): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
""" |
|
|
|
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: |
|
|
|
|
|
|
|
""" |