mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 00:41:57 +00:00
finish to link all the files
This commit is contained in:
28
test_one.c
28
test_one.c
@@ -11,6 +11,8 @@
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "push_swap.h"
|
||||
#include "parsing.h"
|
||||
#include "medium_headers.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -33,29 +35,3 @@ int test1(int argc, char **argv)
|
||||
free(piles);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int test2(char **argv)
|
||||
{
|
||||
int *tab;
|
||||
int len;
|
||||
t_tab *preset;
|
||||
t_stacks *piles;
|
||||
|
||||
len = ft_atoi(argv[2]);
|
||||
if (len < 1)
|
||||
{
|
||||
printf("WRONG LEN PLS BE SMART.\n");
|
||||
return (0);
|
||||
}
|
||||
tab = auto_shuffle(len);
|
||||
piles = init_big_stacks2(tab, len);
|
||||
preset = get_tabs(piles->a, range_bucket(piles->a));
|
||||
bucket_algo(piles, preset, range_bucket(piles->a));
|
||||
free(tab);
|
||||
if (piles->a)
|
||||
stack_clear_all(piles->a, piles->a);
|
||||
if (piles->b)
|
||||
stack_clear_all(piles->b, piles->b);
|
||||
free(piles);
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user