def flags_shown
import minebender-game@1.0.0.0/game.bend as Gameimport Base
import minebender-game@1.0.0.0/types.bend as T
585# How many flags the mine counter shows: the mines, less the flags placed.
586def flags_shown(+w: Nat, +h: Nat, +shown: T.Grid(Bool), flags: List<&2, T.Pos>) -> Nat:
587 match flags:
588 case Nil{}:
589 0n
590 case +p <> t:
591 Nat.add(Bool.pick(Nat, unrevealed(w, h, shown, p), 1n, 0n), flags_shown(w, h, shown, t))
Uses (8)
Used by (0)
No other definition uses this definition.