Game.edges: def of minebender-game@1.0.0.0 Import: import minebender-game@1.0.0.0/game.bend as Game Lines 429-436 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=429&end_line=436 import Base import minebender-game@1.0.0.0/types.bend as T import minebender-game@1.0.0.0/board.bend as B # The cells of ps not revealed yet but next to a revealed one. def edges(+w: Nat, +h: Nat, +shown: T.Grid(Bool), ps: List<&2, T.Pos>) -> List<&2, T.Pos>: match ps: case Nil{}: Nil{} case +p <> t: List.filter.put(T.Pos, p, edges(w, h, shown, t), Bool.not(B.at(Bool, False{}, shown, p)) && any_shown(shown, B.neighbours(w, h, p))) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.filter.put 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=at https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/board.bend&name=neighbours https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=any_shown 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