aboutsummaryrefslogtreecommitdiff
path: root/src/commands.c
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-09-17 19:54:37 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2023-09-17 19:54:37 +0200
commit7c1cffb3f7c2be0d9ccc954a00b00db3bf4e2899 (patch)
tree1fbd4817fddc120cc789a35b6b2178b7e944f773 /src/commands.c
parenta37185d488b90eb89f5e9a949819e905919c84a8 (diff)
downloadnissy-classic-7c1cffb3f7c2be0d9ccc954a00b00db3bf4e2899.tar.gz
nissy-classic-7c1cffb3f7c2be0d9ccc954a00b00db3bf4e2899.zip
Solution output sorting
Diffstat (limited to '')
-rw-r--r--src/commands.c6
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}

Generated with cgit - Back to sebastiano.tronto.net