chipulaja / algo-sudoku-generator
a library for generate sudoku
v1.0
2021-02-13 20:51 UTC
Requires
- php: >=7.2.0
Requires (Dev)
- phpunit/phpunit: ^8.5
- scrutinizer/ocular: ^1.8
- squizlabs/php_codesniffer: ^3.5
README
a library for generate sudoku.
Table of contents
Install
Via Composer
$ composer require chipulaja/algo-sudoku-generator
Usage
use Chipulaja\Algo\Sudoku\Generator; use Chipulaja\Algo\Sudoku\GeneratorHelper; $generator = new Generator(); $data = $generator->generate(); $helper = new GeneratorHelper(); echo $helper->getBoard($data); /* ----------------------- | 8 2 9 | 4 3 5 | 7 6 1 | | 5 7 4 | 6 1 8 | 3 2 9 | | 1 3 6 | 2 9 7 | 4 8 5 | ----------------------- | 3 1 8 | 5 7 6 | 2 9 4 | | 4 9 2 | 1 8 3 | 6 5 7 | | 7 6 5 | 9 4 2 | 1 3 8 | ----------------------- | 9 4 3 | 8 2 1 | 5 7 6 | | 2 5 1 | 7 6 9 | 8 4 3 | | 6 8 7 | 3 5 4 | 9 1 2 | ----------------------- */
Testing
$ vendor\bin\phpunit