Game.safe_list: def of minebender-game@1.0.0.0 Import: import minebender-game@1.0.0.0/game.bend as Game Lines 443-449 of minebender-game@1.0.0.0/game.bend: https://jend.leeeet.dev/read.txt?path=minebender-game@1.0.0.0/game.bend&start_line=443&end_line=449 import Base import minebender-game@1.0.0.0/types.bend as T import minebender-game@1.0.0.0/board.bend as B # Where the assist looks for a safe cell, k being a random number: first # the hidden cells next to a revealed one, then every cell, each from a # random point; last every cell in order, which never comes into play but # lets the proofs see a safe cell is always found. def safe_list(+w: Nat, +h: Nat, +shown: T.Grid(Bool), +k: Nat) -> List<&2, T.Pos>: +cs = B.cells(w, h) List.append(&2, T.Pos, turn(edges(w, h, shown, cs), k), List.append(&2, T.Pos, turn(cs, k), cs)) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/board.bend&name=cells https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=edges https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=turn https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Grid https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Pos