aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/coord/solve.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-08-05 09:04:00 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-08-05 09:04:00 +0200
commit3e7bb9b87ef9b47d8f643dbcae19a64ddbc81dbb (patch)
tree122faba06273ae0450a2994e22bad42202f11da7 /src/solvers/coord/solve.h
parentf6efc882a279cddb624fe2f2470797561a6997b8 (diff)
downloadnissy-core-3e7bb9b87ef9b47d8f643dbcae19a64ddbc81dbb.tar.gz
nissy-core-3e7bb9b87ef9b47d8f643dbcae19a64ddbc81dbb.zip
Added DRFIN solver
Diffstat (limited to 'src/solvers/coord/solve.h')
-rw-r--r--src/solvers/coord/solve.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/solvers/coord/solve.h b/src/solvers/coord/solve.h
index f9ee06e..72bc064 100644
--- a/src/solvers/coord/solve.h
+++ b/src/solvers/coord/solve.h
@@ -52,10 +52,6 @@ coord_continue_onnormal(const dfsarg_solve_coord_t arg[static 1])
52 /* If only inverse moves are allowed */ 52 /* If only inverse moves are allowed */
53 if (flag == NISSY_NISSFLAG_INVERSE) 53 if (flag == NISSY_NISSFLAG_INVERSE)
54 return false; 54 return false;
55
56 /* It's the first move */
57 if (nn + ni == 0)
58 return true;
59 55
60 /* Pruning table check */ 56 /* Pruning table check */
61 if (!(flag & NISSY_NISSFLAG_MIXED) || ni != 0) { 57 if (!(flag & NISSY_NISSFLAG_MIXED) || ni != 0) {
@@ -64,6 +60,10 @@ coord_continue_onnormal(const dfsarg_solve_coord_t arg[static 1])
64 if (nn + ni + pval > arg->target_depth) 60 if (nn + ni + pval > arg->target_depth)
65 return false; 61 return false;
66 } 62 }
63
64 /* It's the first move */
65 if (nn + ni == 0)
66 return true;
67 67
68 if (arg->lastisnormal) { 68 if (arg->lastisnormal) {
69 /* Can continue if we have already switched */ 69 /* Can continue if we have already switched */
@@ -106,10 +106,6 @@ coord_continue_oninverse(const dfsarg_solve_coord_t arg[static 1])
106 /* If only normal moves are allowed */ 106 /* If only normal moves are allowed */
107 if (flag == NISSY_NISSFLAG_NORMAL) 107 if (flag == NISSY_NISSFLAG_NORMAL)
108 return false; 108 return false;
109
110 /* It's the first move */
111 if (nn + ni == 0)
112 return true;
113 109
114 /* Pruning table check */ 110 /* Pruning table check */
115 if (!(flag & NISSY_NISSFLAG_MIXED) || nn != 0) { 111 if (!(flag & NISSY_NISSFLAG_MIXED) || nn != 0) {
@@ -118,6 +114,10 @@ coord_continue_oninverse(const dfsarg_solve_coord_t arg[static 1])
118 if (nn + ni + pval > arg->target_depth) 114 if (nn + ni + pval > arg->target_depth)
119 return false; 115 return false;
120 } 116 }
117
118 /* It's the first move */
119 if (nn + ni == 0)
120 return true;
121 121
122 if (!arg->lastisnormal) { 122 if (!arg->lastisnormal) {
123 /* Can continue if we have already switched */ 123 /* Can continue if we have already switched */
@@ -261,7 +261,7 @@ solve_coord_dispatch(
261 coord_t *coord; 261 coord_t *coord;
262 uint8_t trans; 262 uint8_t trans;
263 263
264 parse_coord_and_trans(coord_and_trans, &coord, &trans); 264 parse_coord_and_trans(coord_and_trans, &coord, NULL, &trans);
265 265
266 if (coord == NULL) { 266 if (coord == NULL) {
267 LOG("Error: could not parse coordinate from '%s'\n", 267 LOG("Error: could not parse coordinate from '%s'\n",

Generated with cgit - Back to sebastiano.tronto.net