def hc_on.cell

minebender-game@1.0.0.0 · proof_solver.bend:2468

import minebender-game@1.0.0.0/proof_solver.bend as ProofSolver
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/solver.bend as S
import minebender-game@1.0.0.0/proof_cells.bend as PS

2468def hc_on.cell(+rows: T.Grid(T.Seen), +w: Nat, +h: Nat, +p: T.Pos, +t: List<&2, T.Pos>, +b: Bool,
2469  on: {B.on_board(w, h, p) == True{} : Bool},
2470  ih: {PS.allp(~PS.WH, ~PS.onb, PS.WH{w, h}, S.hidden_cells(rows, t)) == True{} : Bool}) ->
2471  {PS.allp(~PS.WH, ~PS.onb, PS.WH{w, h}, List.filter.put(T.Pos, p, S.hidden_cells(rows, t), b)) == True{} : Bool}:
2472  match b:
2473    case False{}:
2474      ih
2475    case True{}:
2476      %Equal.sym(Bool, B.on_board(w, h, p), True{}, on) :
2477        {Bool.and(_, PS.allp(~PS.WH, ~PS.onb, PS.WH{w, h}, S.hidden_cells(rows, t))) == True{} : Bool}
2478      ih

Uses (14)

Used by (1)