Skip to content

A simple and powerful sudoku solver that supports multiple game patterns up to 16x16.

License

Notifications You must be signed in to change notification settings

worgho2/sudoku-multi-solver

Repository files navigation

sudoku-multi-solver

npm npm license GitHub Workflow Status

A simple and powerful sudoku solver that supports multiple game patterns up to 16x16.

Install

npm install sudoku-multi-solver

yarn add sudoku-multi-solver

Usage

import SudokuSolver from 'sudoku-multi-solver';

const board = [
    [-1, 3, -1, -1, -1],
    [5, -1, -1, -1, -1],
    [-1, 1, -1, -1, -1],
    [-1, -1, 4, -1, -1],
    [-1, -1, -1, 5, -1],
];

const solver = new SudokuSolver({
    board,
    emptyIdentifier: -1,
    pattern: '5_cross',
});
await solver.solve();

// OR

await SudokuSolver.from({ board }).setEmptyIdentifier(-1).setPattern('5_cross').solve();

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to the project.

Versioning

SemVer is used for versioning.

License

This project is licensed under the MIT License - see the LICENSE file for details