Army
Terminology:
Army/group: a group of players working together
Leader: player who “dictates” the actions of the group
Follower: player who follows the leader’s actions
Properties
Section titled “Properties”Type: Bot
config
Section titled “config”The config file for this group.
Type: Config<ArmyConfig>
isInitialized
Section titled “isInitialized”Whether the army is initialized.
Type: boolean
players
Section titled “players”The players in this group.
Type: Set<string>
roomNumber
Section titled “roomNumber”The room number to join.
Type: string
Methods
Section titled “Methods”getPlayerNumber
Section titled “getPlayerNumber”Gets the player number position in the army.
Returns: number
Initializes everything needed to begin armying.
Returns: Promise<boolean>
isLeader
Section titled “isLeader”Whether this player is the leader of the army.
Returns: boolean
setConfigName
Section titled “setConfigName”Sets the config file name.
| Parameter | Type | Description |
|---|---|---|
| fileName | string | The name of the config file. |
Returns: void
waitForAll
Section titled “waitForAll”Waits for all players in the army in the map.
Returns: Promise<void>