Rockbox

  • Status New
  • Percent Complete
    0%
  • 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
Attached to Project: Rockbox
Opened by rasher - 2006-06-08
Last edited by pondlife - 2008-07-17

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.

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.

Admin
fg commented on 2008-12-12 21:23

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.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing