Skip to content

five-on-it / packages/ai/src/police-negotiator / negotiatorSystem

Function: negotiatorSystem() ​

negotiatorSystem(ai, players, order): void

Defined in: packages/ai/src/police-negotiator.ts:123

One tick of the negotiator (see the module documentation): each talk ends when its time is up, its captives are let go (a star dropped) or hurt (the team goes in), its player drives off or is no longer wanted enough; a call comes to each player (most wanted first) who holds a captive inside or in cover with a SWAT team out after them, once each time they are wanted; each team holds while its player talks.

Parameters ​

ai ​

AiWorld

players ​

ReadonlyMap<number, number>

order ​

readonly Wanted[]

Returns ​

void