1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-12-05 01:04:21 +00:00
royalnet/royalpack/types/brawlhallametal.py

24 lines
565 B
Python
Raw Normal View History

2019-11-11 08:56:08 +00:00
import enum
2020-03-19 15:26:11 +00:00
class BrawlhallaMetal(enum.Enum):
TIN = 0
2019-11-11 08:56:08 +00:00
BRONZE = 1
SILVER = 2
GOLD = 3
PLATINUM = 4
DIAMOND = 5
def __str__(self):
return self.name.capitalize()
def __repr__(self):
return f"{self.__class__.__qualname__}.{self.name}"
def __gt__(self, other):
2020-03-19 15:26:11 +00:00
if other is None:
return True
if not isinstance(other, self.__class__):
raise TypeError(f"Can't compare {self.__class__.__qualname__} with {other.__class__.__qualname__}")
2019-11-11 08:56:08 +00:00
return self.value > other.value