chiark / gitweb /
Pearl: reinstate a conditioned-out assertion.
authorSimon Tatham <anakin@pobox.com>
Wed, 24 Feb 2016 19:31:54 +0000 (19:31 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 24 Feb 2016 19:31:54 +0000 (19:31 +0000)
I think this assertion must have been put under '#if 0' during early
development, and accidentally never taken out once the game started
actually working. Putting it back in doesn't cause the self-tests to
fail, so I'm reinstating it - if it does fail, I'd like to know about
it!

pearl.c

diff --git a/pearl.c b/pearl.c
index 20ba3d44a6bbfaec99aa132bc938147e5eb0bb38..f44365630d25ebbf4e4a80567c5522837ed099f5 100644 (file)
--- a/pearl.c
+++ b/pearl.c
@@ -1509,11 +1509,7 @@ static void dsf_update_completion(game_state *state, int *loopclass,
     assert(INGRID(state, bx, by)); /* should not have a link off grid */
 
     bc = by*w+bx;
     assert(INGRID(state, bx, by)); /* should not have a link off grid */
 
     bc = by*w+bx;
-#if 0
     assert(state->lines[bc] & F(dir)); /* should have reciprocal link */
     assert(state->lines[bc] & F(dir)); /* should have reciprocal link */
-#endif
-    /* TODO put above assertion back in once we stop generating partially
-     * soluble puzzles. */
     if (!(state->lines[bc] & F(dir))) return;
 
     ae = dsf_canonify(dsf, ac);
     if (!(state->lines[bc] & F(dir))) return;
 
     ae = dsf_canonify(dsf, ac);