diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-06-30 12:44:47 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-06-30 12:44:47 +0200 |
| commit | 3c9efb490ccbe1b0d7768d77fcdcac012c00e8c6 (patch) | |
| tree | 15791a5a2862801e214ed389d72d35b48a0dc8bc /src/cube_public.h | |
| parent | 05bdcfef13ef2bdd05df6af13a74ec3cd7fcd22f (diff) | |
| download | nissy-core-3c9efb490ccbe1b0d7768d77fcdcac012c00e8c6.tar.gz nissy-core-3c9efb490ccbe1b0d7768d77fcdcac012c00e8c6.zip | |
Added a solver, but found out h48 table is broken
Diffstat (limited to 'src/cube_public.h')
| -rw-r--r-- | src/cube_public.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cube_public.h b/src/cube_public.h index ea1d28d..a1c4b90 100644 --- a/src/cube_public.h +++ b/src/cube_public.h | |||
| @@ -89,7 +89,7 @@ nissy_frommoves( | |||
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | int64_t | 91 | int64_t |
| 92 | nissy_convertcube( | 92 | nissy_convert( |
| 93 | const char *format_in, | 93 | const char *format_in, |
| 94 | const char *format_out, | 94 | const char *format_out, |
| 95 | const char *cube_string, | 95 | const char *cube_string, |
| @@ -155,6 +155,7 @@ nissy_solve( | |||
| 155 | { | 155 | { |
| 156 | cube_t c; | 156 | cube_t c; |
| 157 | int64_t ret; | 157 | int64_t ret; |
| 158 | int h; | ||
| 158 | 159 | ||
| 159 | c = readcube_B32(cube); | 160 | c = readcube_B32(cube); |
| 160 | 161 | ||
| @@ -188,8 +189,12 @@ nissy_solve( | |||
| 188 | return -1; | 189 | return -1; |
| 189 | } | 190 | } |
| 190 | 191 | ||
| 191 | if (!strcmp(solver, "h48")) { | 192 | /* TODO define and use solve_options_t */ |
| 192 | LOG("h48 solver not implemented yet\n"); | 193 | if (!strcmp(solver, "H48")) { |
| 194 | h = atoi(options); /* TODO: better parsing */ | ||
| 195 | ret = solve_h48( | ||
| 196 | c, minmoves, maxmoves, maxsolutions, | ||
| 197 | (uint8_t)h, data, solutions); | ||
| 193 | ret = -1; | 198 | ret = -1; |
| 194 | } else if (!strcmp(solver, "simple")) { | 199 | } else if (!strcmp(solver, "simple")) { |
| 195 | ret = solve_simple( | 200 | ret = solve_simple( |
