chiark / gitweb /
changelog: document last change
[sgt-puzzles.git] / towers.c
index 7666af9e00cb499312092262838ab5ab49f6ee49..656b8ad338532be40e82a919812a9bd719ee7ee0 100644 (file)
--- a/towers.c
+++ b/towers.c
@@ -388,12 +388,12 @@ static int solver_easy(struct latin_solver *solver, void *vctx)
            return ret;
 
 #ifdef STANDALONE_SOLVER
-           if (solver_show_working)
-               sprintf(prefix, "%*slower bounds for clue %s %d:\n",
-                       solver_recurse_depth*4, "",
-                       cluepos[c/w], c%w+1);
-           else
-               prefix[0] = '\0';              /* placate optimiser */
+       if (solver_show_working)
+           sprintf(prefix, "%*slower bounds for clue %s %d:\n",
+                   solver_recurse_depth*4, "",
+                   cluepos[c/w], c%w+1);
+       else
+           prefix[0] = '\0';          /* placate optimiser */
 #endif
 
        i = 0;
@@ -1248,7 +1248,8 @@ static int check_errors(const game_state *state, int *errors)
            }
        }
 
-       if (n > clues[i] || (j == w && n < clues[i])) {
+       if (n > clues[i] || (best == w && n < clues[i]) ||
+           (best < w && n == clues[i])) {
            if (errors) {
                int x, y;
                CLUEPOS(x, y, i, w);
@@ -1977,7 +1978,7 @@ static void game_print(drawing *dr, const game_state *state, int tilesize)
 const struct game thegame = {
     "Towers", "games.towers", "towers",
     default_params,
-    game_fetch_preset,
+    game_fetch_preset, NULL,
     decode_params,
     encode_params,
     free_params,