packages feed

swarm-0.7.0.0: data/scenarios/Challenges/chess_horse.yaml

version: 1
name: Chess Knight
author: Ondřej Šebek
description: In this quirky challenge, you move as the chess knight piece. Can you capture the enemy king?
objectives:
  - goal:
      - Robots can use the `move` command to move. But they only `turn` in cardinal directions.
      - You are special. You are a knight.
      - Go forth and capture the King!
    condition: |
      try {
        bloc <- as base {whereami};
        king <- robotNamed "king";
        kloc <- as king {whereami};
        pure (bloc == kloc)
      } { pure false }
solution: |
  move; move; move; turn right; move; turn left; move;
robots:
  - name: horse
    loc: [0, 0]
    dir: [2, -1]
    devices:
      - treads
      - logger
    inventory: []
    display:
      char: '♘'
  - name: king
    loc: [7, -6]
    dir: [0, 0]
    display:
      char: '♚'
entities:
  - name: wall
    display:
      char: '#'
    description:
      - Unmovable barrier
    properties: [known, unwalkable, boundary]
known: [water]
world:
  dsl: |
    {ice, water}
  palette:
    '.': [grass, erase]
    '#': [ice, erase]
    'w': [stone, wall]
  upperleft: [-1, 1]
  map: |
    wwwwwwwwww
    w.#.#.#.#w
    w#.#.#.#.w
    w.#.#.#.#w
    w#.#.#.#.w
    w.#.#.#.#w
    w#.#.#.#.w
    w.#.#.#.#w
    w#.#.#.#.w
    wwwwwwwwww