FIX: parsing cleanup

This commit is contained in:
2026-01-17 16:36:59 +01:00
parent 52e1ef8947
commit e947183aab
6 changed files with 31 additions and 136 deletions

12
main.c
View File

@@ -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);