• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Visual Basic

R

Roche

Guest
If Anyone here knows any Visual Basic and is willing to create for me a program that cna create a standard Sudoku and then a program that can solve a Sudoku. Thanks Much.

- Roche
 
Divine Celestial
Loyal Member
Joined
Nov 11, 2004
Messages
810
Reaction score
0
Well, I think it's best for you to research it and make it yourself, because we can only help you, not make it for you.

[N]asser` ~ Out
 
Newbie Spellweaver
Joined
Sep 14, 2005
Messages
37
Reaction score
0
If you tell me what a Sudoku is, then I might be able to make it for you...
 
Initiate Mage
Joined
Sep 27, 2005
Messages
3
Reaction score
0
yeah i do not know what sudoku is, but i do know some VB
 
Divine Celestial
Loyal Member
Joined
Nov 11, 2004
Messages
810
Reaction score
0
FrostDeamon said:
Nasser is nasty!

Yeah...and...YOU SUCK AT GFX! :tp:

Ps - rep me :tp:

[N]asser` ~ Out
 
Experienced Elementalist
Joined
May 1, 2005
Messages
249
Reaction score
0
Sudoku is a grid normally 9 grids of 9
Roche - Visual Basic - RaGEZONE Forums
each column and row must only have 1 number 1-9 in it i.e the one below is a completed version of sudoku hope that helps
Roche - Visual Basic - RaGEZONE Forums
 
Initiate Mage
Joined
Feb 25, 2004
Messages
1
Reaction score
0
If your using VB 6, it looks like you'd create a control array of textboxes whose index would reference their row and column (index 0 would be position row 0 column 0 while index 28 would be row 2 column 8). Then, with an OnChange (I think that's what it's called) test the column and row the textbox is in. If the user modified the texbox 45, every textbox in row 4 and in column 5 except for the modified textbox would have to be tested to see if their value is equal to what the user just put in. Hope that makes sense.
 
G

Garth

Guest
I don't know if anyone is still interested in this but I wrote a sudoku solver for Microsoft Access in VBA.
I used a 4 dimensional array to store the grid and copies of the grid. A(9,9,9,2).
1st and 2nd dimensions refer to row and column (x,y).
3rd dimension(1-9) hold the status of each number for that (x,y)cell: 1 if that number is still possible in that location, 0 if number used, and 3rd dimension(0) holds the value of that cell when cell contains a number or 0 if undecided
The fourth dimension just enables a copy to be taken of the current position so that after initial input the start position can be simply saved, and a goback function can be created.
for x 1-9,for y 1-9,for z 0-9
a(x,y,z,1) = a(x,y,z,0)
next,next,next
The solution isn't just a matter of looking for a cell with only one option left. Sometimes it has several options but is the only one with a particular number.
Difficult puzzles have a cell which has to be guessed. I haven’t written a routine to make guesses. I let the user do that. Validating input and allowing delete was pain enough. What I’ve done isn’t pretty but It satisfied my urge to do something.
 
Newbie Spellweaver
Joined
May 17, 2005
Messages
9
Reaction score
0
Garth, would you mind posting the source?
Or maybe e-mail it to me (my e-mail is in my Profile).
 
Newbie Spellweaver
Joined
May 7, 2005
Messages
31
Reaction score
0
Roche said:
If Anyone here knows any Visual Basic and is willing to create for me a program that cna create a standard Sudoku and then a program that can solve a Sudoku. Thanks Much.

- Roche

i want to create a program that u requested but the problem is i don't know the real nature of the program...can u make a step-by-step description or flow of the program and how it starts and how it ends so i can make a good design...actually i already write an initial program of that but i think it will be wasted if i got the wrong design...so tell me more about it...
 
Back
Top