packages feed

swarm-0.6.0.0: data/scenarios/Testing/1575-structure-recognizer/1575-overlapping-tiebreaker-by-location.yaml

version: 1
name: Structure recognizer - Tiebreaking overlaps by position
description: |
  A more lower-left overlapping structure of
  identical size should win the tiebreaker
creative: false
objectives:
  - teaser: Build structure
    prerequisite:
      not: wrong_structure
    goal:
      - |
        Build a `topleft`{=structure} structure
    condition: |
      foundStructure <- structure "topleft" 0;
      return $ case foundStructure (\_. false) (\_. true);
  - id: wrong_structure
    teaser: Don't recognize small structure
    optional: true
    goal:
      - |
        The `bottomright`{=structure} structure shouldn't be recognized.
    condition: |
      foundStructure <- structure "bottomright" 0;
      return $ case foundStructure (\_. false) (\_. true);
robots:
  - name: base
    dir: east
    devices:
      - grabber
      - treads
    inventory:
      - [1, gold]
      - [1, silver]
solution: |
  move; move; move;
  place "gold";
structures:
  - name: topleft
    recognize: [north]
    structure:
      mask: '.'
      palette:
        'g': [stone, gold]
        's': [stone, silver]
      map: |
        ss
        gg
        gg
  - name: bottomright
    recognize: [north]
    structure:
      mask: '.'
      palette:
        'g': [stone, gold]
        's': [stone, silver]
      map: |
        gg
        gg
        ss
world:
  name: root
  dsl: |
    {blank}
  palette:
    '.': [grass]
    'g': [grass, gold]
    's': [grass, silver]
    'B': [grass, null, base]
  upperleft: [0, 0]
  map: |
    ..ss.
    ..gg.
    B.g.g
    ...gg
    ...ss