Sudoku generator for node
(note: not yet on npm)
$ npm install --save sudoku-generator
var sudoku = require('sudoku-generator');
sudoku(9); ## 9x9 grid
sudoku(6); ## 6x6 grid
$ ./sudoku-generator.js 6 --show-solution
[[_ _ 6 _ 3 _]
[2 _ _ 5 _ _]
[6 _ _ 3 _ _]
[3 _ 4 _ _ _]
[4 _ _ _ _ 6]
[_ 6 _ _ 5 _]]
[[5 4 6 2 3 1]
[2 1 3 5 6 4]
[6 5 1 3 4 2]
[3 2 4 6 1 5]
[4 3 5 1 2 6]
[1 6 2 4 5 3]]
npm install # install dependencies
grunt test # run jslint and unit tests
grunt coverage # run coverage report
grunt watch # watches files and runs unit tests on changed files.
Unit test and coverage tests are wired up to TravisCI and run on every push.
MIT © David Lai
Version | Tag | Published |
---|---|---|
0.0.0 | latest | 8yrs ago |