packages feed

swarm-0.4: 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`{=entity} and the proper ingredients.  For
        example, `make "circuit"` will make a `circuit`{=entity}.
      - Your base has a few `tree`{=entity}s in its inventory. Select them to see the
        available recipes.
      - Your goal is to make a `branch predictor`{=entity}, so you will have to make
        some `branch`{=entity}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]`{=snippet}
    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:
  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: |
    ┌─┐
    │Ω│
    └─┘