h48

A prototype for an optimal Rubik's cube solver, work in progress.
git clone https://git.tronto.net/h48
Download | Log | Files | Refs | README | LICENSE

commit 59b8f818c7d2e62933df41ede266b05687fd7ab1
parent 8a91354f7b94c669c77fe628a81f9bfe9f599ef0
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Mon, 14 Oct 2024 14:51:48 +0200

Fix shell

Diffstat:
Mshell/shell.c | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/shell/shell.c b/shell/shell.c @@ -50,10 +50,10 @@ typedef struct { char *str_trans; char *str_solver; char *str_nisstype; - unsigned int minmoves; - unsigned int maxmoves; - unsigned int optimal; - unsigned int maxsolutions; + unsigned minmoves; + unsigned maxmoves; + unsigned optimal; + unsigned maxsolutions; } args_t; static int64_t compose_exec(args_t *); @@ -70,7 +70,7 @@ static int64_t solve_scramble_exec(args_t *); static int64_t help_exec(args_t *); static int parse_args(int, char **, args_t *); -static bool parse_uint(char *, unsigned int *); +static bool parse_uint(char *, unsigned *); static bool set_cube(int, char **, args_t *); static bool set_cube_perm(int, char **, args_t *); @@ -482,7 +482,7 @@ solve_exec(args_t *args) static int64_t solve_scramble_exec(args_t *args) { - nissy_frommoves(args->str_moves, args->cube); + nissy_applymoves(NISSY_SOLVED_CUBE, args->str_moves, args->cube); return solve_exec(args); } @@ -584,7 +584,7 @@ parse_args(int argc, char **argv, args_t *args) } bool -parse_uint(char *argv, int8_t *result) +parse_uint(char *argv, unsigned *result) { *result = strtol(argv, NULL, 10);