swarm-0.7.0.0: data/scenarios/Testing/201-require/201-stock-entities-def.yaml
version: 1
name: Stock entities with definition
description: |
Stock some entities using the 'stock' command, and a definition.
https://github.com/swarm-game/swarm/issues/201
objectives:
- condition: |
try {
r <- robotNumbered 1;
p <- as r {whereami};
r1 <- as r {count "rock"};
r0 <- as base {count "rock"};
pure (p == (4,0) && r0 == 5 && r1 == 1);
} { pure false }
solution: |
def mp = move; place "rock" end;
build { log "hi"; stock 5 "rock"; mp; mp; mp; mp }
robots:
- name: base
loc: [0, 0]
dir: east
devices:
- 3D printer
- logger
- dictionary
inventory:
- [10, rock]
- [1, solar panel]
- [1, treads]
- [1, grabber]
- [1, logger]
world:
palette:
'.': [grass]
'+': [stone, wall]
upperleft: [-1, 1]
map: |
+++++++
+.....+
+++++++