Skip to content

Commit

Permalink
[ENH] Update Summary mode model
Browse files Browse the repository at this point in the history
  • Loading branch information
dragarthPl committed May 12, 2024
1 parent cb0647a commit ff8b48a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main/summer_mode/summer_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,19 @@ class SummerMode:
def __init__(self, mode: int):
self.__mode = mode

@classmethod
def from_mode_string(cls, mode: str) -> 'SummerMode':
if mode == cls.SUMMER:
return SummerMode(1)
elif mode == cls.WINTER:
return SummerMode(0)
else:
raise Exception("Unknown summer mode")

def get_mode(self):
if self.__mode == 1:
return self.SUMMER
else:
elif self.__mode == 0:
return self.WINTER
else:
raise Exception("Unknown summer mode")

0 comments on commit ff8b48a

Please sign in to comment.