I am currently in need of some help on a java based Sudoku board. There
are a couple of questions I have.
1. How would I go about generating random boards for people to solve
rather than a select few that have already been completed and when the
inputer is completed with the board and hits the solve jbutton the
board is just checked against the already completed board. I would like
to know how I can get something that when the jcombobox has been
selected say medium and then the user clicks the newpuzzle jbutton it
would randomly generate a medium level of difficulty sudoku board. (I
am working with a jtextfields rather than a 2d array for a board.)
2.I would like to implement a timer that when the user is complete
would save the time it took to solve and then put it into a
JTextfieldbox and would continue to keep all of the times from that
session.
Thanks for any and all help that is given.
>I am currently in need of some help on a java based Sudoku board. There
> are a couple of questions I have.
[quoted text clipped - 11 lines]
> session.
> Thanks for any and all help that is given.
That questions was asked recently - a couple of weeks ago, give or take - on
comp.lang.java.help and there were several detailed answers about techniques
for generating Sudokus and verifying that they were valid. You might find
some good suggestions in that thread.
In fact, Sudoku creation and solving techniques have come up several times
in both comp.lang.java.programmer and comp.lang.java.help so a Google Groups
search of those newsgroups would probably find you lots of useful
information.
--
Rhino
Mickey Segal - 26 Apr 2006 02:21 GMT
BTW, the best Java Sudoku I've found on the Web is
http://www.by-art.com/sudoku/sudoku.php. Has anyone found a better one?
Oliver Wong - 26 Apr 2006 20:22 GMT
> BTW, the best Java Sudoku I've found on the Web is
> http://www.by-art.com/sudoku/sudoku.php. Has anyone found a better one?
Depends on your metric for better/best. I don't like the fact that it
disallows you to write down certain numbers in the grid, preventing you from
making a mistake.
Given that Sudokus can be solved in an eye-blink by computers, isn't the
"fun" of sudokus to "do them yourself"?
(Also, why arbitrarily limit yourself to Java as opposed to say
JavaScript or .NET?)
- Oliver