full version in pdf
There are two 'stacks' (not in the general meaning of this terms) - A is filled with unique numbers and B is empty.
Given a list of permitted instructions, A should be sorted in ascending order with the minimum number of instructions possible.
Full list of instructions to manipulate with 'stacks':
sa sb ss - swap the first 2 elements at the top of A / B / both at once
pa pb - take the first element at the top of B (or A) and push it to the top of A (or B)
ra rb rr rotate all elements of A / B / both at once , the first element becomes the last one
rra rrb rrr reverse rotate all elements of A / B / both at once, the last element becomes the first one
macos:
make & ARG=$(python3 gen.py N); ./push_swap $ARG | ./checker [-g|-v|-c] $ARG
in case of problems with the miniLibX graphic library, binary could be compiled without it:
make no-graph & ARG=$(python3 gen.py N); ./push_swap $ARG | ./checker [-v|-c] $ARG
linux: in progress
gen.py N returns array of N uniqie numbers in range [-N, N]
push_swap A returns sequence of instructions sorting the given array A
checker [-g|-v|-c] A reads instructions from the standart input (one at a time) and consequentially applies them to A.
-v print A and B to the standart output
-c last move is highlighted (use it with -v)
-g graphic mode with animation (doesn't work with make no-graph compilation)
control keys: left/right for speed control, space for pause, esc.
Developed in strict accordance with Norminette codestyle
Based on selfmade libft library

