221 day22 part1

✓ Passing This code compiles and runs correctly.

Code

input.k

Supporting Files

input.txt

Actual

win hp=2 mana=24
win hp=1 mana=114

Expected output

win hp=2 mana=24
win hp=1 mana=114

Flows

subflow ~gf click a branch to expand · @labels scroll to their anchor
if (sh >= 0)
subflow ~setf click a branch to expand · @labels scroll to their anchor
gf (s, sh, w)
subflow ~mkstate click a branch to expand · @labels scroll to their anchor
setf (s: 0, sh: 0, w: 10, val: php)
subflow ~costof click a branch to expand · @labels scroll to their anchor
if (code == 1)
subflow ~tkof click a branch to expand · @labels scroll to their anchor
if (code == 3)
subflow ~dmgof click a branch to expand · @labels scroll to their anchor
if (code == 1)
subflow ~healof click a branch to expand · @labels scroll to their anchor
if (code == 2)
subflow ~codeat click a branch to expand · @labels scroll to their anchor
if (si > 20)
subflow ~tick click a branch to expand · @labels scroll to their anchor
gf (s, sh: 38, w: 3)
subflow ~casted click a branch to expand · @labels scroll to their anchor
gf (s, sh: 10, w: 13)
subflow ~attack click a branch to expand · @labels scroll to their anchor
gf (s, sh: 41, w: 3)
subflow ~turnstep click a branch to expand · @labels scroll to their anchor
gf (s, sh: 52, w: 2)
subflow ~fight click a branch to expand · @labels scroll to their anchor
gf (s, sh: 52, w: 2)
flow ~read-lines click a branch to expand · @labels scroll to their anchor
read-lines (path: "tests/regression/810_AOC_2015/810_221_day22_part1/input.txt")

Test Configuration

MUST_RUN