swarm-0.6.0.0: data/scenarios/Testing/201-require/201-require-device-creative1.yaml
version: 1
name: Require existing device in creative mode
description: |
Require a device the base has using the 'require' command in creative mode.
https://github.com/swarm-game/swarm/issues/201
objectives:
- condition: |
try {
r <- robotNumbered 1;
p <- as r {whereami};
boatEquipped <- as r {equipped "boat"};
b1 <- as r {count "boat"};
b0 <- as base {count "boat"};
return (p == (2,0) && b0 == 1 && boatEquipped && b1 == 0);
} { return false }
creative: true
solution: |
build {require "boat"; move; move}
robots:
- name: base
loc: [0, 0]
dir: east
devices:
- logger
- 3D printer
inventory:
- [1, boat]
world:
palette:
'.': [grass]
'~': [dirt, knownwater]
'┌': [stone, upper left corner]
'┐': [stone, upper right corner]
'└': [stone, lower left corner]
'┘': [stone, lower right corner]
'─': [stone, horizontal wall]
'│': [stone, vertical wall]
upperleft: [-1, 1]
map: |
┌───┐
│.~.│
└───┘
entities:
- name: knownwater
display:
attr: water
char: ' '
description:
- An infinite ocean of water.
properties: [known, pickable, growable, liquid]
growth: [0, 0]
yields: water