aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/model')
-rw-r--r--src/model/difficulty.py36
-rw-r--r--src/model/priority.py12
2 files changed, 24 insertions, 24 deletions
diff --git a/src/model/difficulty.py b/src/model/difficulty.py
index 595f844..cbabd1e 100644
--- a/src/model/difficulty.py
+++ b/src/model/difficulty.py
@@ -2,29 +2,29 @@ from enum import IntEnum
from typing import Optional
class Difficulty(IntEnum):
- LOW = 0
- MEDIUM = 1
- HIGH = 2
+ EASY = 0
+ NORMAL = 1
+ HARD = 2
values = [
- Difficulty.LOW,
- Difficulty.MEDIUM,
- Difficulty.HIGH]
+ Difficulty.EASY,
+ Difficulty.NORMAL,
+ Difficulty.HARD]
def format(difficulty: Difficulty) -> str:
- if difficulty == Difficulty.LOW:
- return 'Low'
- elif difficulty == Difficulty.MEDIUM:
- return 'Medium'
- elif difficulty == Difficulty.HIGH:
- return 'High'
+ if difficulty == Difficulty.EASY:
+ return 'Easy'
+ elif difficulty == Difficulty.NORMAL:
+ return 'Normal'
+ elif difficulty == Difficulty.HARD:
+ return 'Hard'
def parse(string: str) -> Optional[Difficulty]:
- if string == 'Low':
- return Difficulty.LOW
- elif string == 'Medium':
- return Difficulty.MEDIUM
- elif string == 'High':
- return Difficulty.HIGH
+ if string == 'Easy':
+ return Difficulty.EASY
+ elif string == 'Normal':
+ return Difficulty.MIDDLE
+ elif string == 'Hard':
+ return Difficulty.HARD
else:
return None
diff --git a/src/model/priority.py b/src/model/priority.py
index 873369d..76cfd62 100644
--- a/src/model/priority.py
+++ b/src/model/priority.py
@@ -3,27 +3,27 @@ from typing import Optional
class Priority(IntEnum):
LOW = 0
- MEDIUM = 1
+ MIDDLE = 1
HIGH = 2
values = [
Priority.LOW,
- Priority.MEDIUM,
+ Priority.MIDDLE,
Priority.HIGH]
def format(priority: Priority) -> str:
if priority == Priority.LOW:
return 'Low'
- elif priority == Priority.MEDIUM:
- return 'Medium'
+ elif priority == Priority.MIDDLE:
+ return 'Middle'
elif priority == Priority.HIGH:
return 'High'
def parse(string: str) -> Optional[Priority]:
if string == 'Low':
return Priority.LOW
- elif string == 'Medium':
- return Priority.MEDIUM
+ elif string == 'Middle':
+ return Priority.MIDDLE
elif string == 'High':
return Priority.HIGH
else: