rra fonctionne
This commit is contained in:
@@ -1,6 +1,31 @@
|
||||
|
||||
#include "push_swap.h"
|
||||
|
||||
t_list *rra(t_stack **stack, t_list **lst);
|
||||
t_list *rrb(t_stack **stack, t_list **lst);
|
||||
t_list *rra(t_stack **stack, t_list **lst)
|
||||
{
|
||||
t_stack *tmp;
|
||||
t_stack *before;
|
||||
|
||||
tmp = *stack;
|
||||
if (!tmp || !(tmp->next))
|
||||
return (NULL);
|
||||
while (tmp->next)
|
||||
{
|
||||
before = tmp;
|
||||
tmp = tmp->next;
|
||||
}
|
||||
tmp->next = *stack;
|
||||
*stack = tmp;
|
||||
before->next = NULL;
|
||||
fill_solution(*lst, ft_strdup("rra"));
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
t_list *rrb(t_stack **stack, t_list **lst)
|
||||
{
|
||||
t_stack *tmp;
|
||||
|
||||
tmp = *stack;
|
||||
return (NULL);
|
||||
}
|
||||
t_list *rrr(t_stack **a, t_stack **b, t_list **lst);
|
||||
|
||||
Reference in New Issue
Block a user