SudokuTS is a TypeScript implementation of the well-known Sudoku game. It includes a fully functional solver, that is a solver that tries to solve a sudoku puzzle like an human being would. The Solver is heavily based on the strategies described in Andrew Stuart's SudokuWiki. Also a backtracking solver, called "Backtracker", is implemented. This backtracker is implemented via 'Dancing Links' as described by Donald Knuth. A modification to this backtracker, that finds a single solution to a potential puzzle is also implemented. Eventually a generator of sudoku puzzles will follow. The generator will be able to categorize puzzles into different difficulty levels.
Finally it's planned to add a Browser-based GUI.
In order to build the SudokuTS, ensure that you have Git and Node.js (including NPM) installed.
Clone a copy of the repo:
git clone https://github.com/emanuel-minetti/sudokuTS.git
Change into the sudokuTS directory:
cd sudokuTS/
Install dependencies and compile TypeScript:
npm install
Test installation:
node src/sudoku_cli.js -h
should print a help text.
Included in the repo are a lot of example sudoku. The examples can be run like so:
node src/sudoku_cli.js -s --file examples/y_wing.txt
Principles include:
- DRY (Don't repeat yourself)
- Use JavaScript's functional programming wherever it helps making the code more readable
- KISS ("Keep it simple, stupid")
- SOLID principles should be observed
Fell free to report any found bugs, problems or feature requests on the Issues page.
If you like to get involved in coding, it would be best you'll write an e-mail.
- Implement the generator
- Implement the GUI
- Improve the solver