Game now supports __str__

This commit is contained in:
DevilXD
2021-12-20 21:30:47 +01:00
parent acdc7458f1
commit 8100a50fbe

View File

@@ -14,6 +14,9 @@ class Game:
self.id: int = int(data["id"])
self.name: str = data["name"]
def __str__(self) -> str:
return self.name
def __eq__(self, other: object):
if isinstance(other, self.__class__):
return self.id == other.id