diff options
author | Joris | 2020-06-06 17:44:26 +0200 |
---|---|---|
committer | Joris | 2020-06-06 19:54:03 +0200 |
commit | 1595e0de940a86a7810df0e02e43838d97c0d846 (patch) | |
tree | 9701eeec0d98baa9f6044b1911df68e4c8539819 /src/model/difficulty.py | |
parent | 6b9195000eb5404c247288b384d7ca2bacc1ab23 (diff) |
Provide nix build
Diffstat (limited to 'src/model/difficulty.py')
-rw-r--r-- | src/model/difficulty.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/model/difficulty.py b/src/model/difficulty.py deleted file mode 100644 index 526cdb9..0000000 --- a/src/model/difficulty.py +++ /dev/null @@ -1,30 +0,0 @@ -from enum import IntEnum -from typing import Optional - -class Difficulty(IntEnum): - EASY = 0 - NORMAL = 1 - HARD = 2 - -values = [ - Difficulty.EASY, - Difficulty.NORMAL, - Difficulty.HARD] - -def format(difficulty: Difficulty) -> str: - 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 == "Easy": - return Difficulty.EASY - elif string == "Normal": - return Difficulty.NORMAL - elif string == "Hard": - return Difficulty.HARD - else: - return None |