swarm-0.1.0.0: data/scenarios/Tutorials/install.yaml
version: 1
name: Install
description: |
Learn how to install devices and gain new capabilities.
objectives:
- goal:
- You know how to `grab` things lying around, so you are ready to get
an upgrade!
By installing 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 install a "3D printer".
- |
Fortunately, there is a 3D printer lying nearby. Go `grab` it, then
install it on yourself with `install base "3D printer"`.
- |
You win by building your first robot:
- |
build {log "Hello World!"}
condition: |
try {
_ <- robotNumbered 1;
return true;
} { return false }
solution: |
turn south; move; grab; install base "3D printer"; build {log "Hello World!"};
robots:
- name: base
dir: [1,0]
devices:
- logger
- treads
- compass
- grabber
inventory:
- [10, solar panel]
- [10, logger]
known: [3D printer, water]
world:
default: [blank]
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..│
│~~~│
└───┘