This repository is a simple implementation of classic game Sudoku. Different with the normal Sudoku, I also implement the solver of Sudoku which can let the computer to solve the Sudoku by input a Sudoku question.
- More information about "Sudoku"
NOTICE: This repository is a project in NCKU course "Program Design 2". If you are taking this course, please do not duplicate from this repository. All rights reserved.
NOTICE: All source files are in the folder
src/
Makefile
: For compilationSudoku.h
:- Include all header files needed
- Define the class of Sudoku
Sudoku.cpp
:- Define the constructor
- Define all the method of the class
Sudoku
- For
GiveQuestion()
:- Set the initial Sudoku map
- Use the initial map to random a new map (by using swap the rows and cells)
- Output the the Sudoku map
- For
ReadIn()
andSolve()
:- Collect the statistics of all possible number in blank
- Solve the blank which has only one possible number
- Brute force: Guess all other blanks
- Output the result of Sudoku
- Unsolvable
- Exactly one solution
- More than one solution
give_question.cpp
: Test the functionGiveQuestion()
soleve.cpp
: Test the functionsReadIn()
andSolve()
- Compilation
# Make sure your current directory is in "src/" $ make
- Execution
# Make sure your current directory is in "src/" # To test "GiveQuestion()": $ ./give_question # To test "ReadIn()" and "Solve()": $ ./solve
NOTICE: You can follow the contributing process CONTRIBUTING.md to join me. I am very welcome any issue!
NOTCIE: This repository is the assignment in NCKU course "Program Design 2". If you are taking this course, please do not duplicate from this repository. All rights reserved.