041 store arena live hp aggregate

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

board: 1 alive
board: hp pool 30
board: 2 alive
board: hp pool 42
board: 3 alive
board: hp pool 82
board: hp pool 62
board: hp pool 42
a foe reels (-8 hp)
board: 2 alive
board: 1 killed
board: hp pool 50
culled a foe at -8 hp

Expected output

board: 1 alive
board: hp pool 30
board: 2 alive
board: hp pool 42
board: 3 alive
board: hp pool 82
board: hp pool 62
board: hp pool 42
a foe reels (-8 hp)
board: 2 alive
board: 1 killed
board: hp pool 50
culled a foe at -8 hp

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: board, source: alive: 0[i64], kills: 0[i64], pool: 0[i64])
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: arena, source: hp: i64, kind: 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 ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: arena, source: hp: 30, kind: 1)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: arena, source: hp: 12, kind: 1)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (expr: arena, source: hp: 40, kind: 2)
flow ~query click a branch to expand · @labels scroll to their anchor
query (expr: arena)
flow ~query click a branch to expand · @labels scroll to their anchor
query (expr: arena)

Test Configuration

MUST_RUN