#include <PlayerImpl.h>
Public Member Functions | |
void | clear () |
PlayerImpl (int id) | |
virtual int | getID () const |
virtual std::string | getName () const |
virtual const std::set< Unit * > & | getUnits () const |
virtual Race | getRace () const |
virtual PlayerType | getType () const |
virtual Force * | getForce () const |
virtual bool | isAlly (Player *player) const |
virtual bool | isEnemy (Player *player) const |
virtual bool | isNeutral () const |
virtual TilePosition | getStartLocation () const |
virtual bool | isVictorious () const |
virtual bool | isDefeated () const |
virtual bool | leftGame () const |
virtual int | minerals () const |
virtual int | gas () const |
virtual int | cumulativeMinerals () const |
virtual int | cumulativeGas () const |
virtual int | supplyTotal () const |
virtual int | supplyUsed () const |
virtual int | supplyTotal (Race race) const |
virtual int | supplyUsed (Race race) const |
virtual int | allUnitCount (UnitType unit) const |
virtual int | visibleUnitCount (UnitType unit) const |
virtual int | completedUnitCount (UnitType unit) const |
virtual int | incompleteUnitCount (UnitType unit) const |
virtual int | deadUnitCount (UnitType unit) const |
virtual int | killedUnitCount (UnitType unit) const |
virtual int | getUpgradeLevel (UpgradeType upgrade) const |
virtual bool | hasResearched (TechType tech) const |
virtual bool | isResearching (TechType tech) const |
virtual bool | isUpgrading (UpgradeType upgrade) const |
virtual BWAPI::Color | getColor () const |
virtual int | getTextColor () const |
virtual int | maxEnergy (UnitType unit) const |
virtual double | topSpeed (UnitType unit) const |
virtual int | groundWeaponMaxRange (UnitType unit) const |
virtual int | airWeaponMaxRange (UnitType unit) const |
virtual int | weaponMaxRange (WeaponType weapon) const |
virtual int | sightRange (UnitType unit) const |
virtual int | groundWeaponDamageCooldown (UnitType unit) const |
virtual int | armor (UnitType unit) const |
virtual int | getUnitScore () const |
virtual int | getKillScore () const |
virtual int | getBuildingScore () const |
virtual int | getRazingScore () const |
virtual int | getCustomScore () const |
virtual bool | isObserver () const |
Public Attributes | |
PlayerData * | self |
std::set< Unit * > | units |
BWAPI::PlayerImpl::PlayerImpl | ( | int | id | ) |
virtual int BWAPI::PlayerImpl::airWeaponMaxRange | ( | UnitType | unit | ) | const [virtual] |
Returns the max air weapon range of the given unit type, includes upgrades
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::allUnitCount | ( | UnitType | unit | ) | const [virtual] |
Returns the number of all accessible units of the given type.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::armor | ( | UnitType | unit | ) | const [virtual] |
Returns the armor of the given unit type, includes upgrades
Implements BWAPI::Player.
void BWAPI::PlayerImpl::clear | ( | ) |
virtual int BWAPI::PlayerImpl::completedUnitCount | ( | UnitType | unit | ) | const [virtual] |
Returns the number of completed units of the given type.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::cumulativeGas | ( | ) | const [virtual] |
Returns the cumulative amount of gas the player has harvested up to this point.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::cumulativeMinerals | ( | ) | const [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).
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::deadUnitCount | ( | UnitType | unit | ) | const [virtual] |
Returns the number of dead units of the given type.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::gas | ( | ) | const [virtual] |
Returns the amount of vespene gas the player has.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::getBuildingScore | ( | ) | const [virtual] |
Returns the Player's Total Buildings Score
Implements BWAPI::Player.
virtual BWAPI::Color BWAPI::PlayerImpl::getColor | ( | ) | const [virtual] |
Returns the color of the player for drawing
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::getCustomScore | ( | ) | const [virtual] |
Returns the Player's Custom Score
Implements BWAPI::Player.
virtual Force* BWAPI::PlayerImpl::getForce | ( | ) | const [virtual] |
Returns the force the player is on.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::getID | ( | ) | const [virtual] |
Returns a unique ID for the player.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::getKillScore | ( | ) | const [virtual] |
Returns the Player's Total Kill Score
Implements BWAPI::Player.
virtual std::string BWAPI::PlayerImpl::getName | ( | ) | const [virtual] |
Returns the name of the player.
Implements BWAPI::Player.
virtual Race BWAPI::PlayerImpl::getRace | ( | ) | const [virtual] |
Returns the race of the player.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::getRazingScore | ( | ) | const [virtual] |
Returns the Player's Total Razings Score
Implements BWAPI::Player.
virtual TilePosition BWAPI::PlayerImpl::getStartLocation | ( | ) | const [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.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::getTextColor | ( | ) | const [virtual] |
Returns the color of the player for text messages
Implements BWAPI::Player.
virtual PlayerType BWAPI::PlayerImpl::getType | ( | ) | const [virtual] |
Returns the type of the player.
Implements BWAPI::Player.
virtual const std::set<Unit*>& BWAPI::PlayerImpl::getUnits | ( | ) | const [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.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::getUnitScore | ( | ) | const [virtual] |
Returns the Player's Total Unit Score
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::getUpgradeLevel | ( | UpgradeType | upgrade | ) | const [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.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::groundWeaponDamageCooldown | ( | UnitType | unit | ) | const [virtual] |
Returns the ground weapon cooldown of the given unit type, includes upgrades
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::groundWeaponMaxRange | ( | UnitType | unit | ) | const [virtual] |
Returns the max ground weapon range of the given unit type, includes upgrades
Implements BWAPI::Player.
virtual bool BWAPI::PlayerImpl::hasResearched | ( | TechType | tech | ) | const [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.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::incompleteUnitCount | ( | UnitType | unit | ) | const [virtual] |
Returns the number of incomplete units of the given type.
Implements BWAPI::Player.
virtual bool BWAPI::PlayerImpl::isAlly | ( | Player * | player | ) | const [virtual] |
Returns true if other player is an ally of this player.
Implements BWAPI::Player.
virtual bool BWAPI::PlayerImpl::isDefeated | ( | ) | const [virtual] |
Returns true if the player has been defeated.
Implements BWAPI::Player.
virtual bool BWAPI::PlayerImpl::isEnemy | ( | Player * | player | ) | const [virtual] |
Returns true if other player is an enemy of this player.
Implements BWAPI::Player.
virtual bool BWAPI::PlayerImpl::isNeutral | ( | ) | const [virtual] |
Returns true if the player is the neutral player.
Implements BWAPI::Player.
virtual bool BWAPI::PlayerImpl::isObserver | ( | ) | const [virtual] |
Returns true if the Player is only observing the game, and not participating
Implements BWAPI::Player.
virtual bool BWAPI::PlayerImpl::isResearching | ( | TechType | tech | ) | const [virtual] |
Returns true if the player is researching the given tech. To order a unit to research a given tech type, see Unit::reseach.
Implements BWAPI::Player.
virtual bool BWAPI::PlayerImpl::isUpgrading | ( | UpgradeType | upgrade | ) | const [virtual] |
Returns true if the player is upgrading the given upgrade. To order a unit to upgrade a given upgrade type, see Unit::upgrade.
Implements BWAPI::Player.
virtual bool BWAPI::PlayerImpl::isVictorious | ( | ) | const [virtual] |
Returns true if the player has achieved victory.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::killedUnitCount | ( | UnitType | unit | ) | const [virtual] |
Returns the number of killed units of the given type.
Implements BWAPI::Player.
virtual bool BWAPI::PlayerImpl::leftGame | ( | ) | const [virtual] |
Returns true if the player left the game.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::maxEnergy | ( | UnitType | unit | ) | const [virtual] |
Returns the max energy of the given unit type, taking into account upgrades
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::minerals | ( | ) | const [virtual] |
Returns the amount of minerals the player has.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::sightRange | ( | UnitType | unit | ) | const [virtual] |
Returns the sight range of the given unit type, includes upgrades
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::supplyTotal | ( | ) | const [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.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::supplyTotal | ( | Race | race | ) | const [virtual] |
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::supplyUsed | ( | ) | const [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.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::supplyUsed | ( | Race | race | ) | const [virtual] |
Implements BWAPI::Player.
virtual double BWAPI::PlayerImpl::topSpeed | ( | UnitType | unit | ) | const [virtual] |
Returns the top speed of the given unit type, includes upgrades
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::visibleUnitCount | ( | UnitType | unit | ) | const [virtual] |
Returns the number of visible units of the given type.
Implements BWAPI::Player.
virtual int BWAPI::PlayerImpl::weaponMaxRange | ( | WeaponType | weapon | ) | const [virtual] |
Returns the max range of the given weapon with upgrades
Implements BWAPI::Player.
std::set<Unit*> BWAPI::PlayerImpl::units |