librarygames/scroller/Jump.xtl

The side-scroller's rules, a library: scroller.xtl (scripted), play.xtl (the game: keys and the clock) and the web page all use these. Built on lib/Ecs: a world is a matrix, a row per entity, and every rule is a system, one expression over every entity with the components it needs. You, the walkers, the coins and the flag are entities; gravity, movement and collision with the ground act on every body at once, you and the walkers alike. A game's state is a tuple: (the world, the coins picked up, the seconds played, how it stands: 0 playing, 1 you reached the flag, 2 you were caught or fell).

source · imports ec: lib/Ecs.xtl lib/Ecs.xtlm; sv: lib/Svg.xtl; t: lib/Text.xtl

The data

ʰw̲orld : Int -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }
Used in: ˡn̲ew

ʰp̲os : a -> a

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰh̲asPos : (Num a, Truthy b) => a -> b

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰs̲etPos : Float -> (Int, Float) -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰd̲ropPos : Float -> Int -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰv̲el : a -> a

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰh̲asVel : (Num a, Truthy b) => a -> b

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰs̲etVel : Float -> (Int, Float) -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰd̲ropVel : Float -> Int -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰb̲ody : a -> a

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰh̲asBody : (Num a, Truthy b) => a -> b

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰs̲etBody : Float -> (Int, Float) -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }
Used in: ˡn̲ew

ʰd̲ropBody : Float -> Int -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰw̲alker : a -> a

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰh̲asWalker : (Num a, Truthy b) => a -> b

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰs̲etWalker : Float -> (Int, Float) -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }
Used in: ˡn̲ew

ʰd̲ropWalker : Float -> Int -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰc̲oin : a -> a

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰh̲asCoin : (Num a, Truthy b) => a -> b

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰs̲etCoin : Float -> (Int, Float) -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }
Used in: ˡn̲ew

ʰd̲ropCoin : Float -> Int -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰp̲layer : a -> a

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰh̲asPlayer : (Num a, Truthy b) => a -> b

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰs̲etPlayer : Float -> (Int, Float) -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }
Used in: ˡn̲ew

ʰd̲ropPlayer : Float -> Int -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰg̲oal : a -> a

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰh̲asGoal : (Num a, Truthy b) => a -> b

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

ʰs̲etGoal : Float -> (Int, Float) -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }
Used in: ˡn̲ew

ʰd̲ropGoal : Float -> Int -> Float

function (private) · line 19

The layout: where it is (x then y, in tiles, y down), how fast it moves, whether gravity and the ground act on it, and what it is.

