def nos_list

minebender-game@1.0.0.0 · proof_assist.bend:191

import minebender-game@1.0.0.0/proof_assist.bend as ProofAssist
import Base
import minebender-game@1.0.0.0/types.bend as T
import minebender-game@1.0.0.0/board.bend as B
import minebender-game@1.0.0.0/game.bend as G

191# While a safe cell is hidden, the assist's list holds one.
192def nos_list(+w: Nat, +h: Nat, +layout: T.Grid(Bool), +shown: T.Grid(Bool), +k: Nat,
193  nos: {G.all_safe(w, h, layout, shown) == False{} : Bool}) ->
194  {G.all_safe.go(layout, shown, G.safe_list(w, h, shown, k)) == False{} : Bool}:
195  +cs = B.cells(w, h)
196  all_safe_append(layout, shown, G.turn(G.edges(w, h, shown, cs), k), List.append(&2, T.Pos, G.turn(cs, k), cs),
197    all_safe_append(layout, shown, G.turn(cs, k), cs, nos))

Uses (12)

Used by (1)