diff options
| author | Tom Harley | 2019-02-21 16:30:32 +0000 |
|---|---|---|
| committer | Tom Harley | 2019-02-21 16:30:32 +0000 |
| commit | da3b449ee61fc03eef5f19a8189d4cfcfd000674 (patch) | |
| tree | fca322d037a30bfd7bb284cba371f55de81a4f1a /rules | |
| parent | Add rules file for Canfield (diff) | |
| download | metasol-da3b449ee61fc03eef5f19a8189d4cfcfd000674.tar.gz metasol-da3b449ee61fc03eef5f19a8189d4cfcfd000674.zip | |
Clean up rule description files
The files for describing rules have changed a bit: they are no longer .json files (although they are still parsed by a JSON parser). The description files are now their own format, with a little less boilerplate required than for JSON files.
As a result, rule description files can be given shebangs and be made executable, allowing a user to run the rule file instead of centre directly. The rules files in the repository are set up to run centre if it is on the user’s path.
Diffstat (limited to 'rules')
| -rwxr-xr-x | rules/canfield | 16 | ||||
| -rw-r--r-- | rules/canfield.json | 16 | ||||
| -rwxr-xr-x | rules/golf | 9 | ||||
| -rw-r--r-- | rules/golf.json | 9 | ||||
| -rwxr-xr-x | rules/klondike | 16 | ||||
| -rw-r--r-- | rules/klondike.json | 16 | ||||
| -rwxr-xr-x | rules/willothewisp | 12 | ||||
| -rw-r--r-- | rules/willothewisp.json | 12 |
8 files changed, 53 insertions, 53 deletions
diff --git a/rules/canfield b/rules/canfield new file mode 100755 index 0000000..f6d5786 --- /dev/null +++ b/rules/canfield @@ -0,0 +1,16 @@ +#!centre + +tableau-size: 4 +build-policy: red-black +move-built-group: yes +spaces-policy: reserve-first + +foundations-initialised: one +foundations-base: random + +cards-in-stock: 34 +stock-deal-count: 3 +stock-redeal: true + +cards-in-reserve: 13 +reserve-stacked: true diff --git a/rules/canfield.json b/rules/canfield.json deleted file mode 100644 index 4a527a8..0000000 --- a/rules/canfield.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "tableau size": 4, - "build policy": "red-black", - "move built group": "yes", - "spaces policy": "reserve first", - - "foundations initialised": "one", - "foundations base": "random", - - "cards in stock": 34, - "stock deal count": 3, - "stock redeal": true, - - "cards in reserve": 13, - "reserve stacked": true -} diff --git a/rules/golf b/rules/golf new file mode 100755 index 0000000..ef7a6b0 --- /dev/null +++ b/rules/golf @@ -0,0 +1,9 @@ +#!centre + +tableau-size: 7 +build-policy: no-build +foundations-present: false +cards-in-stock: 16 +stock-deal-type: stock-to-hole +hole: true +hole-build-loops: true diff --git a/rules/golf.json b/rules/golf.json deleted file mode 100644 index 67684dd..0000000 --- a/rules/golf.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "tableau size": 7, - "build policy": "no build", - "foundations present": false, - "cards in stock": 16, - "stock deal type": "stock to hole", - "hole present": true, - "hole build loops": true -} diff --git a/rules/klondike b/rules/klondike new file mode 100755 index 0000000..18510de --- /dev/null +++ b/rules/klondike @@ -0,0 +1,16 @@ +#!centre + +tableau-size: 7 +build-policy: red-black +spaces-policy: kings +move-built-group: yes +group-build-policy: red-black + +diagonal-deal: true +face-up-policy: top + +foundations-removable: true + +cards-in-stock: 24 +stock-deal-count: 3 +stock-redeal: true diff --git a/rules/klondike.json b/rules/klondike.json deleted file mode 100644 index 88af397..0000000 --- a/rules/klondike.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "tableau size": 7, - "build policy": "red-black", - "spaces policy": "kings", - "move built group": "yes", - "group build policy": "red-black", - - "diagonal deal": true, - "face up policy": "top", - - "foundations removable": true, - - "cards in stock": 24, - "stock deal count": 3, - "stock redeal": true -} diff --git a/rules/willothewisp b/rules/willothewisp new file mode 100755 index 0000000..1235f3c --- /dev/null +++ b/rules/willothewisp @@ -0,0 +1,12 @@ +#!centre + +tableau-size: 7 +build-policy: any-suit +move-built-group: yes +group-build-policy: same-suit +face-up-policy: all + +foundations-only-complete-pile-moves: false + +cards-in-stock: 31 +stock-deal-type: stock-to-tableau diff --git a/rules/willothewisp.json b/rules/willothewisp.json deleted file mode 100644 index 5869795..0000000 --- a/rules/willothewisp.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "tableau size": 7, - "build policy": "any-suit", - "move built group": "yes", - "group build policy": "same-suit", - "face up policy": "all", - - "foundations only complete pile moves": false, - - "cards in stock": 31, - "stock deal type": "stock to tableau" -} |
