chiark / gitweb /
Forbid undo of new-game if it would change the params.
[sgt-puzzles.git] / unruly.c
index 855ba361b79d9b39ad6327e1914524d0c3f52ac1..f418efa7769e1629e8c487bd8d5939a9549228e8 100644 (file)
--- a/unruly.c
+++ b/unruly.c
@@ -1012,7 +1012,7 @@ static int unruly_validate_unique(const game_state *state, int horizontal,
         for (c = 0; c < nc; c++)
             if (state->grid[r*rmult + c*cmult] != EMPTY)
                 nfull++;
-        if (nfull != nr)
+        if (nfull != nc)
             continue;
         for (r2 = r+1; r2 < nr; r2++) {
             int match = TRUE;
@@ -1912,7 +1912,7 @@ static void game_print(drawing *dr, const game_state *state, int tilesize)
 const struct game thegame = {
     "Unruly", "games.unruly", "unruly",
     default_params,
-    game_fetch_preset,
+    game_fetch_preset, NULL,
     decode_params,
     encode_params,
     free_params,