diff options
| author | enricotenuti <tenutz_27@outlook.it> | 2024-10-26 16:31:51 +0200 |
|---|---|---|
| committer | enricotenuti <tenutz_27@outlook.it> | 2024-10-26 16:31:51 +0200 |
| commit | aa9c690055c3a2593adbca2e1a5be0e5d421740a (patch) | |
| tree | e47b3cd222cd6585ff2870908e783e06810eb70a /src/solvers/h48/solve.h | |
| parent | 0422e6244e9e1a97397be147abb317f96d0154c3 (diff) | |
| download | nissy-core-aa9c690055c3a2593adbca2e1a5be0e5d421740a.tar.gz nissy-core-aa9c690055c3a2593adbca2e1a5be0e5d421740a.zip | |
fix solved before depth
Diffstat (limited to 'src/solvers/h48/solve.h')
| -rw-r--r-- | src/solvers/h48/solve.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h index 05b76ed..bdd09af 100644 --- a/src/solvers/h48/solve.h +++ b/src/solvers/h48/solve.h | |||
| @@ -168,16 +168,17 @@ solve_h48_dfs(dfsarg_solveh48_t *arg) | |||
| 168 | 168 | ||
| 169 | if (solve_h48_stop(arg)) | 169 | if (solve_h48_stop(arg)) |
| 170 | return 0; | 170 | return 0; |
| 171 | 171 | ||
| 172 | if (arg->nmoves + arg->npremoves == arg->depth){ | 172 | if (issolved(arg->cube)) { |
| 173 | if(issolved(arg->cube)) { | 173 | if (arg->nmoves + arg->npremoves != arg->depth) |
| 174 | solve_h48_appendsolution(arg); | ||
| 175 | return 1; | ||
| 176 | } else { | ||
| 177 | return 0; | 174 | return 0; |
| 178 | } | 175 | solve_h48_appendsolution(arg); |
| 176 | return 1; | ||
| 179 | } | 177 | } |
| 180 | 178 | ||
| 179 | if (arg->nmoves + arg->npremoves == arg->depth) | ||
| 180 | return 0; | ||
| 181 | |||
| 181 | nextarg = *arg; | 182 | nextarg = *arg; |
| 182 | ret = 0; | 183 | ret = 0; |
| 183 | uint32_t allowed; | 184 | uint32_t allowed; |
