alexdej / puzpy

Python library for reading and writing across lite crossword puzzle .puz files.
MIT License
112 stars 32 forks source link

Adds a 'NotProvided' solution state to the SolutionState enum #29

Closed thisisparker closed 3 weeks ago

thisisparker commented 9 months ago

This is not well documented but one of the values in the SolutionState bit at 0x32 is 0x0002, which indicates that the solution is not present in the file. In practice I think almost every client treats it just about the same as 0x0004 in that spot (suppressing or disabling "reveal" tools) but it may be the case that some clients will correctly not offer an attempt to unscramble either.

alexdej commented 3 weeks ago

Thanks for this @thisisparker . Have you encountered a puzzle in the wild that does not provide a solution? Would be nice to add to tests. thx

thisisparker commented 2 weeks ago

I have created puzzles that have this bit set, and testers have confirmed that it does lead to some "expected" different behavior in e.g. Across Lite — in particular, as I mentioned above, the "reveal" options are not provided, and the completion screen expresses some uncertainty about whether you've completed the puzzle. For that to work, though, the solution bits still needed to be filled, and I did so with Xes as is conventional.

Happy to share one such puzzle if it would help for testing! But I didn't really encounter it in the wild. To be honest I was surprised to learn about this SolutionState before opening this issue.

royleban commented 2 weeks ago

I would be interested in getting a copy of the test file. Puzzazz does respect this flag, but we've never seen a puzzle that has it. It's largely irrelevant because Puzzazz also automatically detects puzzles with redacted solutions. e.g., all Xes. (send to @.***) Also, FYI, we chose to not support unscrambling. It seemed to us that nobody was scrambling puzzles any more. Haven't seen one in many years.