"h" ᵉᶜc̲omponents< "pos:2 vel:2 body walker coin player goal"
ᵉᶜc̲omponents< expands to
ʰw̲orld ← { n → (n c̲at 17) r̲eshape 0.0 }
ʰp̲os ← { W → (3 4) s̲elect₂ W }
ʰh̲asPos ← { W → 0 < 2 s̲elect₂ W }
ʰs̲etPos ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (2 3 4) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPos ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 2 = r̲ange 17 }
ʰv̲el ← { W → (6 7) s̲elect₂ W }
ʰh̲asVel ← { W → 0 < 5 s̲elect₂ W }
ʰs̲etVel ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 2) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (5 6 7) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 3) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropVel ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 5 = r̲ange 17 }
ʰb̲ody ← { W → (9) s̲elect₂ W }
ʰh̲asBody ← { W → 0 < 8 s̲elect₂ W }
ʰs̲etBody ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (8 9) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropBody ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 8 = r̲ange 17 }
ʰw̲alker ← { W → (11) s̲elect₂ W }
ʰh̲asWalker ← { W → 0 < 10 s̲elect₂ W }
ʰs̲etWalker ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (10 11) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropWalker ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 10 = r̲ange 17 }
ʰc̲oin ← { W → (13) s̲elect₂ W }
ʰh̲asCoin ← { W → 0 < 12 s̲elect₂ W }
ʰs̲etCoin ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (12 13) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropCoin ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 12 = r̲ange 17 }
ʰp̲layer ← { W → (15) s̲elect₂ W }
ʰh̲asPlayer ← { W → 0 < 14 s̲elect₂ W }
ʰs̲etPlayer ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (14 15) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropPlayer ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 14 = r̲ange 17 }
ʰg̲oal ← { W → (17) s̲elect₂ W }
ʰh̲asGoal ← { W → 0 < 16 s̲elect₂ W }
ʰs̲etGoal ← { W (ids, v) →
  i ← r̲avel ids
  V ← (((t̲ally i) c̲at 1) r̲eshape 1.0) c̲at₂ ((t̲ally i) c̲at 1) r̲eshape v
  R ← f̲loat (r̲ange t̲ally W) '= t̲able i
  C ← f̲loat (16 17) '= t̲able r̲ange 17
  M ← 0 < R '+ '× i̲nner (((t̲ally i) c̲at 2) r̲eshape 1.0) '+ '× i̲nner C
  (W × f̲loat n̲ot M) + R '+ '× i̲nner V '+ '× i̲nner C
}
ʰd̲ropGoal ← { W ids → W × f̲loat n̲ot ((r̲ange t̲ally W) m̲ember? r̲avel ids) '× t̲able 16 = r̲ange 17 }

rows : Box Char

value (private) · line 21

The level: R rows of C tiles, row by row; which tiles are ground.

rows ← "scroller.toml" ⎕L̲IST "level"
Used in: cells, R

cells : Char

value (private) · line 22
cells ← ᵗj̲oin rows
Used in: C, solid, ˡn̲ew

R : Int

value (private) · line 23
R ← t̲ally rows

C : Int

value (private) · line 24
C ← (t̲ally cells) d̲iv R

solid : Bool

value (private) · line 25
solid ← cells = f̲irst "#"

phys : Float

value (private) · line 28

The physics: gravity, a jump's speed, running speed, a walker's speed, the fastest fall, the speed kept each tick.

phys ← 'ˢᵛn̲um e̲ach "scroller.toml" ⎕L̲IST "physics"
Used in: GRAVITY, JUMP, RUN, WALK, FALL, KEEP

GRAVITY : Float

value (private) · line 29
GRAVITY ← f̲irst phys
Used in: ʰg̲ravity

JUMP : Float

value (private) · line 30
JUMP ← 2 s̲elect phys
Used in: ʰt̲ouch, ˡk̲ey

RUN : Float

value (private) · line 31
RUN ← 3 s̲elect phys
Used in: ˡk̲ey

WALK : Float

value (private) · line 32
WALK ← 4 s̲elect phys
Used in: ˡn̲ew

FALL : Float

value (private) · line 33
FALL ← 5 s̲elect phys
Used in: ʰg̲ravity

KEEP : Float

value (private) · line 34
KEEP ← 6 s̲elect phys
Used in: ʰs̲low

SIZE : Float

value (private) · line 36

Every entity is a square this many tiles wide.

SIZE ← 0.8

A new game

ʰp̲air : (a, a) -> a

function (private) · line 41

n by 2 from two columns (x and y, or two speeds).

ʰp̲air ← { (a, b) → o̲\ (2 c̲at t̲ally a) r̲eshape a c̲at b }

ˡn̲ew : (Any a, Num b, Num c) => a -> (Float, b, Float, c)

function · line 47

A new game: an entity for each character of the level that is one (you, the coins, the walkers, the flag), standing on its tile; the walkers set off to the left. Gravity and the ground act on you and the walkers (body); the coins and the flag stay where they are.

ˡn̲ew ← { z →
  at ← w̲here cells m̲ember? "@owF"
  ch ← at s̲elect cells
  (spawned, ids) ← (ʰw̲orld 64) ᵉᶜs̲pawn t̲ally at
  x ← 0.1 + f̲loat (at − 1) m̲od C
  y ← (1.0 − SIZE) + f̲loat (at − 1) d̲iv C
  me ← (ch = f̲irst "@") r̲eplicate ids
  walk ← (ch = f̲irst "w") r̲eplicate ids
  placed ← spawned ʰs̲etPos (ids, ʰp̲air (x, y))
  moving ← ((placed ʰs̲etVel (me, 0.0 0.0)) ʰs̲etVel (walk, (n̲eg WALK) c̲at 0.0)) ʰs̲etBody (me c̲at walk, 1.0)
  cast ← (moving ʰs̲etPlayer (me, 1.0)) ʰs̲etWalker (walk, 1.0)
  W ← (cast ʰs̲etCoin ((ch = f̲irst "o") r̲eplicate ids, 1.0)) ʰs̲etGoal ((ch = f̲irst "F") r̲eplicate ids, 1.0)
  (W, 0, 0.0, 0)
}

The systems

ʰs̲olid : Truthy a => (Int, Int) -> a

function (private) · line 67

Whether the tiles at rows r and columns c (whole numbers, any number of them) are ground: past the left or right end is a wall, above the top or below the bottom is open.

ʰs̲olid ← { (r, c) →
  side ← (c < 0) ∨ c ≥ C
  in ← (n̲ot side) ∧ (r ≥ 0) ∧ r < R
  k ← 1 + (C × 0 m̲ax r m̲in R − 1) + 0 m̲ax c m̲in C − 1
  side ∨ in ∧ k s̲elect solid
}

ʰb̲odies : Num a => a -> Int

function (private) · line 74

The bodies alive: you and the walkers.

ʰb̲odies ← { W → w̲here (ᵉᶜa̲live W) ∧ ʰh̲asBody W }

ʰm̲e : Num a => a -> Int

function (private) · line 76

Your entity.

ʰm̲e ← { W → f̲irst w̲here (ᵉᶜa̲live W) ∧ ʰh̲asPlayer W }

ʰg̲ravity : Float -> Float -> Float

function (private) · line 79

Gravity: every body falls faster, up to the fastest fall.

ʰg̲ravity ← { W dt →
  b ← ʰb̲odies W
  V ← b s̲elect ʰv̲el W
  W ʰs̲etVel (b, ʰp̲air (1 s̲elect₂ V, FALL m̲in (2 s̲elect₂ V) + GRAVITY × dt))
}
Used in: ˡt̲ick

ʰs̲low : Float -> Float

function (private) · line 85

Your speed, kept a little less each tick once you let go.

ʰs̲low ← { W → me ← ʰm̲e W◆ W ʰs̲etVel (me, (KEEP × 1 s̲elect me s̲elect ʰv̲el W) c̲at 2 s̲elect me s̲elect ʰv̲el W) }
Used in: ˡt̲ick

ʰa̲cross : Float -> Float -> Float

function (private) · line 88

Across: every body moves by its speed, stopped at the ground in its way (its edge put against the tile); a walker stopped turns back.

ʰa̲cross ← { W dt →
  b ← ʰb̲odies W
  P ← b s̲elect ʰp̲os W
  V ← b s̲elect ʰv̲el W
  y ← 2 s̲elect₂ P
  vx ← 1 s̲elect₂ V
  ahead ← vx > 0.0
  tx ← (1 s̲elect₂ P) + vx × dt
  c ← f̲loor tx + SIZE × f̲loat ahead
  hit ← (vx ≠ 0.0) ∧ (ʰs̲olid (f̲loor y + 0.01, c)) ∨ ʰs̲olid (f̲loor y + SIZE − 0.01, c)
  h ← f̲loat hit
  snap ← (f̲loat c) + (f̲loat n̲ot ahead) − SIZE × f̲loat ahead
  nx ← (tx × 1.0 − h) + snap × h
  nvx ← vx × 1.0 − h × 1.0 + f̲loat b s̲elect ʰh̲asWalker W
  (W ʰs̲etPos (b, ʰp̲air (nx, y))) ʰs̲etVel (b, ʰp̲air (nvx, 2 s̲elect₂ V))
}
Used in: ˡt̲ick

ʰd̲own : Float -> Float -> Float

function (private) · line 106

Down (or up): every body moves by its speed, landing on the ground below it or stopped by the ground above, its speed then 0.

ʰd̲own ← { W dt →
  b ← ʰb̲odies W
  P ← b s̲elect ʰp̲os W
  V ← b s̲elect ʰv̲el W
  x ← 1 s̲elect₂ P
  vy ← 2 s̲elect₂ V
  down ← vy > 0.0
  ty ← (2 s̲elect₂ P) + vy × dt
  r ← f̲loor ty + SIZE × f̲loat down
  hit ← (vy ≠ 0.0) ∧ (ʰs̲olid (r, f̲loor x + 0.01)) ∨ ʰs̲olid (r, f̲loor x + SIZE − 0.01)
  h ← f̲loat hit
  snap ← (f̲loat r) + (f̲loat n̲ot down) − SIZE × f̲loat down
  ny ← (ty × 1.0 − h) + snap × h
  (W ʰs̲etPos (b, ʰp̲air (x, ny))) ʰs̲etVel (b, ʰp̲air (1 s̲elect₂ V, vy × 1.0 − h))
}
Used in: ˡt̲ick

ʰt̲ouching : Float -> (Int, Float) -> Int

function (private) · line 122

Which entities of ids touch you (at p, one row of x and y).

ʰt̲ouching ← { W (ids, p) → (r̲avel ᵉᶜn̲ear (ids s̲elect ʰp̲os W, 1 2 r̲eshape p, SIZE)) r̲eplicate ids }
Used in: ʰt̲ouch

ʰa̲ny : (Num a, Truthy b) => a -> b

function (private) · line 124

Whether any of m holds.

ʰa̲ny ← { m → 0 < '+ r̲/ 0 c̲at 0 + m }
Used in: ʰt̲ouch

ʰo̲utcome : (Truthy a, Truthy b, Num c) => (a, b) -> c

function (private) · line 126

How it stands: caught or fallen 2, at the flag 1, else 0.

ʰo̲utcome ← { (caught, won) → caught ? 2◆ won ? 1◆ 0 }
Used in: ʰt̲ouch

ʰt̲ouch : Num a => Float -> Int -> (Float, Int, a)

function (private) · line 130

What touches you: coins are picked up; a walker you land on is beaten (and you bounce), one that meets you otherwise catches you; the flag wins. A walker that falls out of the level goes; so do you, caught.

ʰt̲ouch ← { W g →
  me ← ʰm̲e W
  p ← me s̲elect ʰp̲os W
  got ← W ʰt̲ouching (w̲here (ᵉᶜa̲live W) ∧ ʰh̲asCoin W, p)
  picked ← W ᵉᶜd̲espawn got
  met ← picked ʰt̲ouching (w̲here (ᵉᶜa̲live picked) ∧ ʰh̲asWalker picked, p)
  vy ← 2 s̲elect me s̲elect ʰv̲el picked
  beat ← (vy > 0.0) ∧ (0.3 + 2 s̲elect p) < 2 s̲elect₂ met s̲elect ʰp̲os picked
  b ← f̲loat ʰa̲ny beat
  bounced ← picked ʰs̲etVel (me, (1 s̲elect me s̲elect ʰv̲el picked) c̲at (vy × 1.0 − b) − 0.6 × JUMP × b)
  fought ← bounced ᵉᶜd̲espawn beat r̲eplicate met
  gone ← w̲here (ᵉᶜa̲live fought) ∧ (ʰh̲asWalker fought) ∧ (2 s̲elect₂ ʰp̲os fought) > f̲loat R + 1
  left ← fought ᵉᶜd̲espawn gone
  caught ← (ʰa̲ny n̲ot beat) ∨ (2 s̲elect p) > f̲loat R
  won ← 0 < t̲ally left ʰt̲ouching (w̲here (ᵉᶜa̲live left) ∧ ʰh̲asGoal left, p)
  (left, g + t̲ally got, ʰo̲utcome (caught, won))
}
Used in: ˡt̲ick

ˡt̲ick : Num a => (Float, Int, Float, a) -> Float -> (Float, Int, Float, a)

function · line 151

A tick of the clock, dt seconds: gravity, then every body across and down, then what touches you; each a system over every entity at once. A game over stays as it is.

ˡt̲ick ← { (W, g, t, st) dt →
  st > 0 ? (W, g, t, st)
  moved ← ((ʰs̲low W ʰg̲ravity dt) ʰa̲cross dt) ʰd̲own dt
  (left, coins, stands) ← moved ʰt̲ouch g
  (left, coins, t + dt, stands)
}

Your keys

ʰs̲tanding? : Truthy a => Float -> Int -> a

function (private) · line 161

Whether you stand on the ground (it is just below your feet).

ʰs̲tanding? ← { W me →
  p ← me s̲elect ʰp̲os W
  r ← f̲loor (2 s̲elect p) + SIZE + 0.05
  '∨ r̲/ (ʰs̲olid (r, f̲loor (f̲irst p) + 0.01)) c̲at ʰs̲olid (r, f̲loor (f̲irst p) + SIZE − 0.01)
}
Used in: ˡk̲ey

ˡk̲ey : (Any a, Any b, Num c) => (Float, a, b, c) -> Char -> (Float, a, b, c)

function · line 169

A key: left or right (or a and d) runs that way, up (or w) jumps when you stand on the ground; other keys do nothing.

ˡk̲ey ← { s name →
  (W, g, t, st) ← s
  me ← ʰm̲e W
  V ← me s̲elect ʰv̲el W
  k ← ("LEFT" "RIGHT" "a" "d" "UP" "w") i̲ndexOf e̲nclose name
  (k > 6) ∨ st > 0 ? s
  (k > 4) ∧ n̲ot W ʰs̲tanding? me ? s
  k > 4 ? (W ʰs̲etVel (me, (f̲irst V) c̲at n̲eg JUMP), g, t, st)
  (W ʰs̲etVel (me, (RUN × f̲loat (2 × (k − 1) m̲od 2) − 1) c̲at 2 s̲elect V), g, t, st)
}
Used in: ᵘl̲oop, ᵘr̲un, up

What it shows

ˡs̲tatus : (Any a, Any b, Any c, Any d) => (a, b, c, d) -> d

function · line 184

0 playing, 1 you reached the flag, 2 you were caught or fell.

ˡs̲tatus ← { (W, g, t, st) → st }
Used in: ᵘs̲how, ᵘe̲nd, _

ˡc̲ounts : (Num a, Any b, Any c, Any d, Num e, Truthy e) => (a, b, c, d) -> e

function · line 188

How many of each are alive: you, walkers, coins, flags; and how many of them gravity and the ground act on (bodies).

ˡc̲ounts ← { (W, g, t, st) →
  n ← 5 c̲at t̲ally W
  M ← n r̲eshape 0 + (ʰh̲asPlayer W) c̲at (ʰh̲asWalker W) c̲at (ʰh̲asCoin W) c̲at (ʰh̲asGoal W) c̲at ʰh̲asBody W
  '+ r̲/₂ M × n r̲eshape 0 + ᵉᶜa̲live W
}

ˡb̲odies : (Num a, Any b, Any c, Any d) => (a, b, c, d) -> a

function · line 195

Where every body is (you and the walkers): a row each, x then y.

ˡb̲odies ← { (W, g, t, st) → (ʰb̲odies W) s̲elect ʰp̲os W }

ˡy̲ou : (Num a, Any b) => (Float, a, Float, b) -> Float

function · line 198

Where you are (x then y, in tiles), the coins and the seconds.

ˡy̲ou ← { (W, g, t, st) → ((ʰm̲e W) s̲elect ʰp̲os W) c̲at (f̲loat g) c̲at t }

ʰt̲ile : Int -> Box Char

function (private) · line 200

A tile of ground, drawn: grass on top where open sky is above it.

ʰt̲ile ← { k →
  top ← (k > C) ∧ (1 m̲ax k − C) s̲elect n̲ot solid
  fill ← d̲isclose (1 + top ∨ k ≤ C) s̲elect "#8d5a34" "#4caf50"
  e̲nclose @ f̲ormat< "<rect x=\"{50 * (k - 1) m_od C}\" y=\"{60 + 50 * (k - 1) d_iv C}\" width=\"50\" height=\"50\" fill=\"{fill}\" stroke=\"#5b3a1e\" stroke-width=\"2\"/>"
}
f̲ormat< expands to
("<rect x=\"" c̲at (f̲ormat (50 × (k − 1) m̲od C)) c̲at "\" y=\"" c̲at (f̲ormat (60 + 50 × (k − 1) d̲iv C)) c̲at "\" width=\"50\" height=\"50\" fill=\"" c̲at (f̲ormat (fill)) c̲at "\" stroke=\"#5b3a1e\" stroke-width=\"2\"/>")
Used in: level

level : Char

value (private) · line 206

The whole level drawn once; each picture slides it under the view.

level ← ᵗj̲oin 'ʰt̲ile e̲ach w̲here solid
Used in: ˡd̲raw

ʰs̲prite : Num a => (Float, Float, a) -> Char

function (private) · line 209

An entity, drawn at x, y (tiles) by what it is: 1 you, 2 a walker, 3 a coin, 4 the flag.

ʰs̲prite ← { (x, y, k) →
  X ← 50.0 × x
  Y ← 60.0 + 50.0 × y
  k = 1 ? @ f̲ormat< "<rect class=\"entity you\" x=\"{sv:w_hole X}\" y=\"{sv:w_hole Y}\" width=\"40\" height=\"40\" rx=\"8\" fill=\"#e63946\" stroke=\"#1d1d1f\" stroke-width=\"3\"/><rect x=\"{sv:w_hole X + 24}\" y=\"{sv:w_hole Y + 10}\" width=\"8\" height=\"10\" fill=\"#ffffff\"/>"
  k = 2 ? @ f̲ormat< "<rect class=\"entity\" x=\"{sv:w_hole X}\" y=\"{sv:w_hole Y + 8}\" width=\"40\" height=\"32\" rx=\"14\" fill=\"#6d4c41\" stroke=\"#1d1d1f\" stroke-width=\"3\"/>"
  k = 3 ? @ f̲ormat< "<circle class=\"entity\" cx=\"{sv:w_hole X + 20}\" cy=\"{sv:w_hole Y + 20}\" r=\"12\" fill=\"#ffd166\" stroke=\"#b8860b\" stroke-width=\"3\"/>"
  @ f̲ormat< "<rect x=\"{sv:w_hole X + 18}\" y=\"{sv:w_hole Y - 110}\" width=\"5\" height=\"150\" fill=\"#333333\"/><polygon class=\"entity\" points=\"{sv:w_hole X + 23},{sv:w_hole Y - 110} {sv:w_hole X + 63},{sv:w_hole Y - 92} {sv:w_hole X + 23},{sv:w_hole Y - 74}\" fill=\"#2a9d8f\"/>"
}
f̲ormat< expands to
("<rect class=\"entity you\" x=\"" c̲at (f̲ormat (ˢᵛw̲hole X)) c̲at "\" y=\"" c̲at (f̲ormat (ˢᵛw̲hole Y)) c̲at "\" width=\"40\" height=\"40\" rx=\"8\" fill=\"#e63946\" stroke=\"#1d1d1f\" stroke-width=\"3\"/><rect x=\"" c̲at (f̲ormat (ˢᵛw̲hole X + 24)) c̲at "\" y=\"" c̲at (f̲ormat (ˢᵛw̲hole Y + 10)) c̲at "\" width=\"8\" height=\"10\" fill=\"#ffffff\"/>")
f̲ormat< expands to
("<rect class=\"entity\" x=\"" c̲at (f̲ormat (ˢᵛw̲hole X)) c̲at "\" y=\"" c̲at (f̲ormat (ˢᵛw̲hole Y + 8)) c̲at "\" width=\"40\" height=\"32\" rx=\"14\" fill=\"#6d4c41\" stroke=\"#1d1d1f\" stroke-width=\"3\"/>")
f̲ormat< expands to
("<circle class=\"entity\" cx=\"" c̲at (f̲ormat (ˢᵛw̲hole X + 20)) c̲at "\" cy=\"" c̲at (f̲ormat (ˢᵛw̲hole Y + 20)) c̲at "\" r=\"12\" fill=\"#ffd166\" stroke=\"#b8860b\" stroke-width=\"3\"/>")
f̲ormat< expands to
"<rect x=\"" c̲at (f̲ormat (ˢᵛw̲hole X + 18)) c̲at "\" y=\"" c̲at (f̲ormat (ˢᵛw̲hole Y − 110)) c̲at "\" width=\"5\" height=\"150\" fill=\"#333333\"/><polygon class=\"entity\" points=\"" c̲at (f̲ormat (ˢᵛw̲hole X + 23)) c̲at "," c̲at (f̲ormat (ˢᵛw̲hole Y − 110)) c̲at " " c̲at (f̲ormat (ˢᵛw̲hole X + 63)) c̲at "," c̲at (f̲ormat (ˢᵛw̲hole Y − 92)) c̲at " " c̲at (f̲ormat (ˢᵛw̲hole X + 23)) c̲at "," c̲at (f̲ormat (ˢᵛw̲hole Y − 74)) c̲at "\" fill=\"#2a9d8f\"/>"
Used in: ˡd̲raw

ʰs̲ays : (Num b, Num c) => (a, b, c) -> Char

function (private) · line 218

What the top line says.

ʰs̲ays ← { (g, t, st) →
  st = 1 ? @ f̲ormat< "You reached the flag! | Coins {g} | Time {f_loor t} s"
  st = 2 ? @ f̲ormat< "Caught! | Coins {g} | Time {f_loor t} s"
  @ f̲ormat< "Coins {g} | Time {f_loor t} s | Arrows: run and jump"
}
f̲ormat< expands to
("You reached the flag! | Coins " c̲at (f̲ormat (g)) c̲at " | Time " c̲at (f̲ormat (f̲loor t)) c̲at " s")
f̲ormat< expands to
("Caught! | Coins " c̲at (f̲ormat (g)) c̲at " | Time " c̲at (f̲ormat (f̲loor t)) c̲at " s")
f̲ormat< expands to
"Coins " c̲at (f̲ormat (g)) c̲at " | Time " c̲at (f̲ormat (f̲loor t)) c̲at " s | Arrows: run and jump"
Used in: ˡd̲raw

ˡd̲raw : (Num b, Num c) => (Float, a, b, c) -> Char

function · line 227

The picture, as SVG text: the sky, then the level and every entity alive slid so that you stay in view (16 tiles wide, the rest cut off), then the top line.

ˡd̲raw ← { (W, g, t, st) →
  v ← 0.0 0.0 800.0 c̲at 60.0 + 50.0 × f̲loat R
  me ← ʰm̲e W
  cx ← 0.0 m̲ax (f̲loat C − 16) m̲in (f̲irst me s̲elect ʰp̲os W) − 7.0
  live ← w̲here ᵉᶜa̲live W
  P ← live s̲elect ʰp̲os W
  k ← (0 + live s̲elect ʰh̲asPlayer W) + (2 × 0 + live s̲elect ʰh̲asWalker W) + (3 × 0 + live s̲elect ʰh̲asCoin W) + 4 × 0 + live s̲elect ʰh̲asGoal W
  order ← g̲rade k = 1
  ents ← '{ i → e̲nclose ʰs̲prite (i s̲elect 1 s̲elect₂ P, i s̲elect 2 s̲elect₂ P, i s̲elect k) } e̲ach order
  slide ← e̲nclose @ f̲ormat< "<g transform=\"translate({sv:w_hole n_eg 50.0 * cx} 0)\">"
  top ← (20.0, 42.0, 30.0) ˢᵛw̲ords ʰs̲ays (g, t, st)
  clip ← e̲nclose @ f̲ormat< "<clipPath id=\"view\"><rect width=\"800\" height=\"{sv:w_hole 4 s_elect v}\"/></clipPath><g clip-path=\"url(#view)\">"
  v ˢᵛp̲icture (v ˢᵛr̲ect "fill=\"#8ecae6\"") c̲at clip c̲at slide c̲at (e̲nclose level) c̲at ents c̲at (e̲nclose "</g></g>") c̲at top
}
f̲ormat< expands to
("<g transform=\"translate(" c̲at (f̲ormat (ˢᵛw̲hole n̲eg 50.0 × cx)) c̲at " 0)\">")
f̲ormat< expands to
("<clipPath id=\"view\"><rect width=\"800\" height=\"" c̲at (f̲ormat (ˢᵛw̲hole 4 s̲elect v)) c̲at "\"/></clipPath><g clip-path=\"url(#view)\">")
Used in: ᵘs̲how, _