Skip to content
Snippets Groups Projects
Commit 965b5acc authored by Almohamed Alsadou Fatima's avatar Almohamed Alsadou Fatima
Browse files

class card

parent a3ae3029
Branches
No related tags found
No related merge requests found
......@@ -145,42 +145,41 @@ class Card(object):
return True if self equals card
False otherwise
"""
...
return self.value==car.value
def __neq__(self, card: Card) -> bool:
"""
return True if self don't equal card
False otherwise
"""
...
return not self.value==car.value
def __lt__(self, card: Card) -> bool:
"""
return True if self is strictly inferior to card
False otherwise
"""
...
return self.value<car.value
def __le__(self, card: Card) -> bool:
"""
return True if self is inferior or equal to card
False otherwise
"""
...
return self.value<=card.value
def __gt__(self, card: Card) -> bool:
"""
return True if self is strictly superior to card
False otherwise
"""
...
return self.value>card.value
def __ge__(self, card: Card) -> bool:
"""
return True if self is superior or equal to card
False otherwise
"""
...
return self.value>=card.value
if (__name__ == '__main__'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment