def count_mines

minebender-game@1.0.0.0 · LAWS.bend:83

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

83def count_mines(+layout: T.Grid(Bool), ps: List<&2, T.Pos>) -> Nat:
84  match ps:
85    case Nil{}:
86      0n
87    case q <> t:
88      Nat.add(Bool.pick(Nat, mine(layout, q), 1n, 0n), count_mines(layout, t))

Uses (8)

Used by (3)