aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Kölker <jonaskoelker@yahoo.com>2015-10-01 18:47:55 +0200
committerSimon Tatham <anakin@pobox.com>2015-10-03 18:17:25 +0100
commit5e22080bcd581fe4e2a07ca897ebea19a2961f66 (patch)
treed6f6f8fe7d195344f934d122319a9c231d833f7c
parent21b8323b2f1ca7b6bf01bc1e7a529636ea57daba (diff)
downloadpuzzles-5e22080bcd581fe4e2a07ca897ebea19a2961f66.zip
puzzles-5e22080bcd581fe4e2a07ca897ebea19a2961f66.tar.gz
puzzles-5e22080bcd581fe4e2a07ca897ebea19a2961f66.tar.bz2
puzzles-5e22080bcd581fe4e2a07ca897ebea19a2961f66.tar.xz
Improve Towers error highlighting.
Highlight clues of value n in Towers if its row/column contains an increasing sequence of length n, the last number of which is not equal to the number of rows/columns (i.e. such that the sequence will have to be extended, in violation of the clue).
-rw-r--r--towers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/towers.c b/towers.c
index 7666af9..9525adb 100644
--- 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);