Substantial reworking of Solo so that it implements both Sudoku-X
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 7 Apr 2008 15:56:42 +0000 (15:56 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 7 Apr 2008 15:56:42 +0000 (15:56 +0000)
commitfbd0fc79557f57ae17b0ecc74834577c210534f2
treec1958dcac18da3b939f313f552c930305a5e89f8
parentd66add28bba6b58e60819bfc135744ced74dbc37
Substantial reworking of Solo so that it implements both Sudoku-X
(require both main diagonals to have one of every digit in addition
to all the usual constraints) and Jigsaw Sudoku (replace the array
of rectangular sub-blocks with the sub-blocks being random
polyominoes). To implement the latter, I've moved my `divvy.c'
library routine out of the `unfinished' subdirectory.

Jigsaw mode is currently an undocumented feature: you enable it by
setting the rows parameter to 1 (and the columns parameter to your
desired grid size, which unlike normal Sudoku can be anything you
like including a prime number). The reason it's undocumented is
because generation times are not yet reliably short: sometimes
generating a jigsaw-type puzzle can hang for hours and still get
nowhere. (The algorithm should terminate in principle, but not in
any time you're prepared to wait.) I _think_ I know how to solve
this, but have yet to try it. Until then, jigsaw mode will remain a
hidden feature.

Printing of X-type puzzles is also substandard at present, because
the current print-colour API replaces the desired light shading of
the X-cells with heavy diagonal hatching. I plan to adjust the API
imminently to address this.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7974 cda61777-01e9-0310-a592-d414129be87e
divvy.c [moved from unfinished/divvy.c with 100% similarity]
puzzles.but
puzzles.h
solo.R
solo.c