01_domatowo_probe.php
INITEnvironment loaded — running: 01_domatowo_probe.php

1. action=help
HTTP
200
BODY
{
    "code": 65,
    "message": "Domatowo API help.",
    "usage": {
        "endpoint": "/verify",
        "method": "POST",
        "required_fields": [
            "apikey",
            "task",
            "answer"
        ],
        "task": "domatowo"
    },
    "actions": [
        {
            "action": "help",
            "description": "Returns API usage and action reference.",
            "params": []
        },
        {
            "action": "reset",
            "description": "Resets board state, queue and action points to defaults, then rolls partisan position again.",
            "params": []
        },
        {
            "action": "create",
            "description": "Creates a new transporter or scout unit on the next free spawn slot (A6 -> D6).",
            "params": {
                "type": "transporter|scout",
                "passengers": "1-4 (required only for transporter)"
            }
        },
        {
            "action": "move",
            "description": "Queues movement of a unit to target field with calculated path (road-only for transporter, shortest orthogonal for scout).",
            "params": {
                "object": "hash",
                "where": "A1..K11"
            }
        },
        {
            "action": "inspect",
            "description": "Performs scout reconnaissance and appends a log entry based on current scout field.",
            "params": {
                "object": "hash (scout)"
            }
        },
        {
            "action": "dismount",
            "description": "Removes selected number of scouts from transporter and spawns them on free tiles around vehicle.",
            "params": {
                "object": "hash (transporter)",
                "passengers": "1-4"
            }
        },
        {
            "action": "getObjects",
            "description": "Returns all currently known units with type, position and identifier.",
            "params": []
        },
        {
            "action": "getMap",
            "description": "Returns clean map layout; optional symbols filter keeps only selected symbols/fields.",
            "params": {
                "symbols": "[optional] array of 2-char symbols or coordinates (e.g. KS, SZ, B3, C4)"
            }
        },
        {
            "action": "searchSymbol",
            "description": "Searches clean map for all fields matching the provided 2-character symbol.",
            "params": {
                "symbol": "exactly 2 alphanumeric characters"
            }
        },
        {
            "action": "getLogs",
            "description": "Returns collected inspect log entries.",
            "params": []
        },
        {
            "action": "expenses",
            "description": "Returns action points spending history (action name and action cost).",
            "params": []
        },
        {
            "action": "actionCost",
            "description": "Returns action points cost rules for all operations.",
            "params": []
        },
        {
            "action": "callHelicopter",
            "description": "Calls evacuation helicopter to selected destination, but only after any scout confirms a human.",
            "params": {
                "destination": "A1..K11"
            }
        }
    ]
}

2. action=getMap
HTTP
200
BODY
{
    "code": 80,
    "message": "Map loaded.",
    "map": {
        "name": "Domatowo",
        "size": 11,
        "tiles": {
            "road": {
                "label": "Ulica",
                "symbol": "UL"
            },
            "tree": {
                "label": "Drzewa",
                "symbol": "DR"
            },
            "house": {
                "label": "Dom",
                "symbol": "DM"
            },
            "empty": {
                "label": "Pusta przestrzen",
                "symbol": "  "
            },
            "block1": {
                "label": "Blok 1p",
                "symbol": "B1"
            },
            "block2": {
                "label": "Blok 2p",
                "symbol": "B2"
            },
            "block3": {
                "label": "Blok 3p",
                "symbol": "B3"
            },
            "church": {
                "label": "Kosciol",
                "symbol": "KS"
            },
            "school": {
                "label": "Szkola",
                "symbol": "SZ"
            },
            "parking": {
                "label": "Parking",
                "symbol": "PK"
            },
            "field": {
                "label": "Boisko",
                "symbol": "BS"
            }
        },
        "grid": [
            [
                "tree",
                "road",
                "road",
                "road",
                "empty",
                "block3",
                "block3",
                "tree",
                "empty",
                "parking",
                "parking"
            ],
            [
                "tree",
                "tree",
                "empty",
                "road",
                "road",
                "block3",
                "block3",
                "tree",
                "road",
                "parking",
                "parking"
            ],
            [
                "empty",
                "empty",
                "empty",
                "road",
                "parking",
                "empty",
                "empty",
                "tree",
                "road",
                "empty",
                "empty"
            ],
            [
                "block1",
                "block1",
                "empty",
                "road",
                "parking",
                "school",
                "school",
                "school",
                "road",
                "field",
                "field"
            ],
            [
                "block1",
                "block1",
                "empty",
                "road",
                "parking",
                "school",
                "school",
                "school",
                "road",
                "field",
                "field"
            ],
            [
                "road",
                "road",
                "road",
                "road",
                "road",
                "road",
                "road",
                "road",
                "road",
                "road",
                "empty"
            ],
            [
                "block2",
                "block2",
                "empty",
                "road",
                "empty",
                "church",
                "church",
                "church",
                "empty",
                "tree",
                "empty"
            ],
            [
                "block2",
                "block2",
                "empty",
                "road",
                "empty",
                "church",
                "church",
                "church",
                "empty",
                "tree",
                "empty"
            ],
            [
                "empty",
                "road",
                "road",
                "road",
                "road",
                "road",
                "road",
                "road",
                "road",
                "road",
                "empty"
            ],
            [
                "block3",
                "block3",
                "block3",
                "empty",
                "tree",
                "empty",
                "empty",
                "block3",
                "block3",
                "tree",
                "empty"
            ],
            [
                "block3",
                "block3",
                "block3",
                "empty",
                "tree",
                "empty",
                "empty",
                "block3",
                "block3",
                "tree",
                "empty"
            ]
        ]
    }
}
Map — ASCII render (columns=A–K, rows=1–11)
GRID
    A  B  C  D  E  F  G  H  I  J  K
 1 DR UL UL UL  · B3 B3 DR  · PK PK
 2 DR DR  · UL UL B3 B3 DR UL PK PK
 3  ·  ·  · UL PK  ·  · DR UL  ·  ·
 4 B1 B1  · UL PK SZ SZ SZ UL BS BS
 5 B1 B1  · UL PK SZ SZ SZ UL BS BS
 6 UL UL UL UL UL UL UL UL UL UL  ·
 7 B2 B2  · UL  · KS KS KS  · DR  ·
 8 B2 B2  · UL  · KS KS KS  · DR  ·
 9  · UL UL UL UL UL UL UL UL UL  ·
10 B3 B3 B3  · DR  ·  · B3 B3 DR  ·
11 B3 B3 B3  · DR  ·  · B3 B3 DR  ·
Tile legend
LEGEND
[UL] road — Ulica
[DR] tree — Drzewa
[DM] house — Dom
[  ] empty — Pusta przestrzen
[B1] block1 — Blok 1p
[B2] block2 — Blok 2p
[B3] block3 — Blok 3p
[KS] church — Kosciol
[SZ] school — Szkola
[PK] parking — Parking
[BS] field — Boisko


DONEFinished.