public class Player
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
int |
airWeaponMaxRange(UnitType unit)
Returns the max air weapon range of the given unit type, includes upgrades
|
int |
allUnitCount(UnitType unit)
Returns the number of all accessible units of the given type.
|
int |
armor(UnitType unit)
Returns the armor of the given unit type, includes upgrades
|
int |
completedUnitCount(UnitType unit)
Returns the number of completed units of the given type.
|
int |
deadUnitCount(UnitType unit)
Returns the number of dead units of the given type.
|
int |
gas()
Returns the amount of vespene gas the player has.
|
int |
gatheredGas()
Returns the cumulative amount of gas the player has harvested up to this point.
|
int |
gatheredMinerals()
Returns the cumulative amount of minerals the player has mined up to this point (including the 50
minerals at the start of the game).
|
int |
getBuildingScore()
Returns the Player's Total Buildings Score
|
Color |
getColor()
Returns the color of the player for drawing
|
int |
getCustomScore()
Returns the Player's Custom Score
|
Force |
getForce()
Returns the force the player is on.
|
int |
getID()
Returns a unique ID for the player.
|
int |
getKillScore()
Returns the Player's Total Kill Score
|
java.lang.String |
getName()
Returns the name of the player.
|
Race |
getRace()
Returns the race of the player.
|
int |
getRazingScore()
Returns the Player's Total Razings Score
|
TilePosition |
getStartLocation()
Returns the starting location of the player.
|
int |
getTextColor()
Returns the color of the player for text messages
|
PlayerType |
getType()
Returns the type of the player.
|
java.util.List<Unit> |
getUnits()
Returns the set of units the player own.
|
int |
getUnitScore()
Returns the Player's Total Unit Score
|
int |
groundWeaponDamageCooldown(UnitType unit)
Returns the ground weapon cooldown of the given unit type, includes upgrades
|
int |
groundWeaponMaxRange(UnitType unit)
Returns the max ground weapon range of the given unit type, includes upgrades
|
boolean |
hasResearched(TechType tech)
Returns the player's current upgrade level of the given upgrade.
|
int |
incompleteUnitCount(UnitType unit)
Returns the number of incomplete units of the given type.
|
boolean |
isAlly(Player player)
Returns true if other player is an ally of this player.
|
boolean |
isDefeated()
Returns true if the player has been defeated.
|
boolean |
isEnemy(Player player)
Returns true if other player is an enemy of this player.
|
boolean |
isNeutral()
Returns true if the player is the neutral player.
|
boolean |
isObserver()
Returns true if the Player is only observing the game, and not participating
|
boolean |
isResearchAvailable(TechType tech)
Returns the maximum upgrades available specific to the player (Use Map Settings).
|
boolean |
isResearching(TechType tech)
Returns true if the player is researching the given tech.
|
boolean |
isUnitAvailable(UnitType unit)
Returns true if the unit is available for the player to build (Use Map Settings).
|
boolean |
isUpgrading(UpgradeType upgrade)
Returns true if the player is upgrading the given upgrade.
|
boolean |
isVictorious()
Returns true if the player has achieved victory.
|
int |
killedUnitCount(UnitType unit)
Returns the number of killed units of the given type.
|
boolean |
leftGame()
Returns true if the player left the game.
|
int |
maxEnergy(UnitType unit)
Returns the max energy of the given unit type, taking into account upgrades
|
int |
minerals()
Returns the amount of minerals the player has.
|
int |
refundedGas()
Returns the cumulative amount of gas the player has gained from refunded units up to this point.
|
int |
refundedMinerals()
Returns the cumulative amount of minerals the player has gained from refunded units up to this point.
|
int |
repairedGas()
Returns the cumulative amount of gas the player has spent on repairs up to this point.
|
int |
repairedMinerals()
Returns the cumulative amount of minerals the player has spent on repairs up to this point.
|
int |
sightRange(UnitType unit)
Returns the sight range of the given unit type, includes upgrades
|
int |
spentGas()
Returns the cumulative amount of gas the player has spent up to this point (not including repairs).
|
int |
spentMinerals()
Returns the cumulative amount of minerals the player has spent up to this point (not including repairs).
|
int |
supplyTotal()
Returns the total amount of supply the player has.
|
int |
supplyTotal(Race race) |
int |
supplyUsed()
Returns how much of the supply is actually being used by units.
|
int |
supplyUsed(Race race) |
double |
topSpeed(UnitType unit)
Returns the top speed of the given unit type, includes upgrades
|
int |
visibleUnitCount(UnitType unit)
Returns the number of visible units of the given type.
|
int |
weaponMaxRange(WeaponType weapon)
Returns the max range of the given weapon with upgrades
|
public int getID()
public java.lang.String getName()
public java.util.List<Unit> getUnits()
public Race getRace()
public PlayerType getType()
public Force getForce()
public boolean isAlly(Player player)
public boolean isEnemy(Player player)
public boolean isNeutral()
public TilePosition getStartLocation()
public boolean isVictorious()
public boolean isDefeated()
public boolean leftGame()
public int minerals()
public int gas()
public int gatheredMinerals()
public int gatheredGas()
public int repairedMinerals()
public int repairedGas()
public int refundedMinerals()
public int refundedGas()
public int spentMinerals()
public int spentGas()
public int supplyTotal()
public int supplyTotal(Race race)
public int supplyUsed()
public int supplyUsed(Race race)
public int allUnitCount(UnitType unit)
public int visibleUnitCount(UnitType unit)
public int completedUnitCount(UnitType unit)
public int incompleteUnitCount(UnitType unit)
public int deadUnitCount(UnitType unit)
public int killedUnitCount(UnitType unit)
public boolean hasResearched(TechType tech)
public boolean isResearching(TechType tech)
public boolean isUpgrading(UpgradeType upgrade)
public Color getColor()
public int getTextColor()
public int maxEnergy(UnitType unit)
public double topSpeed(UnitType unit)
public int groundWeaponMaxRange(UnitType unit)
public int airWeaponMaxRange(UnitType unit)
public int weaponMaxRange(WeaponType weapon)
public int sightRange(UnitType unit)
public int groundWeaponDamageCooldown(UnitType unit)
public int armor(UnitType unit)
public int getUnitScore()
public int getKillScore()
public int getBuildingScore()
public int getRazingScore()
public int getCustomScore()
public boolean isObserver()
public boolean isResearchAvailable(TechType tech)
public boolean isUnitAvailable(UnitType unit)