packages feed

swarm-0.6.0.0: data/scenarios/Challenges/dimsum.yaml

version: 1
name: Dim sum
creative: false
description: Serve restaurant patrons with the dim sum cart.
objectives:
  - goal:
      - It is the grand opening of Sigma (Σ), the hot new dim sum restaurant in town. You are the solitary wait staff.
      - It seems that the manager went a bit overboard on furniture; there are dozens of `table`{=entity}s, but hardly any room to walk!
      - Serve the blue patron with a `full cart`{=entity} (f) of food, twice.
      - The `empty cart`{=entity} (e) must be `push`ed to the northwest corner for the cook to load it with food.
    condition: |
      p <- robotnamed "patron";
      as p {
        foodCount <- count "food";
        return $ foodCount >= 2;
      }
solution: |
  run "scenarios/Challenges/_dimsum/solution.sw"
robots:
  - name: base
    dir: [1, 0]
    devices:
      - branch predictor
      - ADT calculator
      - compass
      - comparator
      - dictionary
      - grabber
      - lambda
      - logger
      - net
      - scanner
      - strange loop
      - treads
      - dozer blade
  - name: cook
    dir: [0, -1]
    system: false
    display:
      invisible: false
      attr: red
    devices:
      - ADT calculator
      - branch predictor
      - comparator
      - dictionary
      - lambda
      - logger
      - rolex
      - scanner
      - spatula
    program: |
      run "scenarios/Challenges/_dimsum/cook.sw"
  - name: patron
    dir: [0, 1]
    system: false
    display:
      invisible: false
      attr: blue
    devices:
      - ADT calculator
      - branch predictor
      - comparator
      - dictionary
      - lambda
      - logger
      - rolex
      - scanner
      - strange loop
      - fork
    inventory:
      - [2, bitcoin]
    program: |
      run "scenarios/Challenges/_dimsum/patron.sw"
entities:
  - name: table
    display:
      attr: wood
      char: 't'
    description:
      - Pushable table
    properties: [known, pushable]
  - name: spatula
    display:
      char: 's'
    description:
      - Serving utensil for the cart
    properties: [known, pickable]
  - name: fork
    display:
      char: 'k'
    description:
      - Eating utensil for patron
    properties: [known, pickable]
  - name: food
    display:
      char: 'f'
    description:
      - Food from the cart
    properties: [known, pickable]
  - name: empty cart
    display:
      attr: copper
      char: 'e'
    description:
      - Food cart
    properties: [known, pushable]
  - name: full cart
    display:
      attr: gold
      char: 'f'
    description:
      - Food cart
    properties: [known, pushable]
recipes:
  - in:
      - [1, empty cart]
    out:
      - [1, full cart]
    required:
      - [1, spatula]
  - in:
      - [1, full cart]
    out:
      - [1, empty cart]
      - [1, food]
    required:
      - [1, fork]
known: [boulder, bitcoin]
world:
  dsl: |
    {grass}
  palette:
    'B': [grass, erase, base]
    '.': [grass, erase]
    'S': [dirt, erase]
    '@': [grass, boulder]
    'd': [grass, table]
    'k': [grass, table, cook]
    'p': [grass, table, patron]
    's': [grass, empty cart]
    'x': [stone, erase]
  upperleft: [0, 0]
  map: |
    .@@@.........
    .@k@@@@@@@@x@
    .@Bddddddddd@
    .@dxxxxxxxd@@
    .@dxSSSSSxd@.
    .@dxxSxxxxd@.
    .@dxxxSxxxd@.
    .@dxxSxxxxd@.
    .@dxSSSSSxd@.
    @@dxxxxxxxd@.
    @ddddddddds@.
    @x@@@@@@@@p@.
    .........@@@.