def touching_all.go
minebender-game@1.0.0.0 · proof_cells.bend:485
import minebender-game@1.0.0.0/proof_cells.bend as ProofCells
import Base
import minebender-game@1.0.0.0/types.bend as T
import minebender-game@1.0.0.0/board.bend as B
485def touching_all.go(+w: Nat, +h: Nat, +s: T.Pos, +q: T.Pos, +t: List<&2, T.Pos>,
486 qon: {B.on_board(w, h, q) == True{} : Bool}, +c: Bool, ce: {B.adjacent(s, q) == c : Bool},
487 ih: {allp(~WHS, ~adj_on, WHS{w, h, s}, B.touching(s, t)) == True{} : Bool}) ->
488 {allp(~WHS, ~adj_on, WHS{w, h, s}, List.filter.put(T.Pos, q, B.touching(s, t), c)) == True{} : Bool}:
489 match c:
490 case True{}:
491 %Equal.sym(Bool, B.adjacent(s, q), True{}, ce) :
492 {Bool.and(Bool.and(_, B.on_board(w, h, q)), allp(~WHS, ~adj_on, WHS{w, h, s}, B.touching(s, t))) == True{} : Bool}
493 %Equal.sym(Bool, B.on_board(w, h, q), True{}, qon) :
494 {Bool.and(Bool.and(True{}, _), allp(~WHS, ~adj_on, WHS{w, h, s}, B.touching(s, t))) == True{} : Bool}
495 ih
496 case False{}:
497 ih