Feat: add __repr__ and to_dict
This commit is contained in:
		| @@ -25,3 +25,9 @@ class Tribe: | |||||||
|         if isinstance(other, Tribe): |         if isinstance(other, Tribe): | ||||||
|             return self.name == other.name |             return self.name == other.name | ||||||
|         return False |         return False | ||||||
|  |  | ||||||
|  |     def __repr__(self) -> str: | ||||||
|  |         return f"<Tribe {self.name=}>" | ||||||
|  |  | ||||||
|  |     def to_dict(self) -> dict: | ||||||
|  |         return {"name": self.name, "level": self.level} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user