This is a open-source validator for advanced sudoku's, it is based on the sudoku community from crackingthecryptic.com (Discord link).
- Install the package:
$ npm install herbdoku-validator
- When installed, you can import the library using
import
orrequire
:
import { Herbdoku } from "herbdoku-validator";
- Create a new instance of Herbdoku:
const herbdoku = new Herbdoku("1234341223414123", 4);
- Validate de sudoku by concatenating methods. Add build to get the final result:
herbdoku.validateRows().validateColumns().validateBoxes().build();
- Or use the
validateDefault()
-method to get the basic sudoku validation at once:
herbdoku.validateDefault().build();
- Normal sudoku validation including the validation of rows, columns and boxes.
- Validation of kropki dots, both white and black, with a possibility to a different value to the kropki dot.
- Validation of thermometers, with the option to set the speed of the thermometer yourself.
The vision of this project is to give everyone (the sudoku solvers and the sudoku setters) access to a powerful sudoku validator that doesn't only validate ordinary sudoku, but also more advanced sudoku rules.
Especially front-end developers of sudokupads might like something like this.
This is an open-source project and such everyone is free to contribute (NOTE: Not every contributor will necessarily be explicitly mentioned. This might change in the future.)
For the license, see LICENSE.