File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 22from random import choices
33from random import randint
44
5- from cubing_algs .algorythm import Algorithm
5+ from cubing_algs .algorithm import Algorithm
66from cubing_algs .constants import OUTER_BASIC_MOVES
77from cubing_algs .parsing import parse_moves
88from cubing_algs .transform .mirror import mirror_moves
Original file line number Diff line number Diff line change 22from datetime import timezone
33from functools import cached_property
44
5- from cubing_algs .algorythm import Algorithm
5+ from cubing_algs .algorithm import Algorithm
66from cubing_algs .parsing import parse_moves
77from cubing_algs .transform .degrip import degrip_full_moves
88from cubing_algs .transform .optimize import optimize_do_undo_moves
Original file line number Diff line number Diff line change @@ -317,6 +317,8 @@ def handle_scrambled(self):
317317 else :
318318 out = ''
319319 algo = parse_moves (self .scrambled ).transform (compress_moves )
320+ previous_algo = parse_moves (self .scrambled [:- 1 ]).transform (compress_moves )
321+
320322 for i , move in enumerate (algo .moves ):
321323 expected = self .scramble .moves [i ]
322324 style = 'move'
@@ -327,8 +329,8 @@ def handle_scrambled(self):
327329
328330 out += f'[{ style } ]{ move } [/{ style } ] '
329331
330- # TODO(me): improve to reduce glitches
331- self .clear_line (full = True )
332+ full_clear = len ( algo ) < len ( previous_algo ) or len ( algo ) <= 1
333+ self .clear_line (full = full_clear )
332334
333335 console .print (
334336 f'[scramble]Scramble #{ len (self .stack ) + 1 } :[/scramble]' ,
You can’t perform that action at this time.
0 commit comments