mini transformation dans les actions qui a tout casse

This commit is contained in:
hugogogo
2021-06-12 14:26:15 +02:00
parent ca0bf0cb61
commit 889c3f4a99
11 changed files with 86 additions and 48 deletions

19
srcs/swap.c Normal file
View File

@@ -0,0 +1,19 @@
#include "pushswap.h"
void sa(t_list *pack)
{
t_stack *stack_a;
// t_list **solution;
int tmp;
stack_a = pack->content;
// solution = pack->next->next->content;
if (!stack_a->next)
return ;
tmp = stack_a->n;
stack_a->n = stack_a->next->n;
stack_a->next->n = tmp;
// ft_lstadd_back(solution, ft_lstnew(ft_strdup("sa")));
}