2024-04-16 11:47:52 +02:00
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
class ShipMode(Enum):
|
2024-04-29 19:05:10 +02:00
|
|
|
PUT = "PUT"
|
2024-05-06 18:47:26 +02:00
|
|
|
SHOOT = "SHOOT"
|
|
|
|
UNKNOWN = "UNKNOWN"
|
|
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def from_string(raw_value):
|
|
|
|
if raw_value:
|
|
|
|
value = raw_value.upper()
|
|
|
|
if value in ShipMode.__members__:
|
|
|
|
return ShipMode[value]
|
|
|
|
return ShipMode.UNKNOWN
|