-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
675 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
version: 1 | ||
name: Demo custom terrain | ||
description: | | ||
Colorful new terrain | ||
creative: false | ||
attrs: | ||
- name: beachsand | ||
bg: "#c2b280" | ||
- name: lava | ||
bg: "#dd7733" | ||
- name: lilac | ||
bg: "#a4a4bb" | ||
terrains: | ||
- name: beach | ||
attr: beachsand | ||
description: | | ||
Shoreline covering, laborious to cross | ||
- name: lava | ||
attr: lava | ||
description: | | ||
Scorching, liquid rock | ||
- name: heather | ||
attr: lilac | ||
description: | | ||
Flowery ground cover | ||
objectives: | ||
- goal: | ||
- | | ||
No entities should be here | ||
condition: | | ||
as base { | ||
isEmpty | ||
} | ||
solution: | | ||
noop | ||
robots: | ||
- name: base | ||
dir: east | ||
known: [] | ||
world: | ||
dsl: | | ||
{grass} | ||
palette: | ||
'B': [heather, null, base] | ||
'.': [heather] | ||
'i': [ice] | ||
'b': [beach] | ||
'v': [lava] | ||
upperleft: [0, 0] | ||
map: | | ||
vvvvvvvv | ||
vvvvvvvv | ||
B....... | ||
........ | ||
iiiiiiii | ||
iiiiiiii | ||
bbbbbbbb | ||
bbbbbbbb |
27 changes: 27 additions & 0 deletions
27
data/scenarios/Testing/_Validation/1775-invalid-terrain-attr.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: 1 | ||
name: Custom terrain - invalid attribute | ||
description: | | ||
Colorful new terrain | ||
creative: false | ||
attrs: | ||
- name: lava | ||
bg: "#dd7733" | ||
terrains: | ||
- name: lava | ||
attr: baklava | ||
description: | | ||
Scorching, liquid rock | ||
robots: | ||
- name: base | ||
dir: east | ||
known: [] | ||
world: | ||
dsl: | | ||
{grass} | ||
palette: | ||
'B': [grass, null, base] | ||
'.': [lava] | ||
upperleft: [0, 0] | ||
map: | | ||
B. | ||
.. |
27 changes: 27 additions & 0 deletions
27
data/scenarios/Testing/_Validation/1775-invalid-terrain-reference.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: 1 | ||
name: Custom terrain - invalid terrain reference | ||
description: | | ||
Colorful new terrain | ||
creative: false | ||
attrs: | ||
- name: lava | ||
bg: "#dd7733" | ||
terrains: | ||
- name: lava | ||
attr: lava | ||
description: | | ||
Scorching, liquid rock | ||
robots: | ||
- name: base | ||
dir: east | ||
known: [] | ||
world: | ||
dsl: | | ||
{grass} | ||
palette: | ||
'B': [grass, null, base] | ||
'.': [liver] | ||
upperleft: [0, 0] | ||
map: | | ||
B. | ||
.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://raw.githubusercontent.com/swarm-game/swarm/main/data/schema/terrain.json", | ||
"title": "Terrain", | ||
"description": "Description of a terrain in the Swarm game", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the terrain." | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "A description of the terrain." | ||
}, | ||
"attr": { | ||
"type": "string", | ||
"examples": [ | ||
"red", | ||
"ice", | ||
"dirt" | ||
], | ||
"description": "The name of the attribute that should be used to style the robot or entity. A list of currently valid attributes can be found [here](https://github.com/swarm-game/swarm/blob/main/src/Swarm/TUI/View/Attribute/Attr.hs)." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://raw.githubusercontent.com/swarm-game/swarm/main/data/schema/terrains.json", | ||
"title": "Entities", | ||
"description": "Description of terrain in the Swarm game", | ||
"type": "array", | ||
"items": { | ||
"$ref": "terrain.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
- name: stone | ||
attr: stone | ||
description: | | ||
Solid, impenetrable material | ||
- name: dirt | ||
attr: dirt | ||
description: | | ||
Soil amenable to plant growth | ||
- name: grass | ||
attr: grass | ||
description: | | ||
Soft, verdant ground | ||
- name: ice | ||
attr: ice | ||
description: | | ||
Cold, solid, and slippery. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.