-
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
47 changed files
with
623 additions
and
252 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,56 @@ | ||
version: 1 | ||
name: Demo custom terrain | ||
description: | | ||
Colorful new terrain | ||
creative: false | ||
terrains: | ||
- name: beach | ||
attr: gold | ||
description: | | ||
Shoreline covering, laborious to cross | ||
objectives: | ||
- goal: | ||
- | | ||
Make an enclosed volume of 14 cells | ||
condition: | | ||
as base { | ||
let targetVolume = 14 in | ||
vol <- volume targetVolume; | ||
return $case vol (\_. false) (\x. x == targetVolume); | ||
} | ||
solution: | | ||
noop | ||
robots: | ||
- name: base | ||
dir: east | ||
devices: | ||
- ADT calculator | ||
- treads | ||
- dozer blade | ||
- logger | ||
- branch predictor | ||
- comparator | ||
entities: | ||
- name: monolith | ||
display: | ||
char: '@' | ||
description: | ||
- Pushable rock | ||
properties: [known, unwalkable, pickable] | ||
known: [] | ||
world: | ||
dsl: | | ||
{grass} | ||
palette: | ||
'B': [grass, null, base] | ||
'.': [grass] | ||
'i': [ice] | ||
'b': [beach] | ||
upperleft: [-1, 1] | ||
map: | | ||
B....... | ||
........ | ||
iiiiiiii | ||
iiiiiiii | ||
bbbbbbbb | ||
bbbbbbbb |
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,46 @@ | ||
{ | ||
"$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": { | ||
"default": "entity", | ||
"type": "string", | ||
"examples": [ | ||
"entity", | ||
"device", | ||
"plant", | ||
"rock", | ||
"wood", | ||
"flower", | ||
"rubber", | ||
"copper", | ||
"copper'", | ||
"iron", | ||
"iron'", | ||
"quartz", | ||
"silver", | ||
"gold", | ||
"snow", | ||
"sand", | ||
"fire", | ||
"red", | ||
"green", | ||
"blue", | ||
"water" | ||
], | ||
"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.