Skip to content

five-on-it / packages/ai/src/police-swat / swatDispatch

Function: swatDispatch() ​

swatDispatch(ai, players, order, room, spotFor): void

Defined in: packages/ai/src/police-swat.ts:504

Sends a SWAT van to each player of order (most wanted first) whose stars ask for one more, when the room's cap has room for it (swatSystem calls it; police.ts calls it again for the players at seven stars and up after the heavy response has taken its share).

Parameters ​

ai ​

AiWorld

players ​

ReadonlyMap<number, number>

order ​

readonly Wanted[]

room ​

() => number

spotFor ​

(w, eid) => { x: number; y: number; yaw: number; z: number; } | undefined

Returns ​

void