Player
The Player library allows you to access and change the settings for a player in Armada. There are 9 possible players in Armada, numbered 0 to 8. Player 0 is the neutral/world player and objects that don't belong to a specific player are owned by this one (such as the Ferengi, planets and moons).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
| color | Color | RW | Color as it will appear on the map |
| isAI | Boolean | RW | True if this is being controlled by the computer |
| maxCrew | Number | RW | Maximum crew capacity |
| maxOfficers | Number | RW | Officer limit |
| name | String | RW | The name of the player |
| number | Number | R | Slot number |
| race | Race | R | Race (Federation, Borg etc) for this player |
| resources | Resources | R | Resource counts for the player |
| slotType | Player.SlotType | R | The type of player |
Functions
- Constructors
Constructors for the Player class.
- Player( number )
Access a player by number
- Player( number )
- Instance Functions
Functions that are used with a Player instance.
- getAmountTraded( resource, direction, other )
Check trade between two players
- getRelation( other )
Check relations with another Player
- loadAIP( name )
Load a build list for the AI
- setRelation( other, relation )
Update relations with another player
- getAmountTraded( resource, direction, other )
- Enumerations
Enumerations that are part of the Player class.
- Relation
Stance between players
- SlotType
Types of player that can occupy a slot
- TradeDirection
Direction of trade resource transfer
- Relation
