From 2554a972e867a87192e734b3d0960d40eab2360b Mon Sep 17 00:00:00 2001 From: Marianne Chevrot Date: Mon, 27 Apr 2020 19:30:11 +0200 Subject: Change default behaviour (for parents printing) --- readme.rst | 5 +++++ solver.py | 8 ++++---- 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) -- cgit v1.2.3 From 9de0c8e4bf59f1cac8a40fd2b5c37eb4837aa9be Mon Sep 17 00:00:00 2001 From: Marianne Chevrot Date: Mon, 27 Apr 2020 19:38:55 +0200 Subject: Rename level template file --- kana_quest_level/level_template.yaml | 9 --------- kana_quest_level/template_level_X.X.yaml | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 kana_quest_level/level_template.yaml create mode 100644 kana_quest_level/template_level_X.X.yaml diff --git a/kana_quest_level/level_template.yaml b/kana_quest_level/level_template.yaml deleted file mode 100644 index 6500bf0..0000000 --- a/kana_quest_level/level_template.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# kana quest grid level 1.1 -size: [1, 1] -max_actions: 1 -target_score: 1 -grid: [ - [void, null], [myst, su ], [rock, hu ], [norm, ku ], [froz, nu ], - [empt, null], [empt, null], [empt, null], [empt, null], [empt, null], -] -# The kana 'no' need to be protected else the program convert it into False... diff --git a/kana_quest_level/template_level_X.X.yaml b/kana_quest_level/template_level_X.X.yaml new file mode 100644 index 0000000..6500bf0 --- /dev/null +++ b/kana_quest_level/template_level_X.X.yaml @@ -0,0 +1,9 @@ +# kana quest grid level 1.1 +size: [1, 1] +max_actions: 1 +target_score: 1 +grid: [ + [void, null], [myst, su ], [rock, hu ], [norm, ku ], [froz, nu ], + [empt, null], [empt, null], [empt, null], [empt, null], [empt, null], +] +# The kana 'no' need to be protected else the program convert it into False... -- cgit v1.2.3