def gen.left

minebender-game@1.0.0.0 · game.bend:194

import minebender-game@1.0.0.0/game.bend as Game
import Base
import minebender-game@1.0.0.0/types.bend as T

194# How many cells of ps are outside the zone.
195def gen.left(+z: Zone, ps: List<&2, T.Pos>) -> Nat:
196  match ps:
197    case Nil{}:
198      0n
199    case p <> t:
200      Nat.add(Bool.pick(Nat, gen.out(z, p), 0n, 1n), gen.left(z, t))

Uses (7)

Used by (16)