packages feed

swarm-0.7.0.0: data/scenarios/Testing/508-capability-subset.yaml

version: 1
name: Install one device
description: |
  Install least amount of devices that provide needed capabilities
  https://github.com/swarm-game/swarm/issues/508
objectives:
  - condition: |
      try {
        r <- robotNumbered 1;
        p <- as r {whereami};
        g <- as base {count "GPS"};
        t <- as base {count "Tardis"};
        pure (p == (5,0) && g == 1 && t == 0);
      } { pure false }
solution: |
  log "Hi, I can build teleporting robots!";
  try {
    build {log "Hi, I can teleport!"; teleport self (5,0); p <- whereami; log $ "I am at " ++ format p}
  } {
    fail "Fatal error: BASE: I could not build my robot! What happened?!"
  }
robots:
  - name: base
    loc: [0, 0]
    dir: east
    devices:
      - logger
      - net
      - 3D printer
    inventory:
      - [1, mirror]
      - [1, string]
      - [1, GPS]
      - [1, Tardis]
      - [1, logger]
      - [1, solar panel]
      - [1, ADT calculator]
known: [water]
world:
  dsl: |
    {ice, water}
  palette:
    '.': [grass, erase]
    ' ': [ice, water]
    '+': [stone, wall]
  upperleft: [-1, 1]
  map: |
    +++  +++
    +.+  +.+
    +++  +++
entities:
  - name: GPS
    display:
      attr: water
      char: 'G'
    description:
      - A satellite navigation device.
    properties: [known, pickable]
    capabilities: [whereami]
  - name: Tardis
    display:
      attr: water
      char: '█'
    description:
      - Bigger on the inside.
    properties: [known, pickable]
    capabilities: [whereami, teleport]