From aa9c690055c3a2593adbca2e1a5be0e5d421740a Mon Sep 17 00:00:00 2001 From: enricotenuti Date: Sat, 26 Oct 2024 16:31:51 +0200 Subject: fix solved before depth --- src/solvers/h48/solve_multithread.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/solvers/h48/solve_multithread.h') diff --git a/src/solvers/h48/solve_multithread.h b/src/solvers/h48/solve_multithread.h index e33ed49..d7e5e43 100644 --- a/src/solvers/h48/solve_multithread.h +++ b/src/solvers/h48/solve_multithread.h @@ -214,15 +214,16 @@ solve_h48_single(dfsarg_solveh48_t *arg, task_queue_t *tq) if (solve_h48_stop(arg)) return 0; - if (arg->nmoves + arg->npremoves == arg->depth){ - if(issolved(arg->cube)) { - solve_h48_appendsolution_thread(arg, tq); - return 1; - } else { + if (issolved(arg->cube)){ + if (arg->nmoves + arg->npremoves != arg->depth) return 0; - } + solve_h48_appendsolution_thread(arg, tq); + return 1; } + if(arg->nmoves + arg->npremoves == arg->depth) + return 0; + nextarg = *arg; ret = 0; uint32_t allowed; -- cgit v1.3