chiark / gitweb /
Forbid undo of new-game if it would change the params.
[sgt-puzzles.git] / towers.c
index 7666af9e00cb499312092262838ab5ab49f6ee49..a3a7e55a45f01166932ad7ca0b5f42df06ca20a7 100644 (file)
--- a/towers.c
+++ b/towers.c
@@ -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,