Overview
An array of objects that describe each player on the map.By inspecting the player data stored in this array, you can determine some useful information about your opponents/allies.
The index of each element in the array relates to the player ID. So the data for player 0 will be in playerData[0] and so on.
Properties
Each (numerically referenced) element in the array contains an object with the following properties:
Property | Description |
---|---|
difficulty | The player's difficulty level (only applicable for AI players). |
colour | The player's colour name, as a string. |
position | The map position (integer) to which the player is assigned. You can find it's x,y co-ordinates by cross-referencing against the startPositions array. |
team | The team to which the player is assigned, if applicable. |
Examples
To follow