aboutsummaryrefslogtreecommitdiff
path: root/puzzles.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2008-04-08 09:36:33 +0000
committerSimon Tatham <anakin@pobox.com>2008-04-08 09:36:33 +0000
commitc8a843ee62e2a4a984a39aecd65865d7e9ab189d (patch)
treebb30d9587d6e4992e4627150199f194cdb7d4bc3 /puzzles.h
parent771532fe7f649132c2b82e2ab12f2c079e242430 (diff)
downloadpuzzles-c8a843ee62e2a4a984a39aecd65865d7e9ab189d.zip
puzzles-c8a843ee62e2a4a984a39aecd65865d7e9ab189d.tar.gz
puzzles-c8a843ee62e2a4a984a39aecd65865d7e9ab189d.tar.bz2
puzzles-c8a843ee62e2a4a984a39aecd65865d7e9ab189d.tar.xz
Improvements to filled-grid generation. Introduced a cunning idea
suggested by IWJ last night: grid generation can immediately choose an entire grid row randomly, since all that's doing is nailing down the names of the numbers, and that gets the whole thing started more efficiently. But the main difference is that now grid generation is given only area^2 steps to come up with a filled grid, and then cut off unceremoniously, causing grid generation to fail and be retried from scratch. This seems to prevent hangups on jigsaw layouts that admit few useful solutions, by changing layout constantly. 9j puzzles now generate at a sensible rate, and as an added bonus so do 5x5 normal puzzles, which they never used to. [originally from svn r7978]
Diffstat (limited to 'puzzles.h')
0 files changed, 0 insertions, 0 deletions