aboutsummaryrefslogtreecommitdiff
path: root/PuzzleApplet.java
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2017-03-12 09:11:43 +0000
committerSimon Tatham <anakin@pobox.com>2017-03-12 09:11:43 +0000
commit0bcb32c9132020ffe2985b542951b05c6ab58b2a (patch)
tree1fd8c9b2368851b7647e88433dd052664e8521e4 /PuzzleApplet.java
parent1f613ba31f2599bf29c35d5a46cc81594f6844ea (diff)
downloadpuzzles-0bcb32c9132020ffe2985b542951b05c6ab58b2a.zip
puzzles-0bcb32c9132020ffe2985b542951b05c6ab58b2a.tar.gz
puzzles-0bcb32c9132020ffe2985b542951b05c6ab58b2a.tar.bz2
puzzles-0bcb32c9132020ffe2985b542951b05c6ab58b2a.tar.xz
Net: fix completion check if top left square is empty.
A hand-typed grid is permitted to use the square type '0' (never generated by Net's own grid generator), which is a completely empty square. This requires an adjustment to the completion checker, so that such squares aren't required to be connected; otherwise, a grid containing one would be permanently uncompletable. However, the completion checker missed one case - it was unconditionally checking that all squares are connected to the _top left corner_, on the basis that (before I thought of the zero square) any source square is as good as any other if what you really want to know is whether they're all connected to each other. But that means that if the top left square _is_ the empty one, things to wrong - e.g. 5x5:02c328ade11adb129d7c3e524 would fail to give a completion flash. Fixed by starting the completion-checking search from the first non-empty square we find.
Diffstat (limited to 'PuzzleApplet.java')
0 files changed, 0 insertions, 0 deletions