lisa
2 years ago
1 changed files with 14 additions and 0 deletions
@ -0,0 +1,14 @@ |
|||
class Carte: |
|||
def __init__(self,valeur, couleur): |
|||
self.valeur = valeur |
|||
self.couleur = couleur |
|||
|
|||
def compare(self, other): |
|||
self.other = other.valeur |
|||
if self.valeur > self.other : |
|||
return 1 |
|||
elif self.valeur < self.other : |
|||
return -1 |
|||
elif self.valeur == self.other : |
|||
return 0 |
|||
return None |
Loading…
Reference in new issue