def plan_qs

minebender-game@1.0.0.0 · proof_solver.bend:2633

import minebender-game@1.0.0.0/proof_solver.bend as ProofSolver
import Base
import minebender-game@1.0.0.0/types.bend as T
import minebender-game@1.0.0.0/solver.bend as S

2633# The heuristic order of the search for c, as the plan builds it.
2634def plan_qs(+c: T.Pos, +w: Nat, +h: Nat, +ts: List<&2, S.Todo>) -> List<&2, T.Pos>:
2635  +near = S.nears(ts)
2636  +fuel = Nat.add(List.length(&2, S.Todo, near), 1n)
2637  +relg = S.rel_grid(w, h, near)
2638  List.append(&2, T.Pos, S.linked(c, w, h, fuel, relg), S.groups(w, h, near, fuel, relg))

Uses (11)

Used by (2)