diff options
| author | thecharlesblake | 2017-10-23 22:01:18 +0100 |
|---|---|---|
| committer | thecharlesblake | 2017-10-26 14:51:33 +0100 |
| commit | e9693380d952552319b2cdd3f183e2e676676f95 (patch) | |
| tree | ca02b06786c13e2680144079c9e2969e654ba1a2 /resources | |
| parent | Add simple black hole cmdline parse & err handling (diff) | |
| download | metasol-e9693380d952552319b2cdd3f183e2e676676f95.tar.gz metasol-e9693380d952552319b2cdd3f183e2e676676f95.zip | |
Add deal file parsing and verifying
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/input-file-schema.json | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/resources/input-file-schema.json b/resources/input-file-schema.json new file mode 100644 index 0000000..2086eb0 --- /dev/null +++ b/resources/input-file-schema.json @@ -0,0 +1,35 @@ +{ + "$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 cards": { + "type": "array", + "items": { + "$ref": "#/definitions/card" + } + } + }, + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "tableau piles" + ] + } + ] +}
\ No newline at end of file |
