X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=pearl.c;h=f44365630d25ebbf4e4a80567c5522837ed099f5;hb=c5500926bf7458aabb0e11945bfd24038bfeedee;hp=977577f55bb1d78bf9b05ad9e33b36fc1b77498b;hpb=ea8da331e361c96a7e563b0a91dc3535e0d1d545;p=sgt-puzzles.git diff --git a/pearl.c b/pearl.c index 977577f..f443656 100644 --- 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; -#if 0 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); @@ -1737,7 +1733,7 @@ static char *game_text_format(const game_state *state) for (r = 0; r < h; ++r) { for (c = 0; c < w; ++c) { int i = r*w + c, cell = r*ch*gw + c*cw; - board[cell] = state->shared->clues[i]["+BW"]; + board[cell] = "+BW"[(unsigned char)state->shared->clues[i]]; if (c < w - 1 && (state->lines[i] & R || state->lines[i+1] & L)) memset(board + cell + 1, '-', cw - 1); if (r < h - 1 && (state->lines[i] & D || state->lines[i+w] & U))