LAWS.within_one: def of minebender-game@1.0.0.0 Import: import minebender-game@1.0.0.0/LAWS.bend as LAWS Lines 42-46 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=42&end_line=46 import Base import minebender-game@1.0.0.0/types.bend as T # p and q are at most one step apart in each direction (or the same cell). def within_one(p: T.Pos, q: T.Pos) -> Bool: match p q: case T.Pos{px, py} T.Pos{qx, qy}: Nat.is_le(dist(px, qx), 1n) && Nat.is_le(dist(py, qy), 1n) Uses (5): 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=Nat.is_le https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/LAWS.bend&name=dist https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Pos