Find the buildings that are cut off from the rest of your city by a gap in the road
A farm can sit right next to a road and still deliver nothing, because that road never reaches the town. Here is a check that follows the roads from the start point and lists every building that is not truly connected, so the game can warn the player.
Why this works
Lying next to a road and being connected are different things: connection means you can travel from the start along roads. Spreading out from the start once and marking everything reached answers the question for every building at the same time.
When not to use it
Not enough when roads are one-way, differ in speed, or can carry only so much. Connected is then no longer a yes or no, and you need the shortest route or the capacity instead. Also overkill on a small map where you can see the gaps yourself.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 42 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Find the buildings that are cut off from the rest of your city by a gap in the road" (read_entry road-network-reachability-check) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP