chiark / gitweb /
Pattern: add a system of immutable pre-filled grid squares.
authorSimon Tatham <anakin@pobox.com>
Fri, 11 Dec 2015 18:09:41 +0000 (18:09 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 12 Dec 2015 10:56:34 +0000 (10:56 +0000)
commitf061101210352b9783085ba37e1c58f1fac89862
tree21b5eca596682e1bdf29fa8f25cf7c7e9ced0317
parentd1219cac3c2e0adf58a477e442a8656bcb55ed0f
Pattern: add a system of immutable pre-filled grid squares.

The game previously only supported numeric clues round the edge; but
if for some reason you really want a puzzle with a specific solution
bitmap and that bitmap doesn't happen to be uniquely soluble from only
its row and column counts, then this gives you a fallback approach of
pre-filling a few grid squares to resolve the ambiguities.

(This also applies if the puzzle is uniquely soluble *in principle*
but not by Pattern's limited solver - for example, Pattern has never
been able to solve 4x4:2/1/2/1/1.1/2/1/1 and still can't, but now it
can solve 4x4:2/1/2/1/1.1/2/1/1,Ap which has the hard part done for
it.)

Immutable squares are protected from modification during play, and
used as initial information by the solver.
pattern.c