swarm-0.6.0.0: data/scenarios/Testing/795-prerequisite/795-prerequisite-mutually-exclusive.yaml
version: 1
name: |
Mutually exclusive prerequisites
description: |
Complete an objective with a prerequisite of either of two other objectives.
objectives:
- goal:
- Either obtain a "furnace" WITHOUT a "flower", or obtain both a "wooden gear" and "flower".
condition: |
return true;
prerequisite:
previewable: true
logic:
or:
- and:
- id: have_furnace
- not:
id: have_flower
- and:
- id: have_gear
- id: have_flower
- 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
- id: have_flower
goal:
- Possess a "flower".
condition: |
as base {has "flower"};
optional: true
solution: |
make "furnace"
robots:
- name: base
display:
char: 'Ω'
attr: robot
dir: north
devices:
- workbench
- grabber
inventory:
- [2, board]
- [5, rock]
world:
palette:
'x': [grass, flower, base]
upperleft: [0, 0]
map: |
x