def spin

minebender-game@1.0.0.0 · solver.bend:455

import minebender-game@1.0.0.0/solver.bend as Solver
import Base
import minebender-game@1.0.0.0/types.bend as T

455# How far to rotate the far cells for c: searches for nearby cells start
456# about n cells apart, so their layouts mine different far cells.
457def spin(c: T.Pos, +w: Nat, +n: Nat, +nf: Nat) -> Nat:
458  match c:
459    case T.Pos{x, y}:
460      Nat.mod(Nat.mul(Nat.add(Nat.mul(y, w), x), Nat.add(n, 1n)), Nat.add(nf, 1n))

Uses (5)

Used by (2)