From 908cca824fcd3390164364ad8e9b338a973eee31 Mon Sep 17 00:00:00 2001 From: Grimsace Date: Wed, 4 Feb 2026 15:21:45 -0600 Subject: [PATCH] stopped branches between exits for roads --- roads.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/roads.go b/roads.go index 4c5cc55..599d132 100644 --- a/roads.go +++ b/roads.go @@ -13,6 +13,7 @@ import ( type PointOfInterest struct { X, Y int Connections int + IsExit bool } type Road struct { @@ -108,7 +109,8 @@ func generatePOIs(width, height int, settings *Settings, allWaterPixels []image. } } if found { - pois = append(pois, &PointOfInterest{X: x, Y: y}) + isExit := i < numExits + pois = append(pois, &PointOfInterest{X: x, Y: y, IsExit: isExit}) } } @@ -169,6 +171,11 @@ func connectPOIs(pois []*PointOfInterest, width, height int, settings *Settings, continue } + // Don't connect two exit points + if poi.IsExit && other.IsExit { + continue + } + if closest == nil || dist < minDist { minDist = dist closest = other