aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Kölker <jonaskoelker@yahoo.com>2015-10-12 20:07:18 +0200
committerSimon Tatham <anakin@pobox.com>2015-10-21 22:02:59 +0100
commit80b63e6cefb0e1055bdd5f2f8238d7cc8c23f51f (patch)
treeee5c02271ddb48da45de9f08025eb60127526f91
parent1cf403ceb81482dea7107a49573d6834c5a650d1 (diff)
downloadpuzzles-80b63e6cefb0e1055bdd5f2f8238d7cc8c23f51f.zip
puzzles-80b63e6cefb0e1055bdd5f2f8238d7cc8c23f51f.tar.gz
puzzles-80b63e6cefb0e1055bdd5f2f8238d7cc8c23f51f.tar.bz2
puzzles-80b63e6cefb0e1055bdd5f2f8238d7cc8c23f51f.tar.xz
In Undead, mark clues as errors in a few more situations.
- Mark a clue as an error if too many monsters are seen, even if some squares are empty. - Mark a clue as an error if too few monsters are seen, taking into account how many more sightings are possible given the number of empty squares and how many times each of them are visited.
-rw-r--r--undead.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/undead.c b/undead.c
index fc03fe8..ad0ab79 100644
--- 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;
}
@@ -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;
}