push et swap fonctionnent

This commit is contained in:
hugogogo
2021-06-15 14:27:55 +02:00
parent aeb5b57725
commit dc99227f94
12 changed files with 61 additions and 55 deletions

View File

@@ -63,12 +63,11 @@ t_list *launch_algo(t_stack *a)
b = NULL;
solution = NULL;
ft_lstadd_back(&solution, ft_lstnew(a));
ft_lstadd_back(&solution, ft_lstnew(b));
fill_solution(&solution, ft_strdup("start"));
hugo_sort(&a, &b, &solution);
ft_lstadd_back(&solution, ft_lstnew(&a));
ft_lstadd_back(&solution, ft_lstnew(&b));
fill_solution(solution, ft_strdup("start"));
hugo_sort(&a, &b, solution);
//bubble_sort(&a, &b, solution);
ps_stop(NULL, b, NULL, -1);
return (solution);
}
@@ -91,6 +90,5 @@ int main(int ac, char **av)
stack = init_stack(ac, av);
result = launch_algo(stack);
print_result(result, flag);
ps_stop(stack, NULL, result, 0);
return(0);
}