#include <Player.h>
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 Force * | getForce () 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 | cumulativeMinerals () const =0 |
virtual int | cumulativeGas () 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 |
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.
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.
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.
virtual int BWAPI::Player::armor | ( | UnitType | unit | ) | const [pure virtual] |
Returns the armor of the given unit type, includes upgrades
Implemented in 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.
virtual int BWAPI::Player::cumulativeGas | ( | ) | const [pure virtual] |
Returns the cumulative amount of gas the player has harvested up to this point.
Implemented in BWAPI::PlayerImpl.
virtual int BWAPI::Player::cumulativeMinerals | ( | ) | 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.
virtual int BWAPI::Player::deadUnitCount | ( | UnitType | unit | ) | const [pure virtual] |
Returns the number of dead units of the given type.
Implemented in BWAPI::PlayerImpl.
virtual int BWAPI::Player::gas | ( | ) | const [pure virtual] |
Returns the amount of vespene gas the player has.
Implemented in BWAPI::PlayerImpl.
virtual int BWAPI::Player::getBuildingScore | ( | ) | const [pure virtual] |
Returns the Player's Total Buildings Score
Implemented in BWAPI::PlayerImpl.
virtual BWAPI::Color BWAPI::Player::getColor | ( | ) | const [pure virtual] |
Returns the color of the player for drawing
Implemented in BWAPI::PlayerImpl.
virtual int BWAPI::Player::getCustomScore | ( | ) | const [pure virtual] |
Returns the Player's Custom Score
Implemented in BWAPI::PlayerImpl.
virtual Force* BWAPI::Player::getForce | ( | ) | const [pure virtual] |
Returns the force the player is on.
Implemented in BWAPI::PlayerImpl.
virtual int BWAPI::Player::getID | ( | ) | const [pure virtual] |
Returns a unique ID for the player.
Implemented in BWAPI::PlayerImpl.
virtual int BWAPI::Player::getKillScore | ( | ) | const [pure virtual] |
Returns the Player's Total Kill Score
Implemented in BWAPI::PlayerImpl.
virtual std::string BWAPI::Player::getName | ( | ) | const [pure virtual] |
Returns the name of the player.
Implemented in BWAPI::PlayerImpl.
virtual Race BWAPI::Player::getRace | ( | ) | const [pure virtual] |
Returns the race of the player.
Implemented in BWAPI::PlayerImpl.
virtual int BWAPI::Player::getRazingScore | ( | ) | const [pure virtual] |
Returns the Player's Total Razings Score
Implemented in 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.
virtual int BWAPI::Player::getTextColor | ( | ) | const [pure virtual] |
Returns the color of the player for text messages
Implemented in BWAPI::PlayerImpl.
virtual PlayerType BWAPI::Player::getType | ( | ) | const [pure virtual] |
Returns the type of the player.
Implemented in BWAPI::PlayerImpl.
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.
virtual int BWAPI::Player::getUnitScore | ( | ) | const [pure virtual] |
Returns the Player's Total Unit Score
Implemented in 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.
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.
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.
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.
virtual int BWAPI::Player::incompleteUnitCount | ( | UnitType | unit | ) | const [pure virtual] |
Returns the number of incomplete units of the given type.
Implemented in BWAPI::PlayerImpl.
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.
virtual bool BWAPI::Player::isDefeated | ( | ) | const [pure virtual] |
Returns true if the player has been defeated.
Implemented in BWAPI::PlayerImpl.
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.
virtual bool BWAPI::Player::isNeutral | ( | ) | const [pure virtual] |
Returns true if the player is the neutral player.
Implemented in BWAPI::PlayerImpl.
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.
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.
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.
virtual bool BWAPI::Player::isVictorious | ( | ) | const [pure virtual] |
Returns true if the player has achieved victory.
Implemented in BWAPI::PlayerImpl.
virtual int BWAPI::Player::killedUnitCount | ( | UnitType | unit | ) | const [pure virtual] |
Returns the number of killed units of the given type.
Implemented in BWAPI::PlayerImpl.
virtual bool BWAPI::Player::leftGame | ( | ) | const [pure virtual] |
Returns true if the player left the game.
Implemented in BWAPI::PlayerImpl.
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.
virtual int BWAPI::Player::minerals | ( | ) | const [pure virtual] |
Returns the amount of minerals the player has.
Implemented in 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.
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.
virtual int BWAPI::Player::supplyTotal | ( | Race | race | ) | const [pure virtual] |
Implemented in 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.
virtual int BWAPI::Player::supplyUsed | ( | Race | race | ) | const [pure virtual] |
Implemented in 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.
virtual int BWAPI::Player::visibleUnitCount | ( | UnitType | unit | ) | const [pure virtual] |
Returns the number of visible units of the given type.
Implemented in 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.