Skip to content

Commit cf36cab

Browse files
committed
Can configure cube effect
1 parent 834e014 commit cf36cab

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

term_timer/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
orientation = "DF"
2323
method = "cf4op"
2424
palette = ""
25+
effect = "face-visible"
2526
2627
[trainer]
2728
step = "oll"
@@ -88,6 +89,8 @@ def load_config() -> dict[str, Any]:
8889

8990
CUBE_PALETTE = CUBE_CONFIG.get('palette')
9091

92+
CUBE_EFFECT = CUBE_CONFIG.get('effect')
93+
9194
AUF_MOVE = OPPOSITE_FACES[CUBE_ORIENTATION[0]]
9295

9396
TRAINER_STEP = TRAINER_CONFIG.get('step')

term_timer/magic_cube.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from cubing_algs.display import VCubeDisplay
33
from magiccube.cube import Cube as BaseCube
44

5+
from term_timer.config import CUBE_EFFECT
56
from term_timer.config import CUBE_ORIENTATION_MOVES
67
from term_timer.config import CUBE_PALETTE
78

@@ -24,7 +25,7 @@ def display(self, orientation: Algorithm = None) -> str:
2425
if orientation:
2526
self.rotate(orientation)
2627

27-
display = VCubeDisplay(self, CUBE_PALETTE).display()
28+
display = VCubeDisplay(self, CUBE_PALETTE, CUBE_EFFECT).display()
2829

2930
if orientation:
3031
for _ in orientation:

term_timer/trainer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from term_timer.config import CUBE_EFFECT
12
from term_timer.config import CUBE_PALETTE
23
from term_timer.constants import DNF
34
from term_timer.constants import MS_TO_NS_FACTOR
@@ -38,7 +39,11 @@ def __init__(self, *,
3839
def start_line(self, cube, case, main_algorithm) -> None:
3940
if self.show_cube:
4041
print(
41-
cube.display(self.step, palette=CUBE_PALETTE),
42+
cube.display(
43+
mode=self.step,
44+
palette=CUBE_PALETTE,
45+
effect=CUBE_EFFECT,
46+
),
4247
end='',
4348
)
4449

0 commit comments

Comments
 (0)