diff options
Diffstat (limited to 'src/solvers/h48/solve.h')
| -rw-r--r-- | src/solvers/h48/solve.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/solvers/h48/solve.h b/src/solvers/h48/solve.h index c415370..9f0cb78 100644 --- a/src/solvers/h48/solve.h +++ b/src/solvers/h48/solve.h | |||
| @@ -78,6 +78,9 @@ solve_h48_appendsolution(dfsarg_solve_h48_t *arg) | |||
| 78 | 78 | ||
| 79 | invertmoves(arg->premoves, arg->npremoves, arg->moves + arg->nmoves); | 79 | invertmoves(arg->premoves, arg->npremoves, arg->moves + arg->nmoves); |
| 80 | 80 | ||
| 81 | /* Sort parallel moves for consistency */ | ||
| 82 | sortparallel(arg->moves, arg->nmoves + arg->npremoves); | ||
| 83 | |||
| 81 | /* Do not append the solution in case premoves cancel with normal */ | 84 | /* Do not append the solution in case premoves cancel with normal */ |
| 82 | if (arg->npremoves > 0 && !allowednextmove(arg->moves, arg->nmoves+1)) | 85 | if (arg->npremoves > 0 && !allowednextmove(arg->moves, arg->nmoves+1)) |
| 83 | return 0; | 86 | return 0; |
| @@ -106,10 +109,7 @@ solve_h48_appendallsym(dfsarg_solve_h48_t *arg) | |||
| 106 | all[j][i] = transform_move(arg->moves[i], t); | 109 | all[j][i] = transform_move(arg->moves[i], t); |
| 107 | 110 | ||
| 108 | /* Sort parallel moves for consistency */ | 111 | /* Sort parallel moves for consistency */ |
| 109 | for (i = 0; i < n - 1; i++) | 112 | sortparallel(all[j], n); |
| 110 | if (moveaxis(all[j][i]) == moveaxis(all[j][i+1]) && | ||
| 111 | movebase(all[j][i]) == movebase(all[j][i+1]) + 1) | ||
| 112 | SWAP(all[j][i], all[j][i+1]); | ||
| 113 | 113 | ||
| 114 | /* Check for duplicate solutions */ | 114 | /* Check for duplicate solutions */ |
| 115 | for (k = 0; k < j; k++) { | 115 | for (k = 0; k < j; k++) { |
