A very simple Sudoku game played in terminal and a practice for me to learn:
- cmake
- code and compile c++ with multi-files
- Dancing Links algorithm
The Sudoku is generated by these steps:
- Fill 11 blocks randomly and validly (10 blocks is also ok). Dancing Links is used to check whether it is valid or not.
- Use Dancing Links to fill the whole grids.
- Remove the number in a block randomly and then check whether there is just one sulotion. If not, restore the block and choose another block randomly.
- Remove a certain number (according to the difficulty) of blocks to get the Sudoku.