Project can solve cross sums puzzle (also known as "Kakuro").
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"
Let's select for example this puzzle.
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 will be dispatched in the same style.
Graphic interface can be simply ran this way.
py cross_sums -v
Tests can be simply launched via
python -m unittest