swarm-0.4: data/scenarios/Tutorials/equip.yaml
version: 1
name: Equip
description: |
Learn how to equip devices and gain new capabilities.
objectives:
- goal:
- You know how to `grab` things lying around, so you are ready to get
an upgrade!
By equipping devices, you learn new capabilities which allow you to
perform more complex commands.
- Before you start building new robots in the later tutorials, you need
to gain the `build` capability.
Try typing `build {}` - you should get an error telling you that you
need to equip a `3D printer`{=entity}.
- |
Fortunately, there is a `3D printer`{=entity} lying nearby. Go `grab` it, then
`equip` it with `equip "3D printer"`.
- |
You win by building your first robot:
- |
```
build {}
```
condition: |
try {
_ <- robotNumbered 1;
return true;
} { return false }
solution: |
turn south; move; grab; equip "3D printer"; build {};
robots:
- name: base
dir: [1,0]
devices:
- logger
- treads
- compass
- grabber
- welder
inventory:
- [10, solar panel]
- [10, logger]
known: [3D printer, water]
world:
palette:
'>': [grass, null, base]
'.': [grass]
'~': [ice, water]
'3': [grass, 3D printer]
'┌': [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: |
┌───┐
│>..│
│3..│
│~~~│
└───┘