Hi All,
Given that I have the method to solve sudoku puzzles, I need expert
opinion/advice on the
format/method to do the input ("original puzzle") and display the
output "completed puzzle".
For those unfamiliar with these puzzles, there are 9 horizontal lines,
each having 9 single digits in a row as in "123456789". Each of these
rows is separated into
cell items as "1" ,"2" ,"3",... "8" ,"9".
The data is placed into an array[lines][cellItems] that is processed
by the program so as to produce a "solution".
TIA
Bob
Leroy42 - 06 Jan 2006 14:53 GMT
Why not just use the "direct approach"?
Use input like
-9-|75-|-8-
---|---|-1-
--5|8-4|-3- and so on.
using special characters " ", ".", "-" for the empty cells and read
directly into your array. By this you easily can store your puzzles in
files.
Leroy
bobH - 09 Jan 2006 17:52 GMT
Hi Leroy42,
I appreciate you responding
I asked this question because applets that I have seen seem to do
something similar to
putting 81 text areas on the applet or grids. Yet as I looked at them
none offered to disclose the applet details except for a purchase
price.
I did something similar to your suggestion in my earlier Q at this
google address:
http://groups.google.com/group/comp.lang.java.help/browse_frm/thread/3de5a9abdc4
eaa3c/445da3b8dbb15ca1#445da3b8dbb15ca1
Do you think, considering the complexity that there having 81 text
areas is more or less efficient?
Bob