swarm-0.3.0.0: data/scenarios/Tutorials/craft.yaml
version: 1
name: Crafting
description: |
Learn how to make new things using recipes.
#
# The players should read the recipes and acquaint themselves with the UI.
# This also motivates the next tutorial about obtaining entities.
#
objectives:
- goal:
- Robots can use the `make` command to make things, as long as
they have a `workbench` and the proper ingredients. For
example, `make "circuit"` will make a circuit.
- Your base has a few trees in its inventory. Select them to see the
available recipes.
- Your goal is to make a "branch predictor", so you will have to make
some "branch"es first.
- |
Note: when used after opening quotes in the REPL, the Tab key can cycle through
possible completions of a name. E.g., type:
- |
> make "br[Tab][Tab]
condition: |
try {
as base {has "branch predictor"}
} { return false }
solution: |
make "branch"; make "branch predictor"
robots:
- name: base
display:
attr: robot
char: 'Ω'
dir: [1,0]
devices:
- workbench
- logger
inventory:
- [10, tree]
world:
default: [blank]
palette:
'Ω': [grass, null, base]
'┌': [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: |
┌─┐
│Ω│
└─┘