Solver.spin: def of minebender-game@1.0.0.0 Import: import minebender-game@1.0.0.0/solver.bend as Solver Lines 455-460 of minebender-game@1.0.0.0/solver.bend: https://jend.leeeet.dev/read.txt?path=minebender-game@1.0.0.0/solver.bend&start_line=455&end_line=460 import Base import minebender-game@1.0.0.0/types.bend as T # How far to rotate the far cells for c: searches for nearby cells start # about n cells apart, so their layouts mine different far cells. def spin(c: T.Pos, +w: Nat, +n: Nat, +nf: Nat) -> Nat: match c: case T.Pos{x, y}: Nat.mod(Nat.mul(Nat.add(Nat.mul(y, w), x), Nat.add(n, 1n)), Nat.add(nf, 1n)) Uses (5): 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.mod https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=minebender-game@1.0.0.0/types.bend&name=Pos