From e6ff0ce6926fa921a13055c9c35d8e60b691e776 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Wed, 11 Sep 2024 17:01:49 +0200 Subject: Finished table refactor --- tools/020_solve_small/solve_small.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'tools/020_solve_small') diff --git a/tools/020_solve_small/solve_small.c b/tools/020_solve_small/solve_small.c index dee2b55..4d07728 100644 --- a/tools/020_solve_small/solve_small.c +++ b/tools/020_solve_small/solve_small.c @@ -20,20 +20,22 @@ void run(void) { printf("Solved the following scrambles:\n\n"); for (i = 0; scrambles[i] != NULL; i++) { - printf("%s\n", scrambles[i]); + printf("%d. %s\n", i+1, scrambles[i]); fprintf(stderr, "Solving scramble %s\n", scrambles[i]); if (nissy_frommoves(scrambles[i], cube) == -1) { - fprintf(stderr, "Invalid scramble, " - "continuing with next scramble\n"); + fprintf(stderr, "Invalid scramble\n"); + printf("Invalid\n"); continue; } n = nissy_solve( cube, "h48", options, "", 0, 20, 1, -1, buf, sol); - if (n == 0) - fprintf(stderr, "No solution found, " - "continuing with next scramble\n"); + if (n == 0) { + printf("No solution\n"); + fprintf(stderr, "No solution found\n"); + } else { + printf("Solutions:\n%s\n", sol); + } } - printf("\n"); } int main(void) { -- cgit v1.3