Skip to content

wangnangg/sudoku-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sudoku Tool

This cli tool can be used to generate, solve and grade sudoku puzzles.

To compile:

make config=release

To generate 5 puzzles with a difficulty level between 100 and 200 with a maximum iteration number of 10000:

$ build/release/sdtool generate 5 100 200 10000
200 063075000570400000000008000000000107040200050100060003704009030018000000000020708 863975214571432869492618375256394187347281956189567423724859631618743592935126748
141 020100000005004080630050000000000007100800090400003200700210900060000030000000170 824137659915624783637958421392561847176842395458793216783215964261479538549386172
108 080000000400106000000300540507000160000000000001080009070600050010005000640200080 789452613453176892126398547537924168894761325261583479378619254912845736645237981
118 530070690060001000000080000000000005007900006890500001003000000000000520010002703 531274698768391452429685317342816975157923846896547231283759164674138529915462783
118 009200300300800060085900000700050000400000000000790050006080000000600079008020014 649271385317845962285936147792158436451362798863794251176489523524613879938527614

The first number is the difficult level. The second number is the sudoku puzzle. The third one is the solution.

To solve a puzzle:

$ build/release/sdtool solve 063075000570400000000008000000000107040200050100060003704009030018000000000020708
863975214571432869492618375256394187347281956189567423724859631618743592935126748

To assess the difficulty level of a puzzle:

$ build/release/sdtool grade 063075000570400000000008000000000107040200050100060003704009030018000000000020708
200

Releases

No releases published

Packages

No packages published