aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvg <vgm+dev@devys.org>2020-04-27 19:49:07 +0200
committervg <vgm+dev@devys.org>2020-04-27 19:49:07 +0200
commitd7f39c3414dc37ed0bfe63fae5b898b1797c150c (patch)
tree14c94198f5f842b2da6aba21b90cfcee14a17cb3
parentb709d8ec44797a9133bfa89e1b85a60b1dbe92a3 (diff)
parent9de0c8e4bf59f1cac8a40fd2b5c37eb4837aa9be (diff)
downloadkana_quest_solver-d7f39c3414dc37ed0bfe63fae5b898b1797c150c.tar.gz
kana_quest_solver-d7f39c3414dc37ed0bfe63fae5b898b1797c150c.tar.bz2
kana_quest_solver-d7f39c3414dc37ed0bfe63fae5b898b1797c150c.zip
Merge git://barty/
-rw-r--r--kana_quest_level/template_level_X.X.yaml (renamed from kana_quest_level/level_template.yaml)0
-rw-r--r--readme.rst5
-rwxr-xr-xsolver.py8
3 files changed, 9 insertions, 4 deletions
diff --git a/kana_quest_level/level_template.yaml b/kana_quest_level/template_level_X.X.yaml
index 6500bf0..6500bf0 100644
--- a/kana_quest_level/level_template.yaml
+++ b/kana_quest_level/template_level_X.X.yaml
diff --git a/readme.rst b/readme.rst
index 52d367a..40391a5 100644
--- a/readme.rst
+++ b/readme.rst
@@ -22,3 +22,8 @@ Example file `level_XX.XX.yaml`::
**WARNING** in level file definition:
The kana 'no' need to be protected else the program convert it into False...
+
+Run::
+ ./solver.py kana_quest_level/level_4.6.yaml
+ ./solver.py -p kana_quest_level/level_4.6.yaml
+ ./solver.py -h
diff --git a/solver.py b/solver.py
index 228f986..cb445dd 100755
--- a/solver.py
+++ b/solver.py
@@ -9,7 +9,7 @@ Usage: solver.py -h|--help
Options:
-h, --help Display this help message
- -P Display solution without parents
+ -p Display solution with parents [DEFAULT is without parents]
'''
import copy
@@ -524,10 +524,10 @@ def main():
grid.update_score()
if grid.score >= target_score:
print("="*80)
- if args['-P']:
- print(grid)
- else:
+ if args['-p']:
print(repr_grid_with_parents(grid))
+ else:
+ print(grid)