aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorCharlie Blake2018-07-06 17:27:39 +0100
committerGitHub2018-07-06 17:27:39 +0100
commit0e685d6e4a343daab945f5fb7d0cf250c077b6ff (patch)
tree634eede8d39d3e313c1206cb2b9a6f6205570f8c /resources
parentMerge pull request #74 from thecharlesblake/sol-streamliner-variants (diff)
parentRefactor k-plus impl to simplify and fix deal1 bug (diff)
downloadmetasol-0e685d6e4a343daab945f5fb7d0cf250c077b6ff.tar.gz
metasol-0e685d6e4a343daab945f5fb7d0cf250c077b6ff.zip

Merge pull request #75 from thecharlesblake/refactor-rules-json

Refactor rules json

Diffstat (limited to 'resources')
-rw-r--r--resources/positional_games.json22
-rw-r--r--resources/rules-presets/alpha-star.json8
-rw-r--r--resources/rules-presets/bakers-dozen.json7
-rw-r--r--resources/rules-presets/black-hole.json8
-rw-r--r--resources/rules-presets/canfield.json9
-rw-r--r--resources/rules-presets/default.json23
-rw-r--r--resources/rules-presets/flower-garden.json7
-rw-r--r--resources/rules-presets/fortunes-favor.json8
-rw-r--r--resources/rules-presets/free-cell.json6
-rw-r--r--resources/rules-presets/input-file-schema.json32
-rw-r--r--resources/rules-presets/simple-alpha-star.json9
-rw-r--r--resources/rules-presets/simple-bakers-dozen.json8
-rw-r--r--resources/rules-presets/simple-black-hole.json9
-rw-r--r--resources/rules-presets/simple-canfield.json10
-rw-r--r--resources/rules-presets/simple-flower-garden.json8
-rw-r--r--resources/rules-presets/simple-fortunes-favor.json9
-rw-r--r--resources/rules-presets/simple-free-cell.json8
-rw-r--r--resources/rules-presets/simple-somerset.json9
-rw-r--r--resources/rules-presets/simple-spanish-patience.json7
-rw-r--r--resources/rules-presets/simple-spider.json13
-rw-r--r--resources/rules-presets/somerset.json8
-rw-r--r--resources/rules-presets/spanish-patience.json6
-rw-r--r--resources/rules-presets/spider.json12
23 files changed, 22 insertions, 224 deletions
diff --git a/resources/positional_games.json b/resources/positional_games.json
new file mode 100644
index 0000000..3339379
--- /dev/null
+++ b/resources/positional_games.json
@@ -0,0 +1,22 @@
+{
+ "gaps": {
+ "sequences": {
+ "count": 4,
+ "from": "any",
+ "to": "spaces",
+ "spaces policy": "increasing neighbour same-suit",
+ "victory": "ascending same-suit"
+ },
+ "foundations": true,
+ "foundations initial card": true
+ },
+ "accordion": {
+ "sequences": {
+ "count": 1,
+ "from": ["1R", "3R"],
+ "to": ["same-suit", "same-rank"],
+ "spaces policy": "remove",
+ "victory": "single pile"
+ }
+ }
+} \ No newline at end of file
diff --git a/resources/rules-presets/alpha-star.json b/resources/rules-presets/alpha-star.json
deleted file mode 100644
index fde3ac4..0000000
--- a/resources/rules-presets/alpha-star.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "tableau piles": {
- "count": 12,
- "build policy": "same-suit",
- "move built group": true
- },
- "foundations initial card": true
-} \ No newline at end of file
diff --git a/resources/rules-presets/bakers-dozen.json b/resources/rules-presets/bakers-dozen.json
deleted file mode 100644
index 4f63936..0000000
--- a/resources/rules-presets/bakers-dozen.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "tableau piles": {
- "count": 13,
- "spaces policy": "no-build"
- },
- "foundations removable": true
-} \ No newline at end of file
diff --git a/resources/rules-presets/black-hole.json b/resources/rules-presets/black-hole.json
deleted file mode 100644
index daab27c..0000000
--- a/resources/rules-presets/black-hole.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "tableau piles": {
- "count": 17,
- "build policy": "no-build"
- },
- "hole": true,
- "foundations": false
-} \ No newline at end of file
diff --git a/resources/rules-presets/canfield.json b/resources/rules-presets/canfield.json
deleted file mode 100644
index 5f36a72..0000000
--- a/resources/rules-presets/canfield.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "tableau piles": {
- "count": 4,
- "build policy": "red-black"
- },
- "stock size": 34,
- "reserve size": 14,
- "reserve stacked": true
-}
diff --git a/resources/rules-presets/default.json b/resources/rules-presets/default.json
deleted file mode 100644
index 47032d8..0000000
--- a/resources/rules-presets/default.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "tableau piles": {
- "count": 8,
- "build order": "descending",
- "build policy": "any-suit",
- "spaces policy": "any",
- "diagonal deal": false,
- "move built group": false,
- "move built group policy": "same-as-build"
- },
- "max rank": 13,
- "two decks": false,
- "hole": false,
- "foundations": true,
- "foundations initial card": false,
- "foundations removable": false,
- "foundations complete piles": false,
- "cells": 0,
- "stock size": 0,
- "stock deal type": "waste",
- "reserve size": 0,
- "reserve stacked": false
-} \ No newline at end of file
diff --git a/resources/rules-presets/flower-garden.json b/resources/rules-presets/flower-garden.json
deleted file mode 100644
index 92906fb..0000000
--- a/resources/rules-presets/flower-garden.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "tableau piles": {
- "count": 6
- },
- "reserve size": 16,
- "foundations removable": true
-}
diff --git a/resources/rules-presets/fortunes-favor.json b/resources/rules-presets/fortunes-favor.json
deleted file mode 100644
index b791561..0000000
--- a/resources/rules-presets/fortunes-favor.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "tableau piles": {
- "count": 12,
- "build policy": "same-suit"
- },
- "foundations initial card": true,
- "stock size": 36
-} \ No newline at end of file
diff --git a/resources/rules-presets/free-cell.json b/resources/rules-presets/free-cell.json
deleted file mode 100644
index 12c1bdf..0000000
--- a/resources/rules-presets/free-cell.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "tableau piles": {
- "build policy": "red-black"
- },
- "cells": 4
-} \ No newline at end of file
diff --git a/resources/rules-presets/input-file-schema.json b/resources/rules-presets/input-file-schema.json
deleted file mode 100644
index 1b55e4f..0000000
--- a/resources/rules-presets/input-file-schema.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "$schema": "http://json-schema.org/draft-04/schema#",
- "definitions": {
- "card": {
- "type": "string",
- "pattern": "^(?i)([A|[1-9]|1[0-3]|J|Q|K])([C|D|H|S])$"
- }
- },
- "type": "object",
- "properties": {
- "tableau piles": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/card"
- }
- }
- },
- "hole card": {
- "$ref": "#/definitions/card"
- }
- },
- "additionalProperties": false,
- "anyOf": [
- {
- "required": [
- "tableau piles"
- ]
- }
- ]
-} \ No newline at end of file
diff --git a/resources/rules-presets/simple-alpha-star.json b/resources/rules-presets/simple-alpha-star.json
deleted file mode 100644
index c80a82b..0000000
--- a/resources/rules-presets/simple-alpha-star.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "tableau piles": {
- "count": 3,
- "build policy": "same-suit",
- "move built group": true
- },
- "max rank": 6,
- "foundations initial card": true
-} \ No newline at end of file
diff --git a/resources/rules-presets/simple-bakers-dozen.json b/resources/rules-presets/simple-bakers-dozen.json
deleted file mode 100644
index 3f038fe..0000000
--- a/resources/rules-presets/simple-bakers-dozen.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "tableau piles": {
- "count": 3,
- "spaces policy": "no-build"
- },
- "max rank": 3,
- "foundations removable": true
-} \ No newline at end of file
diff --git a/resources/rules-presets/simple-black-hole.json b/resources/rules-presets/simple-black-hole.json
deleted file mode 100644
index 16ef52d..0000000
--- a/resources/rules-presets/simple-black-hole.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "tableau piles": {
- "count": 4,
- "build policy": "no-build"
- },
- "max rank": 5,
- "hole": true,
- "foundations": false
-}
diff --git a/resources/rules-presets/simple-canfield.json b/resources/rules-presets/simple-canfield.json
deleted file mode 100644
index 62a73c3..0000000
--- a/resources/rules-presets/simple-canfield.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "tableau piles": {
- "count": 3,
- "build policy": "red-black"
- },
- "max rank": 3,
- "stock size": 1,
- "reserve size": 2,
- "reserve stacked": true
-} \ No newline at end of file
diff --git a/resources/rules-presets/simple-flower-garden.json b/resources/rules-presets/simple-flower-garden.json
deleted file mode 100644
index eb7916c..0000000
--- a/resources/rules-presets/simple-flower-garden.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "tableau piles": {
- "count": 3
- },
- "max rank": 3,
- "reserve size": 3,
- "foundations removable": true
-}
diff --git a/resources/rules-presets/simple-fortunes-favor.json b/resources/rules-presets/simple-fortunes-favor.json
deleted file mode 100644
index 6f3cf61..0000000
--- a/resources/rules-presets/simple-fortunes-favor.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "tableau piles": {
- "count": 3,
- "build policy": "same-suit"
- },
- "max rank": 4,
- "foundations initial card": true,
- "stock size": 3
-} \ No newline at end of file
diff --git a/resources/rules-presets/simple-free-cell.json b/resources/rules-presets/simple-free-cell.json
deleted file mode 100644
index 226daf0..0000000
--- a/resources/rules-presets/simple-free-cell.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "tableau piles": {
- "count": 4,
- "build policy": "red-black"
- },
- "max rank": 4,
- "cells": 1
-} \ No newline at end of file
diff --git a/resources/rules-presets/simple-somerset.json b/resources/rules-presets/simple-somerset.json
deleted file mode 100644
index 555fddf..0000000
--- a/resources/rules-presets/simple-somerset.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "tableau piles": {
- "count": 4,
- "build policy": "red-black",
- "diagonal deal": true
- },
- "max rank": 2,
- "foundations removable": true
-} \ No newline at end of file
diff --git a/resources/rules-presets/simple-spanish-patience.json b/resources/rules-presets/simple-spanish-patience.json
deleted file mode 100644
index 2b27cb5..0000000
--- a/resources/rules-presets/simple-spanish-patience.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "tableau piles": {
- "count": 3
- },
- "max rank": 2,
- "foundations removable": true
-} \ No newline at end of file
diff --git a/resources/rules-presets/simple-spider.json b/resources/rules-presets/simple-spider.json
deleted file mode 100644
index 5982441..0000000
--- a/resources/rules-presets/simple-spider.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "tableau piles": {
- "count": 4,
- "build policy": "any-suit",
- "move built group": true,
- "move built group policy": "same-suit"
- },
- "foundations complete piles": true,
- "two decks": true,
- "max rank": 3,
- "stock size": 12,
- "stock deal type": "tableau piles"
-} \ No newline at end of file
diff --git a/resources/rules-presets/somerset.json b/resources/rules-presets/somerset.json
deleted file mode 100644
index fc3bdad..0000000
--- a/resources/rules-presets/somerset.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "tableau piles": {
- "count": 10,
- "build policy": "red-black",
- "diagonal deal": true
- },
- "foundations removable": true
-} \ No newline at end of file
diff --git a/resources/rules-presets/spanish-patience.json b/resources/rules-presets/spanish-patience.json
deleted file mode 100644
index 32c1dab..0000000
--- a/resources/rules-presets/spanish-patience.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "tableau piles": {
- "count": 13
- },
- "foundations removable": true
-} \ No newline at end of file
diff --git a/resources/rules-presets/spider.json b/resources/rules-presets/spider.json
deleted file mode 100644
index 6d08fba..0000000
--- a/resources/rules-presets/spider.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "tableau piles": {
- "count": 10,
- "build policy": "any-suit",
- "move built group": true,
- "move built group policy": "same-suit"
- },
- "foundations complete piles": true,
- "two decks": true,
- "stock size": 50,
- "stock deal type": "tableau piles"
-} \ No newline at end of file