irregular6612 commited on
Commit
185cfaa
·
1 Parent(s): 807e057

feat(cp1): port Difficulty enum into proteus.grid

Browse files
proteus/grid/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ """proteus.grid — the motive_grid scenario family (ported)."""
proteus/grid/difficulty.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Difficulty level controlling Cut length and (future) layout complexity.
2
+
3
+ Ported from the parent project's ``shared.models.enums.Difficulty`` so the
4
+ ``proteus`` package carries no dependency on the legacy package.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from enum import Enum
10
+
11
+
12
+ class Difficulty(str, Enum):
13
+ """Scenario difficulty band."""
14
+
15
+ EASY = "easy"
16
+ MEDIUM = "medium"
17
+ HARD = "hard"
18
+ EXPERT = "expert"
tests/grid/test_difficulty.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from proteus.grid.difficulty import Difficulty
2
+
3
+
4
+ def test_difficulty_values():
5
+ assert Difficulty.EASY.value == "easy"
6
+ assert {d.value for d in Difficulty} == {"easy", "medium", "hard", "expert"}
7
+ assert Difficulty("hard") is Difficulty.HARD