Skip to content

five-on-it / packages/ai/src/police-roadblocks / roadblockSystem

Function: roadblockSystem() ​

roadblockSystem(ai, players, order, room): void

Defined in: packages/ai/src/police-roadblocks.ts:167

One tick of the barricades: those whose player is gone, past them, far, out of time or below the stars that set them are cleared (the strip picked up), and their officers and cars go once no player is near; then one is set ahead of each wanted player at the wheel whose stars ask for more, when it is time and the room has the actors to spare (room: how many more it may put out).

Parameters ​

ai ​

AiWorld

players ​

ReadonlyMap<number, number>

order ​

readonly Wanted[]

room ​

() => number

Returns ​

void