|
|
@ -14,10 +14,20 @@ class Carte: |
|
|
|
def compare(self, other): |
|
|
|
"""comparaison entre deux cartes""" |
|
|
|
if self.valeur > other.valeur: |
|
|
|
return 1 |
|
|
|
if other.valeur == 1: |
|
|
|
#l'autre a un as donc other est supérieur |
|
|
|
return -1 |
|
|
|
else: |
|
|
|
return 1 |
|
|
|
|
|
|
|
elif self.valeur < other.valeur: |
|
|
|
return -1 |
|
|
|
return 0 |
|
|
|
if self.valeur == 1: |
|
|
|
#on a un as donc self est supérieur |
|
|
|
return 1 |
|
|
|
else: |
|
|
|
return -1 |
|
|
|
else: |
|
|
|
return 0 |
|
|
|
|
|
|
|
def affichage(self): |
|
|
|
"""affichage de la carte""" |
|
|
|