Skip to content

five-on-it / packages/ai/src/police-snipers / sniperSystem

Function: sniperSystem() ​

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

Defined in: packages/ai/src/police-snipers.ts:284

One tick of the snipers: one shot down is taken away after a while and another may come; one no longer needed (the stars below seven, its player gone) goes; the others paint their player and fire when the laser held (laserStep); then a sniper is put on a roof for each player whose stars ask for more, when the room has an actor to spare (room) and a roof near them.

Parameters ​

ai ​

AiWorld

players ​

ReadonlyMap<number, number>

order ​

readonly Wanted[]

room ​

() => number

Returns ​

void