chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Forbid undo of new-game if it would change the params.
[sgt-puzzles.git]
/
undead.c
diff --git
a/undead.c
b/undead.c
index fc03fe8f1701d182fec0477b554cf17f23861b7e..b1f536e8d0233183a3d0ecf553999038670bf120 100644
(file)
--- a/
undead.c
+++ b/
undead.c
@@
-1955,7
+1955,9
@@
int check_path_solution(game_state *state, int p) {
}
}
}
}
- if (unfilled == 0 && count != state->common->paths[p].sightings_start) {
+ if (count > state->common->paths[p].sightings_start ||
+ count + unfilled < state->common->paths[p].sightings_start)
+ {
correct = FALSE;
state->hint_errors[state->common->paths[p].grid_start] = TRUE;
}
correct = FALSE;
state->hint_errors[state->common->paths[p].grid_start] = TRUE;
}
@@
-1977,7
+1979,9
@@
int check_path_solution(game_state *state, int p) {
}
}
}
}
- if (unfilled == 0 && count != state->common->paths[p].sightings_end) {
+ if (count > state->common->paths[p].sightings_end ||
+ count + unfilled < state->common->paths[p].sightings_end)
+ {
correct = FALSE;
state->hint_errors[state->common->paths[p].grid_end] = TRUE;
}
correct = FALSE;
state->hint_errors[state->common->paths[p].grid_end] = TRUE;
}
@@
-2698,7
+2702,7
@@
static void game_print(drawing *dr, const game_state *state, int tilesize)
const struct game thegame = {
"Undead", "games.undead", "undead",
default_params,
const struct game thegame = {
"Undead", "games.undead", "undead",
default_params,
- game_fetch_preset,
+ game_fetch_preset,
NULL,
decode_params,
encode_params,
free_params,
decode_params,
encode_params,
free_params,