aboutsummaryrefslogtreecommitdiff
path: root/unfinished/divvy.c (follow)
Commit message (Collapse)AuthorAge
* Substantial reworking of Solo so that it implements both Sudoku-XSimon Tatham2008-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | (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. [originally from svn r7974]
* A rigorous proof. Totally unimportant to the code, but I didn't wantSimon Tatham2007-08-25
| | | | | | to lose it :-) [originally from svn r7703]
* Fix an inaccurate comment.Simon Tatham2007-08-25
| | | | [originally from svn r7702]
* I've just realised that my deliberate avoidance of non-simplySimon Tatham2007-08-25
| | | | | | | | | connected polyominoes actually causes a loss of generality for sufficiently large k. I hadn't previously noticed, because you need k to be (I think) at least 23 and none of my potential applications require anything nearly that large. Add some discussion of this. [originally from svn r7701]
* Ahem. Finishing writing the comment _before_ checkin is generally sensible.Simon Tatham2007-08-18
| | | | [originally from svn r7694]
* Allow a 1-omino to be completely destroyed and recreated in anSimon Tatham2007-08-18
| | | | | | | | | | arbitrary unclaimed square. This cures the most common cause of generation failures (covering a large area in dominoes was the most difficult case, and would fail even if the large area was 1xn!); the failure rate is now sufficiently low under all circumstances I've found that I'm willing to just loop until I get a success. [originally from svn r7693]
* Better test-mode diagnostics.Simon Tatham2007-08-18
| | | | [originally from svn r7691]
* A piece of library code which constructs a random division of aSimon Tatham2007-08-18
rectangle into equally sized ominoes. I have a couple of potential applications for this, but none I've actually implemented yet, so for the moment it's living in `unfinished'. [originally from svn r7690]