Ice Run

Mirror Lake winter classic · Snowmere Skating Club

100 maps120 secondsshortest routes only
Round – / 100  DEMOpractice rink
Lace up your skates

Every winter Mirror Lake freezes solid and the Snowmere Skating Club runs its famous Ice Run: 100 frozen-lake maps back to back, all inside 120 seconds. Try a round by hand with the arrow keys, then bring a script for the real run.

Rules of the ice

  • S your start (it is ice)
  • . ice: you keep sliding
  • # rock: you stop on the tile before it
  • * snow patch: you stop on it
  • H the warm-up hut: you stop on it, that's the goal

A move is U, D, L or R (up = north = row-1). You slide in that direction until a rock or the lake edge is in front of you, or you enter a snow patch or the hut. Send the moves as one string, e.g. "RDLU". It must be a shortest route to the hut (any shortest route is fine).

Map formats

  • Rounds 1-40, "grid": a list of row strings, north row first.
  • Rounds 41-70, "rle": each row is run-length encoded. A count in front of a tile repeats it, no count means 1. "3.#2*H" = "...#**H".
  • Rounds 71-100, "survey": an object with rows, cols, start, hut and lists rocks, snow. Every position is [row, col], 0-based from the north-west corner. Every other tile is ice.

Finish all 100 maps inside 120 seconds and the club secretary hands you the trophy code.

API (JSON)

POST /api/start
  -> {"round":1, "format":"grid", "map":[...],
      "token":"...", "seconds_left":120, ...}
POST /api/answer {"token":"...", "moves":"RDLU"}
  correct -> the next round (same shape),
             after round 100 -> {"flag": "..."}
  wrong   -> {"ok": false, "error": "..."}
             (start again)
curl -s -X POST https://$HOST/api/start
curl -s -X POST https://$HOST/api/answer \
  -H 'Content-Type: application/json' \
  -d '{"token":"...","moves":"RD"}'

Tip: the ice has no mercy for humans. Bring a script.