Skip to content

five-on-it / packages/ai/src/crowd / roleWeights

Function: roleWeights() ​

roleWeights(minutes, mix?): readonly ["civilian" | "shopkeeper" | "jogger" | "commuter" | "dog_walker" | "vendor" | "smoker" | "queuer" | "sitter" | "foot_officer" | "street_sweeper" | "dog", number][]

Defined in: packages/ai/src/crowd.ts:216

The weight of each role at a time of day: ROLE_MIX by day, or a district's own mix (the roles it suggests with their weights, LevelData.districts[].pedestrians; a role it leaves out never comes there), by the hour of CROWD_HOURS.

Parameters ​

minutes ​

number

mix? ​

Readonly<Record<string, number>>

Returns ​

readonly ["civilian" | "shopkeeper" | "jogger" | "commuter" | "dog_walker" | "vendor" | "smoker" | "queuer" | "sitter" | "foot_officer" | "street_sweeper" | "dog", number][]