Here’s some straight-to-the-point source-code for solving and generating Sudoku boards.
It’s targeted at embedded systems, so stuff will run fast and memory consumption is rather low.
I’m putting it here mainly so that people can find it through google and have some of the Sudoku programming-problems solved. The source-code is heavily commented, so hopefully it’ll do some good.
Here we go:
common.h, os.h (just common stuff)
Board.h, Board.cpp (The core stuff)
SudokuZen.cpp (Usage example)
A package that may compile: SudokuZen.zip
The picture was drawn by my brother, for a game we never released.
Great code!
sudokushop
Does your Generate function work? It seems to produce the same puzzle every time.
Thank you Mr. Ohad, good job…
Many thanks , It’s clearly useful code.