five-on-it / packages/ai/src/police-precrime / chokepointAhead
Function: chokepointAhead()
chokepointAhead(
level,graph,route,min,max):Chokepoint|undefined
Defined in: packages/ai/src/police-precrime.ts:237
The chokepoint a roadblock is set at on a predicted route between min and max metres along it: the first bridge or tunnel (in the middle of its span, held within the window), else the first long stretch without a junction (the middle of what of it lies in the window), else the road at the window's start; always clear of a junction's box. undefined when the route ends before min.
Parameters
level
graph
route
min
number
max
number
Returns
Chokepoint | undefined