Java in Sudoku boards

L

luckyzb

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.
 
R

Rhino

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.
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.
 
O

Oliver Wong

Mickey Segal said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,471
Messages
2,571,823
Members
48,797
Latest member
PeterSimpson
Top