BWAPI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
BWAPI::Player Class Reference

#include <Player.h>

Inheritance diagram for BWAPI::Player:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual int getID () const =0
virtual std::string getName () const =0
virtual const std::set< Unit * > & getUnits () const =0
virtual Race getRace () const =0
virtual PlayerType getType () const =0
virtual ForcegetForce () const =0
virtual bool isAlly (Player *player) const =0
virtual bool isEnemy (Player *player) const =0
virtual bool isNeutral () const =0
virtual TilePosition getStartLocation () const =0
virtual bool isVictorious () const =0
virtual bool isDefeated () const =0
virtual bool leftGame () const =0
virtual int minerals () const =0
virtual int gas () const =0
virtual int gatheredMinerals () const =0
virtual int gatheredGas () const =0
virtual int repairedMinerals () const =0
virtual int repairedGas () const =0
virtual int refundedMinerals () const =0
virtual int refundedGas () const =0
virtual int spentMinerals () const =0
virtual int spentGas () const =0
virtual int supplyTotal () const =0
virtual int supplyTotal (Race race) const =0
virtual int supplyUsed () const =0
virtual int supplyUsed (Race race) const =0
virtual int allUnitCount (UnitType unit) const =0
virtual int visibleUnitCount (UnitType unit) const =0
virtual int completedUnitCount (UnitType unit) const =0
virtual int incompleteUnitCount (UnitType unit) const =0
virtual int deadUnitCount (UnitType unit) const =0
virtual int killedUnitCount (UnitType unit) const =0
virtual int getUpgradeLevel (UpgradeType upgrade) const =0
virtual bool hasResearched (TechType tech) const =0
virtual bool isResearching (TechType tech) const =0
virtual bool isUpgrading (UpgradeType upgrade) const =0
virtual BWAPI::Color getColor () const =0
virtual int getTextColor () const =0
virtual int maxEnergy (UnitType unit) const =0
virtual double topSpeed (UnitType unit) const =0
virtual int groundWeaponMaxRange (UnitType unit) const =0
virtual int airWeaponMaxRange (UnitType unit) const =0
virtual int weaponMaxRange (WeaponType weapon) const =0
virtual int sightRange (UnitType unit) const =0
virtual int groundWeaponDamageCooldown (UnitType unit) const =0
virtual int armor (UnitType unit) const =0
virtual int getUnitScore () const =0
virtual int getKillScore () const =0
virtual int getBuildingScore () const =0
virtual int getRazingScore () const =0
virtual int getCustomScore () const =0
virtual bool isObserver () const =0
virtual int getMaxUpgradeLevel (UpgradeType upgrade) const =0
virtual bool isResearchAvailable (TechType tech) const =0
virtual bool isUnitAvailable (UnitType unit) const =0

Protected Member Functions

virtual ~Player ()

Detailed Description

Each player in a match will have his or her own player instance. There is also a neutral player which owns all the neutral units.


Constructor & Destructor Documentation

virtual BWAPI::Player::~Player ( ) [inline, protected, virtual]

Member Function Documentation

virtual int BWAPI::Player::airWeaponMaxRange ( UnitType  unit) const [pure virtual]

Returns the max air weapon range of the given unit type, includes upgrades

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::allUnitCount ( UnitType  unit) const [pure virtual]

Returns the number of all accessible units of the given type.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::armor ( UnitType  unit) const [pure virtual]

Returns the armor of the given unit type, includes upgrades

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::completedUnitCount ( UnitType  unit) const [pure virtual]

Returns the number of completed units of the given type.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::deadUnitCount ( UnitType  unit) const [pure virtual]

Returns the number of dead units of the given type.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::gas ( ) const [pure virtual]

Returns the amount of vespene gas the player has.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::gatheredGas ( ) const [pure virtual]

Returns the cumulative amount of gas the player has harvested up to this point.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::gatheredMinerals ( ) const [pure virtual]

Returns the cumulative amount of minerals the player has mined up to this point (including the 50 minerals at the start of the game).

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::getBuildingScore ( ) const [pure virtual]

Returns the Player's Total Buildings Score

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual BWAPI::Color BWAPI::Player::getColor ( ) const [pure virtual]

Returns the color of the player for drawing

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::getCustomScore ( ) const [pure virtual]

Returns the Player's Custom Score

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual Force* BWAPI::Player::getForce ( ) const [pure virtual]

Returns the force the player is on.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::getID ( ) const [pure virtual]

Returns a unique ID for the player.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::getKillScore ( ) const [pure virtual]

Returns the Player's Total Kill Score

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::getMaxUpgradeLevel ( UpgradeType  upgrade) const [pure virtual]

Returns the maximum upgrades available specific to the player (Use Map Settings).

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual std::string BWAPI::Player::getName ( ) const [pure virtual]

Returns the name of the player.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual Race BWAPI::Player::getRace ( ) const [pure virtual]

Returns the race of the player.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::getRazingScore ( ) const [pure virtual]

Returns the Player's Total Razings Score

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual TilePosition BWAPI::Player::getStartLocation ( ) const [pure virtual]

Returns the starting location of the player. If complete map information is disabled, this function will return TilePositions::Unknown for enemy players. For the complete set of starting locations for the current map, see Game::getStartLocations.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::getTextColor ( ) const [pure virtual]

Returns the color of the player for text messages

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual PlayerType BWAPI::Player::getType ( ) const [pure virtual]

Returns the type of the player.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual const std::set<Unit*>& BWAPI::Player::getUnits ( ) const [pure virtual]

Returns the set of units the player own. Note that units loaded into Terran dropships, Terran bunkers, Terran refineries, Protoss assimilators, and Zerg extractors are not yet included in the set.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::getUnitScore ( ) const [pure virtual]

Returns the Player's Total Unit Score

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::getUpgradeLevel ( UpgradeType  upgrade) const [pure virtual]

Returns the player's current upgrade level of the given upgrade. To order a unit to upgrade a given upgrade type, see Unit::upgrade.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::groundWeaponDamageCooldown ( UnitType  unit) const [pure virtual]

Returns the ground weapon cooldown of the given unit type, includes upgrades

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::groundWeaponMaxRange ( UnitType  unit) const [pure virtual]

Returns the max ground weapon range of the given unit type, includes upgrades

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual bool BWAPI::Player::hasResearched ( TechType  tech) const [pure virtual]

Returns true if the player has finished researching the given tech. To order a unit to research a given tech type, see Unit::research.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::incompleteUnitCount ( UnitType  unit) const [pure virtual]

Returns the number of incomplete units of the given type.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Player::isAlly ( Player player) const [pure virtual]

Returns true if other player is an ally of this player.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Player::isDefeated ( ) const [pure virtual]

Returns true if the player has been defeated.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Player::isEnemy ( Player player) const [pure virtual]

Returns true if other player is an enemy of this player.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Player::isNeutral ( ) const [pure virtual]

Returns true if the player is the neutral player.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Player::isObserver ( ) const [pure virtual]

Returns true if the Player is only observing the game, and not participating

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Player::isResearchAvailable ( TechType  tech) const [pure virtual]

Returns true if the research is available for the player to research (Use Map Settings).

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual bool BWAPI::Player::isResearching ( TechType  tech) const [pure virtual]

Returns true if the player is researching the given tech. To order a unit to research a given tech type, see Unit::reseach.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Player::isUnitAvailable ( UnitType  unit) const [pure virtual]

Returns true if the unit is available for the player to build (Use Map Settings).

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual bool BWAPI::Player::isUpgrading ( UpgradeType  upgrade) const [pure virtual]

Returns true if the player is upgrading the given upgrade. To order a unit to upgrade a given upgrade type, see Unit::upgrade.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Player::isVictorious ( ) const [pure virtual]

Returns true if the player has achieved victory.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::killedUnitCount ( UnitType  unit) const [pure virtual]

Returns the number of killed units of the given type.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual bool BWAPI::Player::leftGame ( ) const [pure virtual]

Returns true if the player left the game.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::maxEnergy ( UnitType  unit) const [pure virtual]

Returns the max energy of the given unit type, taking into account upgrades

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::minerals ( ) const [pure virtual]

Returns the amount of minerals the player has.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::refundedGas ( ) const [pure virtual]

Returns the cumulative amount of gas the player has gained from refunded units up to this point.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::refundedMinerals ( ) const [pure virtual]

Returns the cumulative amount of minerals the player has gained from refunded units up to this point.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::repairedGas ( ) const [pure virtual]

Returns the cumulative amount of gas the player has spent on repairs up to this point.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::repairedMinerals ( ) const [pure virtual]

Returns the cumulative amount of minerals the player has spent on repairs up to this point.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::sightRange ( UnitType  unit) const [pure virtual]

Returns the sight range of the given unit type, includes upgrades

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::spentGas ( ) const [pure virtual]

Returns the cumulative amount of gas the player has spent up to this point (not including repairs).

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::spentMinerals ( ) const [pure virtual]

Returns the cumulative amount of minerals the player has spent up to this point (not including repairs).

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::supplyTotal ( ) const [pure virtual]

Returns the total amount of supply the player has. If a race is provided, the total supply for the given race will be returned, otherwise the player's initial race will be used. Supply counts returned by BWAPI are double what you would expect to see from playing the game. This is because zerglings take up 0.5 in-game supply.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::supplyTotal ( Race  race) const [pure virtual]

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::supplyUsed ( ) const [pure virtual]

Returns how much of the supply is actually being used by units. If a race is provided, the used supply for the given race will be returned, otherwise the player's initial race will be used. Supply counts returned by BWAPI are double what you would expect to see from playing the game. This is because zerglings take up 0.5 in-game supply.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:

virtual int BWAPI::Player::supplyUsed ( Race  race) const [pure virtual]

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual double BWAPI::Player::topSpeed ( UnitType  unit) const [pure virtual]

Returns the top speed of the given unit type, includes upgrades

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::visibleUnitCount ( UnitType  unit) const [pure virtual]

Returns the number of visible units of the given type.

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

virtual int BWAPI::Player::weaponMaxRange ( WeaponType  weapon) const [pure virtual]

Returns the max range of the given weapon with upgrades

Implemented in BWAPI::PlayerImpl, and BWAPI::PlayerImpl.

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines