1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
royalnet/rpgpack/types/faction.py

22 lines
393 B
Python
Raw Normal View History

2020-02-19 17:14:39 +00:00
from typing import *
import enum
class Faction(enum.Enum):
2020-02-19 17:14:39 +00:00
RED = "🔴"
ORANGE = "🟠"
YELLOW = "🟡"
GREEN = "🟢"
BLUE = "🔵"
PURPLE = "🟣"
BLACK = "⚫️"
WHITE = "⚪️"
BROWN = "🟤"
@classmethod
def get(cls, string: str):
try:
return cls[string.upper()]
except KeyError:
return cls(string)