(Third time. Cemetech keeps asking me to login when I submit this freakin' post and then reloads this page with no text. Edit: Microsoft Edge seems to be on that infinite loop (even when I close the window and open it up again). Posted this on Google Chrome...)

I have created a Sudoku solver which solves the grid recursively (using the backtracking method). It is surprisingly fast (without the animation of course Razz) and I plan on making this program both be able to solve that random sudoku puzzle in the newspaper that you've been stuck on forever while also being able to generate its own for you to play (with difficulty settings).

Eye Candy:



Top is animated. Bottom is the same code, but just doesn't call the DrawGrid function until the end (versus calling it every loop).

Edit: Apparently Jeffitus is making a Sudoku game as well. Very Happy
I'll just have to beat him to the upload. In the mean time, no public source code. Fair's fair. Razz
I have accomplished much progress over the past 3 days including:

    Puzzle Generator
    Inserting numbers
    Win Detection
    Fonts!!


Update Screenshot! :
Very nice progress so far! I love the font choice! Keep up the good work!
Neat Smile You should make inserted numbers a different color though.
MateoConLechuga wrote:
Neat Smile You should make inserted numbers a different color though.

I agree with Mateo on that!

Also, it would be nice if you could mark potential candidates for each spot with a pip that corresponds to tge candidates position around each number like this maybe:

(The gray numbers are just for clarification)
Pieman7373 wrote:
it would be nice if you could mark potential candidates for each spot with a pip that corresponds to tge candidates position around each number

If you use a 5-pixel-high font, there's exactly enough space to print the numbers instead of just using pips.
Runer112 wrote:
Pieman7373 wrote:
it would be nice if you could mark potential candidates for each spot with a pip that corresponds to tge candidates position around each number

If you use a 5-pixel-high font, there's exactly enough space to print the numbers instead of just using pips.


Oh nice, I was wondering about that
Pieman7373 wrote:
MateoConLechuga wrote:
Neat Smile You should make inserted numbers a different color though.

I agree with Mateo on that!

Also, it would be nice if you could mark potential candidates for each spot with a pip that corresponds to tge candidates position around each number like this maybe:

(The gray numbers are just for clarification)


Oh, thank you! I was currently trying to figure out how to put tiny fonts in those boxes but I could only fit 4 in each box (I need 6). Color coding (and i have extra space on the right for a key) is a great idea! Thanks.

Runer112 wrote:
Pieman7373 wrote:
it would be nice if you could mark potential candidates for each spot with a pip that corresponds to the candidates position around each number

If you use a 5-pixel-high font, there's exactly enough space to print the numbers instead of just using pips.


eh... that could be hard (to read - but definitely possible to make... barely Razz) and I personally REALLY like pieman's idea.
KaluW_ wrote:
I personally REALLY like pieman's idea.


Hooray!


Although there hasn't been much visual difference since the last update, there has been a ton of code optimization and quality of life improvements (namely, my code went from super garbagey to not so garbagey). I fixed a couple of bugs from the last update (although they're not exactly visible from the screen) and am currently waiting for MateoC to resolve the convimg bug that is not allowing the correct display of sprites on the screen.

Done since the last update:
Multiple Wins Detection
Prevention of editing "embedded" numbers in the puzzle


In next update (or next several updates Razz):
Menu!
Improved GUI
Guesses in the puzzle (waiting on sprite bug)


Also, there appears to be a couple of people who don't know what "guessing" is in Sudoku, lol. Example:


Not many Sudoku puzzles can be solved right off the bat, so you lightly pencil in "guesses" and as you go, logically eliminate your guesses until you only have one "guess" left for each box - the correct number. That being said, I plan on adding a "Challenger" difficulty to my game where you're not allowed to insert "guesses" thereby making the puzzle close to impossible to legitimately solve (looks at self looking up solution to the sudoku puzzle gif above Razz).
KaluW_ wrote:
Not many Sudoku puzzles can be solved right off the bat, so you lightly pencil in "guesses" and as you go, logically eliminate your guesses until you only have one "guess" left for each box - the correct number

This mode is for losers.
MateoConLechuga wrote:
KaluW_ wrote:
Not many Sudoku puzzles can be solved right off the bat, so you lightly pencil in "guesses" and as you go, logically eliminate your guesses until you only have one "guess" left for each box - the correct number

This mode is for losers.


You're a loser. Evil or Very Mad
I got the guess mechanics implemented (although I need to improve my GUI a bit).

Eye Candy! (750x actual speed, unless you enjoy seeing nothing happening for seconds at a time Razz)


Even though some people insist that penciling in all the possible numbers in each box and logically eliminating them as you go ("guessing") certifies you as a loser, I think that just means you have never done an actual Sudoku puzzle in your life. Razz
KaluW_ wrote:
I think that just means you have never done an actual Sudoku puzzle in your life. Razz

I have never found a sudoku puzzle that cannot be solved in 5 minutes or less -- without needing to resort to filling in numbers like this.
MateoConLechuga wrote:
KaluW_ wrote:
I think that just means you have never done an actual Sudoku puzzle in your life. Razz

I have never found a sudoku puzzle that cannot be solved in 5 minutes or less -- without needing to resort to filling in numbers like this.

Not everyone can visualize a dozen or more numbers simultaneously. Razz
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement