BWAPI
Represents the type of controller for the player slot (i.e. human, computer).
BWAPI.PlayerTypes
Constructors
PlayerType([id = PlayerTypes.Enum.None])
Expected type constructor.
If the type is an invalid type, then it becomes Unknown
. A type is invalid if its value is less than 0 or greater than Unknown
.
- param int id
The id that corresponds to this type. It is typically an integer value that corresponds to an internal Broodwar type. If the given id is invalid, then it becomes
Unknown
.
Member Functions
isGameType() -> boolean
Identifies whether or not this type is used in-game.
A type such as PlayerTypes.Closed
would not be a valid in-game type.
- return
true if the type can appear in-game, false otherwise.
- rtype
boolean
isLobbyType
isLobbyType() -> boolean
Identifies whether or not this type is used for the pre-game lobby.
A type such as PlayerTypes.ComputerLeft
would only appear in-game when a computer player is defeated.
- return
true if this type can appear in the pre-game lobby, false otherwise.
- rtype
boolean
A container for a set of PlayerType
objects.
Constructors
PlayerTypeset()
Default constructor.
PlayerTypeset(set)
Copy constructor.
- param BWAPI.PlayerTypeset set
The PlayerTypeset to copy.
PlayerTypeset(tbl)
Constructor to convert a Lua table to a set. Any values in the table that are of type PlayerType
are added to the set.
- param table tbl
A table containing
PlayerType
objects.
Member Functions