packages feed

swarm-0.7.0.0: data/scenarios/Tutorials/grab.yaml

version: 1
name: Grab
description: |
  Learn how to interact with the world by grabbing entities.
objectives:
  - goal:
      - Previously you learned how to make new things (like a `branch predictor`{=entity}) from ingredients. Now you will learn how to obtain the ingredients you need.
      - There are some `tree`{=entity}s ahead of your robot; `move` to each one and `grab` it.
      - You can learn more by reading about the grabber device in your inventory.  Remember, if the description does not fit in the lower left info box, you can either hit **Enter** to pop out the description, or focus the info box in order to scroll.
    condition: |
      try {
        t <- as base {count "tree"};
        pure (t >= 6);
      } { pure false }
solution: |
  move;
  move; grab;
  move; grab;
  move; grab;
  move; grab;
  move; grab;
  move; grab;
robots:
  - name: base
    dir: east
    devices:
      - treads
      - grabber
      - logger
      - compass
    inventory:
      - [0, tree]
world:
  palette:
    '>': [grass, null, base]
    '.': [grass]
    'T': [grass, tree]
    '+': [stone, wall]
  upperleft: [-1, 1]
  map: |
    ++++++++++
    +>.TTTTTT+
    ++++++++++