- Status New
- Percent Complete
- Task Type Patches
- Category Games
- Assigned To No-one
- Operating System All players
- Severity Low
- Priority Very Low
- Reported Version Daily build (which?)
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#5519 - Sudoku: Ability to chose which difficulty to generate
It would be nice if the “Generate” menu-option opened a submenu where you could pick which difficulty to generate.
I’ve had a quick glance at the code, and it looks like it’d have to generate until a suitable difficulty is found, but that’s no different from what users have to do now, if they’re after a specific difficulty, except it’d happen automatically.
If I get the time/motivation, I may have another look at it in the next couple of days.
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
I have now created a patch that does this, only problem is the following warning:
"warning: passing arg 2 of `sudoku_generate' discards qualifiers from pointer target type"
I tried that patch (and fixed that warning), but I ran for like hours or locked up my player / the sim (didn't wait for too long, but at least on my h120 there wasn't a result in a useful time)
Updated patch by J3TC- in IRC. Untested by me.
Maybe a timeout or maximum number of iterations could help, maybe with a splash on fail? You'd get a wrong difficulty of course, but at least it would end
This patch adds a counter that defines a maximum number of iterations to try for. It still has the error mentioned in my first comment, because I suck at C. I also don't know what a reasonable number of iterations is.
There's currently no splash on fail - it simply picks the last generated level and uses that as if everything was fine.
This one fixes the error - thanks to Dominik again
is this going to be committed?
Is there any need to hurry? If generation simply stops and uses the last generated level that this isn't a good solution, and I think we should find a better one first (though I have no idea how to do this best). At least the user should get informed that the generated level isn't what he asked for.