Skip to content

five-on-it / packages/ai/src/police-boats / boatSystem

Function: boatSystem() ​

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

Defined in: packages/ai/src/police-boats.ts:112

One tick of the boats: one whose crew is shot is left on the water (another later); one no longer needed (its player gone, the stars below seven, back on land a while) is taken away; the others steer for their player and spray them; then a boat is sent onto the water of each player on it whose stars ask for more, when it is time and the room has the actors (room).

Parameters ​

ai ​

AiWorld

players ​

ReadonlyMap<number, number>

order ​

readonly Wanted[]

room ​

() => number

Returns ​

void