diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-03-12 15:18:33 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-03-12 15:18:33 +0000 |
| commit | adf2a098298f1aa73aca2c816174d5e63ff45a32 (patch) | |
| tree | 9a04cbec8593fce04c0e91c3f1becc83cdb8f837 /map.c | |
| parent | 51818780f835b459b9671df38eefef06fca3fd89 (diff) | |
| download | puzzles-adf2a098298f1aa73aca2c816174d5e63ff45a32.zip puzzles-adf2a098298f1aa73aca2c816174d5e63ff45a32.tar.gz puzzles-adf2a098298f1aa73aca2c816174d5e63ff45a32.tar.bz2 puzzles-adf2a098298f1aa73aca2c816174d5e63ff45a32.tar.xz | |
Galaxies: skew grid generation in favour of wiggliness.
Ben complained yesterday that Galaxies had a nasty habit of generating
games whose solution was a boring set of rectangles. Now that even at
Normal mode the solver is better at coping with wiggly tentacled
regions, it seems like a good moment to fix that.
This change arranges that when we initially generate a filled grid, we
try ten times, and pick the wiggliest of the grids we found. This
doesn't make any boring rectangle-filled grid _impossible_ - players
will still have to stay on their toes, and can't rely 100% on at least
a certain number of wiggles existing - but it makes the interesting
grids a lot more likely to come up.
This skew happens before checking solubility. So it doesn't increase
grid generation time by a factor of ten (as it would if we generated
ten _soluble_ grids and picked the wiggliest). It's still a speed
drop, of course, but a more modest one than that.
Diffstat (limited to 'map.c')
0 files changed, 0 insertions, 0 deletions