aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/coord
diff options
context:
space:
mode:
Diffstat (limited to 'src/solvers/coord')
-rw-r--r--src/solvers/coord/solve.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h
index c3fbd02..fa4134a 100644
--- a/src/solvers/coord/solve.h
+++ b/src/solvers/coord/solve.h
@@ -135,7 +135,12 @@ solve_coord_dfs(dfsarg_solve_coord_t arg[static 1])
135 ret = 0; 135 ret = 0;
136 if (coord_continue_onnormal(arg)) { 136 if (coord_continue_onnormal(arg)) {
137 l = arg->solution_moves->nmoves; 137 l = arg->solution_moves->nmoves;
138 mm = allowednextmove_mask(l, arg->solution_moves->moves); 138 if (l == 0) {
139 mm = MM_ALLMOVES;
140 } else {
141 m = arg->solution_moves->moves[l-1];
142 mm = allowedmask[movebase(m)];
143 }
139 arg->solution_moves->nmoves++; 144 arg->solution_moves->nmoves++;
140 arg->lastisnormal = true; 145 arg->lastisnormal = true;
141 146
@@ -160,7 +165,12 @@ solve_coord_dfs(dfsarg_solve_coord_t arg[static 1])
160 165
161 if (coord_continue_oninverse(arg)) { 166 if (coord_continue_oninverse(arg)) {
162 l = arg->solution_moves->npremoves; 167 l = arg->solution_moves->npremoves;
163 mm = allowednextmove_mask(l, arg->solution_moves->premoves); 168 if (l == 0) {
169 mm = MM_ALLMOVES;
170 } else {
171 m = arg->solution_moves->premoves[l-1];
172 mm = allowedmask[movebase(m)];
173 }
164 arg->solution_moves->npremoves++; 174 arg->solution_moves->npremoves++;
165 arg->lastisnormal = false; 175 arg->lastisnormal = false;
166 176

Generated with cgit - Back to sebastiano.tronto.net