diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-09-17 19:54:37 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-09-17 19:54:37 +0200 |
| commit | 7c1cffb3f7c2be0d9ccc954a00b00db3bf4e2899 (patch) | |
| tree | 1fbd4817fddc120cc789a35b6b2178b7e944f773 /src/commands.c | |
| parent | a37185d488b90eb89f5e9a949819e905919c84a8 (diff) | |
| download | nissy-classic-7c1cffb3f7c2be0d9ccc954a00b00db3bf4e2899.tar.gz nissy-classic-7c1cffb3f7c2be0d9ccc954a00b00db3bf4e2899.zip | |
Solution output sorting
Diffstat (limited to 'src/commands.c')
| -rw-r--r-- | src/commands.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/commands.c b/src/commands.c index 7dd2e45..78d7583 100644 --- a/src/commands.c +++ b/src/commands.c | |||
| @@ -398,10 +398,12 @@ solve_exec(CommandArgs *args) | |||
| 398 | c = apply_alg(args->scramble, (Cube){0}); | 398 | c = apply_alg(args->scramble, (Cube){0}); |
| 399 | sols = solve(c, args->step, args->opts); | 399 | sols = solve(c, args->step, args->opts); |
| 400 | 400 | ||
| 401 | if (args->opts->count_only) | 401 | if (args->opts->count_only) { |
| 402 | printf("%d\n", sols->len); | 402 | printf("%d\n", sols->len); |
| 403 | else | 403 | } else { |
| 404 | sort_alglist(sols); | ||
| 404 | print_alglist(sols, args->opts->print_number); | 405 | print_alglist(sols, args->opts->print_number); |
| 406 | } | ||
| 405 | 407 | ||
| 406 | free_alglist(sols); | 408 | free_alglist(sols); |
| 407 | } | 409 | } |
