LAWS.gen_opening: law of minebender-game@1.0.0.0 Import: import minebender-game@1.0.0.0/LAWS.bend as LAWS Lines 577-588 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=577&end_line=588 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: "When there's room, the first click opens an area: no mine on it or # next to it." (As in Windows Vista and later.) law gen_opening: for w: Nat for h: Nat for n: Nat for first: T.Pos for rs: List<&2, U32> for room: {Nat.is_le(Nat.add(n, 9n), Nat.mul(w, h)) == True{} : Bool} for q: T.Pos for near: {within_one(first, q) == True{} : Bool} {mine(G.place_mines(w, h, n, first, rs), q) == False{} : Bool} Uses (12): 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=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 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=within_one https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/game.bend&name=place_mines https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/proof_gen.bend&name=gen_opening_ https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Pos