This project was made as a tool to visualize push_swap project from école 42.

  The goal is to sort random numbers in ascending order into stack_a with the minimum possible number of operations.

  To do this you have the following operations at your disposal:

  sa : swap a - swap the first 2 elements at the top of stack_a.sb : swap b - swap the first 2 elements at the top of stack_b.ss : sa and sb at the same time. pa : push a - take the first element at the top of b and put it at the top of a. Do nothing if b is empty.pb : push b - take the first element at the top of a and put it at the top of b. Do nothing if a is empty. ra : rotate a - shift up all elements of stack_a by 1. The first element becomes the last one. rb : rotate b - shift up all elements of stack_b by 1. The first element becomes the last one. rr : ra and rb at the same time. rra : reverse rotate a - shift down all elements of stack_a by 1. The last element becomes the first one. rrb : reverse rotate b - shift down all elements of stack_b by 1. The last element becomes the first one. rrr : rra and rrb at the same time.

  made with love in a cold pandemic weekend by paula, 42SP student, and vinicius.

  Any issues please let us know ;)

Development log

Comments
Welcome to zddgame comments! Please keep conversations courteous and on-topic. To fosterproductive and respectful conversations, you may see comments from our Community Managers.
Sign up to post
Sort by
Show More Comments
Copyright 2023-2025 - www.zddgame.com All Rights Reserved