aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarianne Chevrot <blackmoor+git@devys.org>2020-04-27 19:30:11 +0200
committerMarianne Chevrot <blackmoor+git@devys.org>2020-04-27 19:37:22 +0200
commit2554a972e867a87192e734b3d0960d40eab2360b (patch)
treea52b654945b0d2487e49f19763e10407aa85c248
parent71243c11c450cab06a33ba370d12a3b3f3ef0a5c (diff)
downloadkana_quest_solver-2554a972e867a87192e734b3d0960d40eab2360b.tar.gz
kana_quest_solver-2554a972e867a87192e734b3d0960d40eab2360b.tar.bz2
kana_quest_solver-2554a972e867a87192e734b3d0960d40eab2360b.zip
Change default behaviour (for parents printing)
-rw-r--r--readme.rst5
-rwxr-xr-xsolver.py8
2 files changed, 9 insertions, 4 deletions
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 7a5ce13..b75b735 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
@@ -512,10 +512,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)