packages feed

swarm-0.4: data/scenarios/Testing/795-prerequisite/795-prerequisite-and.yaml

version: 1
name: |
  Prerequisite objectives: AND
description: |
  Complete an objective with a prerequisite entailing both of two other objectives.
objectives:
  - goal:
      - Achieve both of two other objectives
    condition: |
      return true;
    prerequisite:
      previewable: true
      logic:
        and:
          - have_furnace
          - have_gear
  - id: have_furnace
    goal:
      - Make a "furnace".
    condition: |
      as base {has "furnace"};
    optional: true
  - id: have_gear
    goal:
      - Make a "wooden gear".
    condition: |
      as base {has "wooden gear"};
    optional: true
solution: |
  make "furnace";
  make "wooden gear";
robots:
  - name: base
    display:
      char: 'Ω'
      attr: robot
    dir: [0, 1]
    devices:
      - workbench
      - grabber
    inventory:
      - [2, board]
      - [5, rock]
world:
  palette:
    'x': [grass, null, base]
  upperleft: [0, 0]
  map: |
    x