005 gauntlet

✓ Passing This code compiles and runs correctly.

Code

input.k

Supporting Files

lib/unit.kz

Actual

board: 1 killed
culled a foe at 0 hp
board: 2 killed
culled a foe at 0 hp
board: 3 killed
culled a foe at 0 hp
board: 4 killed
culled a foe at -1 hp
board: 5 killed
culled a foe at 0 hp
board: 6 killed
culled a foe at -3 hp
board: 7 killed
culled a foe at 0 hp
board: 8 killed
culled a foe at -2 hp
board: 9 killed
culled a foe at -1 hp
board: 10 killed
culled a foe at 0 hp
board: 11 killed
culled a foe at -3 hp
board: 12 killed
culled a foe at -3 hp
board: 13 killed
culled a foe at 0 hp
board: 14 killed
culled a foe at -2 hp
board: 15 killed
culled a foe at -1 hp
board: 16 killed
culled a foe at -2 hp
fought 6 rounds
score 166 over 16 survivors, 1783 scarred
board: 17 killed
culled a foe at 13 hp
champion stands down at 13 hp
board: 18 killed
culled a foe at 1 hp
the dead stay dead
gauntlet closed after 6 rounds

Expected output

board: 1 killed
culled a foe at 0 hp
board: 2 killed
culled a foe at 0 hp
board: 3 killed
culled a foe at 0 hp
board: 4 killed
culled a foe at -1 hp
board: 5 killed
culled a foe at 0 hp
board: 6 killed
culled a foe at -3 hp
board: 7 killed
culled a foe at 0 hp
board: 8 killed
culled a foe at -2 hp
board: 9 killed
culled a foe at -1 hp
board: 10 killed
culled a foe at 0 hp
board: 11 killed
culled a foe at -3 hp
board: 12 killed
culled a foe at -3 hp
board: 13 killed
culled a foe at 0 hp
board: 14 killed
culled a foe at -2 hp
board: 15 killed
culled a foe at -1 hp
board: 16 killed
culled a foe at -2 hp
fought 6 rounds
score 166 over 16 survivors, 1783 scarred
board: 17 killed
culled a foe at 13 hp
champion stands down at 13 hp
board: 18 killed
culled a foe at 1 hp
the dead stay dead
gauntlet closed after 6 rounds

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (board, source: alive: 0[i64], kills: 0[i64], pool: 0[i64], chk: 0[i64], seen: 0[i64], scar: 0[i64])
flow ~new click a branch to expand · @labels scroll to their anchor
new (arena, capacity: 32, source: u: *app/lib/unit:Unit<live!>, hp: i64, atk: i64, opp: i64)
flow ~std/store click a branch to expand · @labels scroll to their anchor
std/store (board)
flow ~std/store click a branch to expand · @labels scroll to their anchor
std/store (arena)
flow ~new click a branch to expand · @labels scroll to their anchor
new (order, size: 32, source: h: -1[i64])
subflow ~spawn-wave click a branch to expand · @labels scroll to their anchor
for (0..@as(usize, 32))
subflow ~pair-rivals click a branch to expand · @labels scroll to their anchor
for (0..@as(usize, 32))
subflow ~strike click a branch to expand · @labels scroll to their anchor
query (arena)
subflow ~cull click a branch to expand · @labels scroll to their anchor
rule (arena)
subflow ~rounds click a branch to expand · @labels scroll to their anchor
strike
subflow ~muster click a branch to expand · @labels scroll to their anchor
spawn-wave
subflow ~fight click a branch to expand · @labels scroll to their anchor
rounds (left: g)
subflow ~tally click a branch to expand · @labels scroll to their anchor
query (arena)
subflow ~score click a branch to expand · @labels scroll to their anchor
tally
subflow ~honor-champion click a branch to expand · @labels scroll to their anchor
query (arena)
subflow ~honor-challenger click a branch to expand · @labels scroll to their anchor
spawn-unit (id: 99)
subflow ~honor click a branch to expand · @labels scroll to their anchor
honor-champion
flow ~open-gauntlet click a branch to expand · @labels scroll to their anchor
open-gauntlet (rounds: 6)

Test Configuration

MUST_RUN