pub fn edge_exists(a: TreeCoord, b: TreeCoord) -> boolExpand description
Procgen decision: does an edge exist between two neighboring lots?
Returns false for non-neighbors. Both lots must actually contain a
node — call node_at first.
Three sources of edges, OR’d together:
- Anchor edges — every non-origin populated lot has a
guaranteed edge to its
anchor_ofneighbor. Keeps every node reachable from origin transitively even when the random rolls come up empty. - Orthogonal procgen edges — random roll with probability driven by a low-frequency density-noise field. Probability ranges from ~50% in “sinuous” regions to ~95% in “dense” pockets. Adjacent boxes might NOT be connected in sinuous zones, which is the explorational variety the player wants.
- Diagonal procgen edges — same noise-driven probability scaled to a lower band (~8% sparse, ~28% dense), plus the hard suppression when both L-bend corner lots are occupied (the visual line would otherwise cross an unrelated box).