def on_put

minebender-game@1.0.0.0 · proof_assist.bend:152

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/proof_cells.bend as PS

152def on_put(+w: Nat, +h: Nat, +p: T.Pos, +t: List<&2, T.Pos>, +b: Bool,
153  hd: {PS.onb(PS.WH{w, h}, p) == True{} : Bool}, tl: {PS.allp(~PS.WH, ~PS.onb, PS.WH{w, h}, t) == True{} : Bool}) ->
154  {PS.allp(~PS.WH, ~PS.onb, PS.WH{w, h}, List.filter.put(T.Pos, p, t, b)) == True{} : Bool}:
155  match b:
156    case False{}:
157      tl
158    case True{}:
159      %Equal.sym(Bool, PS.allp(~PS.WH, ~PS.onb, PS.WH{w, h}, t), True{}, tl) :
160        {Bool.and(PS.onb(PS.WH{w, h}, p), _) == True{} : Bool}
161      %Equal.sym(Bool, PS.onb(PS.WH{w, h}, p), True{}, hd) : {Bool.and(_, True{}) == True{} : Bool}
162      {==}

Uses (10)

Used by (1)