Skip to content

Cross sums (also known as "Kakuro") puzzle solver.

Notifications You must be signed in to change notification settings

InDevRus/cross_sums

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cross sums

Project can solve cross sums puzzle (also known as "Kakuro").

How to use it?

py cross_sums [-h] [-v] [-f FILE] [-l n]

Cross sums (also known as "Kakuro") puzzle solver.

optional arguments:
  -h, --help            show this help message and exit
  -v, --visual          launch visual interface
  -f FILE, --file FILE  file with cross sums puzzle
  -l n, --limit n       limit of possible solutions (integer or asterisk)

Solve puzzle written in file.

py cross_sums -f "file.txt"

Solve puzzle from STDIN.

py cross_sums < "file.txt"

Get first 5 solutions.

py cross_sums -l 5 -f "file.txt"

Get all solutions.

py cross_sums -l * -f "file.txt"

Example of input

Let's select for example this puzzle.

Example

In the described language it can be written as:

\   23\ 30\   \     \     27\ 12\ 16\
\16 _   _     \     17\24 _   _   _
\17 _   _     15\29 _     _   _   _
\35 _   _     _     _     _   12\ \
\   \7  _     _     7\8   _   _   7\
\   11\ 10\16 _     _     _   _   _
\21 _   _     _     _     \5  _   _
\6  _   _     _     \     \3  _   _

Note that multiple spaces inserted only with an aesthetic purpose to make input seem less complicated. There is absolutely no difference between one and multiple spaces!

Output

Output will be dispatched in the same style.

GUI

Graphic interface can be simply ran this way.

py cross_sums -v

Tests

Tests can be simply launched via

python -m unittest

About

Cross sums (also known as "Kakuro") puzzle solver.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages