diff --git a/Tp08/card.py b/Tp08/card.py index 53d3dfa1631d8e3e6685aff31bfe186116305d75..94d1b1a1352ad9ce79d65ccb0f1c6992bddbff0f 100755 --- a/Tp08/card.py +++ b/Tp08/card.py @@ -98,7 +98,13 @@ class Card(object): $$$ c1.compare(c3) == 0 True """ - ... + if Card.VALUES.index(self.value) > Card.VALUES.index(card.value): + res = 1 + elif Card.VALUES.index(self.value) < Card.VALUES.index(card.value): + res = -1 + else: + res = 0 + return res @staticmethod def deck(n_card: int) -> list[Card]: