Skip to content

Commit

Permalink
[printer] Add printing of final shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometheus3375 committed Jul 19, 2024
1 parent 485f4b1 commit 85485e0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion solve/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def print_pass_moves(
Prints pass moves to the console.
If ``interactive`` is ``True``, prompts the user before continuing.
"""
print('--- FINAL SHAPES FROM LEFT TO RIGHT ---')
print(state.left.current_key, state.middle.current_key, state.right.current_key)

position2collect = defaultdict(deque)
for m in state.moves_made:
position2collect[m.departure].appendleft(m.shape)
Expand Down Expand Up @@ -49,8 +52,10 @@ def print_dissect_moves(state: StateOfAllStatues, /, interactive: bool) -> None:
Prints dissect moves to the console.
If ``interactive`` is ``True``, prompts the user before continuing.
"""
print_move = input if interactive else print
print('--- FINAL SHAPES FROM LEFT TO RIGHT ---')
print(state.left.shape_held, state.middle.shape_held, state.right.shape_held)

print_move = input if interactive else print
print('--- STEPS FOR DISSECTION ---')
for m in state.moves_made:
print_move(f'Dissect {m.shape} from {m.destination}')
Expand Down

0 comments on commit 85485e0

Please sign in to comment.