|
@ -58,20 +58,28 @@ class Jeux: |
|
|
j2 = distribute(2) |
|
|
j2 = distribute(2) |
|
|
while not j1.estvide() or j2.estvide() : |
|
|
while not j1.estvide() or j2.estvide() : |
|
|
|
|
|
|
|
|
j1tete = j1.tete() |
|
|
#j1tete = j1.tete() |
|
|
j2tete = j2.tete() |
|
|
#j2tete = j2.tete() |
|
|
|
|
|
|
|
|
if j1tete.valeur() > j2tete.valeur() : |
|
|
while not j1.compare(j2) == 0 : |
|
|
j1.enfiler(j1tete) |
|
|
|
|
|
j1.enfiler(j2tete) |
|
|
|
|
|
|
|
|
|
|
|
elif j1tete.valeur() < j2tete.valeur() : |
|
|
carte_envers = #id carte à l'envers dans la base de donnée |
|
|
j2.enfiler(j1tete) |
|
|
j1.emfiler(carte_envers)#add carte à l'envers à j1 |
|
|
j2.enfiler(j2tete) |
|
|
j2.emfiler(carte_envers)#add carte à l'envers à j2 |
|
|
|
|
|
j1.emfiler(j1.defiler()) |
|
|
|
|
|
j2.emfiler(j2.defiler()) |
|
|
|
|
|
|
|
|
|
|
|
if j1.compare(j2) == 1 : |
|
|
|
|
|
j1.enfiler(j1.defiler()) |
|
|
|
|
|
j1.enfiler(j2.defiler()) |
|
|
|
|
|
|
|
|
|
|
|
elif j1.compare(j2) == -1 : |
|
|
|
|
|
j2.enfiler(j1.defiler()) |
|
|
|
|
|
j2.enfiler(j2.defiler()) |
|
|
|
|
|
|
|
|
|
|
|
j1.defiler() |
|
|
|
|
|
j2.defiler() |
|
|
|
|
|
|
|
|
elif j1tete.valeur() == j2tete.valeur() : |
|
|
|
|
|
j1.depiler() |
|
|
|
|
|
j2.depiler() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if j1.estvide() == True : |
|
|
if j1.estvide() == True : |
|
|