cargo install sudoku-cli
sudoku-cli
will read from the file. Otherwise it treats the string as input. sudoku-cli
reads the first 81 non-whitespace characters from the input and fills each row from left to right,
starting with the top row.sudoku-cli
can output results to a file. The directory must already exist.sudoku-cli
has 5 sub-commands each with their own configurable options:
* sudoku-cli find-one
* -i=<value> | --input=<value>
* -t=<value> | --threads=<value>
* -o=<value> | --output=<value>
* -c | --compact
* sudoku-cli find-all
* -i=<value> | --input=<value>
* -t=<value> | --threads=<value>
* -o=<value> | --output=<value>
* -c | --compact
* sudoku-cli watch-one
* -i=<value> | --input=<value>
* -m=<value> | --ms-per-frame=<value>
* sudoku-cli watch-all
* -i=<value> | --input=<value>
* -m=<value> | --ms-per-frame=<value>
* sudoku-cli count-all
* -i=<value> | --input=<value>
* -t=<value> | --threads=<value>
## Examples
### Find One
Finds one possible solution to a sudoku puzzle.
sudoku-cli find-one --input=".75.....4.1...5.....8.7.........7.......6...1...8.2...3...9.7...5.3.4.........31."
### Find All
Finds all possible solutions to a sudoku puzzle.
sudoku-cli find-all --input=path/to/puzzle --threads=8 --output=solutions.txt --compact
### Watch One
Watch the solver find one solution to a sudoku puzzle.
sudoku-cli watch-one --input=path/to/puzzle
### Watch All
Watch the solver find all possible solutions to a sudoku puzzle.
sudoku-cli watch-all --input=path/to/puzzle --ms-per-frame=15
### Count All
Count the number of possible solutions without writing them to an output.
sudoku-cli count-all --input=path/to/puzzle --threads=8