aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2012-01-17 18:53:02 +0000
committerSimon Tatham <anakin@pobox.com>2012-01-17 18:53:02 +0000
commitb2d7429d539238258ca6f9061da5a25a0835f2a9 (patch)
tree6cd485bfc9ea93518f427b308b8793de9d7be39a
parent7024735f89c7b04b57e7ea41d5104a3455c91348 (diff)
downloadpuzzles-b2d7429d539238258ca6f9061da5a25a0835f2a9.zip
puzzles-b2d7429d539238258ca6f9061da5a25a0835f2a9.tar.gz
puzzles-b2d7429d539238258ca6f9061da5a25a0835f2a9.tar.bz2
puzzles-b2d7429d539238258ca6f9061da5a25a0835f2a9.tar.xz
Fix a bug causing premature defeatism in the Bridges solver. Deducing
a better upper bound on the number of bridges leaving a given island in a given direction was not counted as having 'done something'; so a solver run could make several such deductions, but then terminate in the belief that it hadn't achieved anything, when just going back round the main solver loop would have enabled it to make further deductions based on those new bounds. [originally from svn r9377]
-rw-r--r--bridges.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bridges.c b/bridges.c
index 5860e0c..6a677e3 100644
--- a/bridges.c
+++ b/bridges.c
@@ -1505,11 +1505,11 @@ static int solve_island_stage3(struct island *is, int *didsth_r)
if (maxb == 0) {
debug(("...adding NOLINE.\n"));
solve_join(is, i, -1, 0); /* we can't have any bridges here. */
- didsth = 1;
} else {
debug(("...setting maximum\n"));
solve_join(is, i, maxb, 1);
}
+ didsth = 1;
}
map_update_possibles(is->state);
}