deque.py
deque.py copied to clipboard
Reuse the last direction if there's no direction specified in the command.
If the command dose not have any direction specified, then use the last used direction.
Rule110 would be:
0! 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0
40
outer: 1 sub dup 2 eq outer_end jmpif
trace
!1 shl 7 and or
0!
loop: !over 2 < end jmpif
1 shl 7 and or
dup 1 swap shl
110 swap and
over shr
move
loop jmp
end:
0!
!drop
move
outer jmp
outer_end:
which is way cleaner.