LAWS.open_mine: law of minebender-game@1.0.0.0 Import: import minebender-game@1.0.0.0/LAWS.bend as LAWS Lines 341-353 of minebender-game@1.0.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=minebender-game@1.0.0.0/LAWS.bend&start_line=341&end_line=353 import Base import minebender-game@1.0.0.0/types.bend as T import minebender-game@1.0.0.0/game.bend as G # LAW: "Revealing a mine loses, naming that mine, and shows it as Boom." law open_mine: for w: Nat for h: Nat for layout: T.Grid(Bool) for shape: {shaped(Bool, w, h, layout) == True{} : Bool} for g: G.Game for r: Reachable(w, h, layout, g) for playing: {G.status(g) == T.Playing{} : T.Status} for p: T.Pos for boom: {mine(layout, p) == True{} : Bool} {G.status(G.open(g, p)) == T.Lost{T.Exploded{p}} : T.Status} & {seen(G.knowledge(G.open(g, p)), p) == T.Boom{} : T.Seen} Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/LAWS.bend&name=Reachable https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/LAWS.bend&name=mine https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/LAWS.bend&name=seen https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/LAWS.bend&name=shaped https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=Game https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=knowledge https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=open https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=status https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_laws.bend&name=open_mine_ 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=Loss https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Pos https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Seen https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Status