From da3b449ee61fc03eef5f19a8189d4cfcfd000674 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Thu, 21 Feb 2019 16:30:32 +0000 Subject: 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. --- rules/canfield | 16 ++++++++++++++++ rules/canfield.json | 16 ---------------- rules/golf | 9 +++++++++ rules/golf.json | 9 --------- rules/klondike | 16 ++++++++++++++++ rules/klondike.json | 16 ---------------- rules/willothewisp | 12 ++++++++++++ rules/willothewisp.json | 12 ------------ 8 files changed, 53 insertions(+), 53 deletions(-) create mode 100755 rules/canfield delete mode 100644 rules/canfield.json create mode 100755 rules/golf delete mode 100644 rules/golf.json create mode 100755 rules/klondike delete mode 100644 rules/klondike.json create mode 100755 rules/willothewisp delete mode 100644 rules/willothewisp.json (limited to 'rules') 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" -} -- cgit v1.2.1