Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / January 2006

Tip: Looking for answers? Try searching our database.

Advice requested input/output  method for sudoku puzzle

Thread view: 
bherbst65@hotmail.com - 06 Jan 2006 01:50 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.