|
@ -1,4 +1,5 @@ |
|
|
from bataille import * |
|
|
from bataille import * |
|
|
|
|
|
from pile import Pile_lst |
|
|
|
|
|
|
|
|
def bataille(): |
|
|
def bataille(): |
|
|
tour = 1 |
|
|
tour = 1 |
|
@ -7,8 +8,11 @@ def bataille(): |
|
|
nom = str(input("Entrez votre nom")) |
|
|
nom = str(input("Entrez votre nom")) |
|
|
j1 = Joueur(carte_j1, nom) |
|
|
j1 = Joueur(carte_j1, nom) |
|
|
j2 = Joueur(carte_j2, "Bot") |
|
|
j2 = Joueur(carte_j2, "Bot") |
|
|
|
|
|
p_j1 = Pile_lst() |
|
|
|
|
|
p_j2 = Pile_lst() |
|
|
while not j1.paquet_j.est_vide() and not j2.paquet_j.est_vide(): |
|
|
while not j1.paquet_j.est_vide() and not j2.paquet_j.est_vide(): |
|
|
valeur_carte_j1 = j1.tire_carte() |
|
|
valeur_carte_j1 = j1.tire_carte() |
|
|
valeur_carte_j2 = j2.tire_carte() |
|
|
valeur_carte_j2 = j2.tire_carte() |
|
|
carte_j1.compare(carte_j2) |
|
|
p_j1.empile(valeur_carte_j1) |
|
|
|
|
|
p_j2.empile(valeur_carte_j2) |
|
|
|
|
|
p_j1.sommet().compare(p_j2.sommet) |