The only road over Kolfell runs into Hrafnkel's barrow, the grave-mound of a king who could not bear to lose anything. Buried with his treasure, he would not rest: for a thousand winters he has counted, and his mound has grown across the road. Whatever travellers carry, he takes and writes into his ledger, in old runes that look a great deal like JSON. His strength lives in that count. Break it, and fight your way through. Every stage you win lands a blow; every run that fails brings his sword down.
The fight
Four stages, each building on the last. Every stage opens with a finished version of the code from the stage before, so you pick up where you left off. This fight draws on JSON, sorting with keys, comprehensions, sets, tuples and nested data.
Stage 1: Reading the ledger. Read his runes and find his richest treasures.
Stage 2: By kind. Group his hoard by kind, not by his order.
Stage 3: The counting. Weigh and value it all, better than he ever could.
Stage 4: The first sack. Take back the most value for its weight.