diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-08-27 13:22:45 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-08-27 13:26:01 +0100 |
| commit | 67496e74f68db900d8117be6de3c75285c29c489 (patch) | |
| tree | 265f13ad10fe4ce19e9f24a85f5ea6153cfbc95c /PuzzleApplet.java | |
| parent | d3f825c98c2877ca3e2763492ba99973c1b9dc5f (diff) | |
| download | puzzles-67496e74f68db900d8117be6de3c75285c29c489.zip puzzles-67496e74f68db900d8117be6de3c75285c29c489.tar.gz puzzles-67496e74f68db900d8117be6de3c75285c29c489.tar.bz2 puzzles-67496e74f68db900d8117be6de3c75285c29c489.tar.xz | |
Singles: prevent hangs at low puzzle sizes.
A user reports that trying to generate a 2x2 or 3x3 puzzle at Tricky
difficulty causes the generator to hang, for the usual reason that
there aren't any - puzzles of that size are either ambiguous or Easy.
The usual response in this code base is to quietly downgrade the
puzzle difficulty when absolutely necessary, so here's some code to do
that (and also for 2x3, which the user didn't test, but unsurprisingly
behaves the same way).
Diffstat (limited to 'PuzzleApplet.java')
0 files changed, 0 insertions, 0 deletions