i am having problems to write sudoku game in c++...... any source code or help would be appreciated
How to write sudoku on c++?
Pull down the source code from the GNOME Sudoku game site.
Reply:It is not that easy. May be you can contact a C++ expert at websites like http://oktutorial.com/ to help you code it.
Reply:are you writing a sudoku puzzle generator, a solver, or a UI for users to solve canned puzzles? Be a little more specific about what you're trying to accomplish and ask a more specific question. What exactly are you having troubles with?
----- EDIT-----
The hardest part, and the first one you should tackle, is the generator. I'm attempting to write on of my own right now, and as you may have noticed, it isn't inherently easy to do. There are a number of concerns :
1. Should you randomly add squares, or generate a whole board and then take squares away.
2. The puzzle needs to be solvable.
3. The puzzle needs to have only one solution.
4. How do you rate the difficulty of a puzzle?
You'll need to work on the solver at the same time, because if you'll notice #2 above, you can't prove it's solvable without solving it yourself. I wrote a sudoku solver in college using the strategy design pattern. It worked fairly well, so you should try looking into that for your solver : http://en.wikipedia.org/wiki/Strategy_pa...
Now, obviously, after all this, the easiest and most fun part of this project is the UI. My suggestion is to either skip the generator and solver, write the UI, and find a way to consume canned puzzles from somewhere else. Look for a website that has daily puzzles or an RSS feed (I don't know if there are any) and consume them.
Good luck.
our song
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment