chiark / gitweb /
In Undead, mark clues as errors in a few more situations.
authorJonas Kölker <jonaskoelker@yahoo.com>
Mon, 12 Oct 2015 18:07:18 +0000 (20:07 +0200)
committerSimon Tatham <anakin@pobox.com>
Wed, 21 Oct 2015 21:02:59 +0000 (22:02 +0100)
 - 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.

undead.c

index fc03fe8f1701d182fec0477b554cf17f23861b7e..ad0ab79d74613c741d3e40b54e4340e2eb816a72 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;
     }
@@ -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;
     }