sudoku-generator

0.0.0 • Public • Published

NPM version Build Status Dependency Status

Sudoku generator for node

Install

(note: not yet on npm)

$ npm install --save sudoku-generator

Usage as library

var sudoku = require('sudoku-generator');
 
sudoku(9); ## 9x9 grid
sudoku(6); ## 6x6 grid
 
 

Usage as command line (use --help to show options)

    $ ./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]]

Dev Notes

    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.

License

MIT © David Lai

Package Sidebar

Install

npm i sudoku-generator

Weekly Downloads

2

Version

0.0.0

License

MIT

Last publish

Collaborators

  • dlai0001