def gen.left
import minebender-game@1.0.0.0/game.bend as Gameimport 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))