mirror of
https://github.com/DavidGailleton/42-Push_Swap.git
synced 2026-01-27 08:41:58 +00:00
FIX: parsing cleanup
This commit is contained in:
12
main.c
12
main.c
@@ -27,16 +27,8 @@ static int push_swap(char **tab, int len, int mod)
|
||||
if (!stacks)
|
||||
return (0);
|
||||
indexer(stacks);
|
||||
if (check_order(stacks->a))
|
||||
{
|
||||
flags(0, pos_bench(tab, mod), tab, stacks);
|
||||
if (stacks->bench == 1)
|
||||
print_bench(stacks);
|
||||
free_all(stacks);
|
||||
return (0);
|
||||
}
|
||||
stacks->disorder = compute_disorder(tab, wich_mod(mod));
|
||||
flags(pos_flag(tab, mod), pos_bench(tab, mod), tab, stacks);
|
||||
if (!check_order(stacks->a))
|
||||
flags(stacks);
|
||||
if (stacks->bench == 1)
|
||||
print_bench(stacks);
|
||||
free_all(stacks);
|
||||
|
||||
Reference in New Issue
Block a user