public class Game
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.util.List<Player> |
allies()
Retrieves a set of all the current player's remaining allies.
|
boolean |
canBuildHere(TilePosition position,
UnitType type) |
boolean |
canBuildHere(TilePosition position,
UnitType type,
Unit builder)
Checks if the given unit type can be built at the given build tile position.
|
boolean |
canBuildHere(TilePosition position,
UnitType type,
Unit builder,
boolean checkExplored) |
boolean |
canMake(UnitType type)
Checks all the requirements in order to make a given unit type for the current player.
|
boolean |
canMake(UnitType type,
Unit builder) |
boolean |
canResearch(TechType type) |
boolean |
canResearch(TechType type,
Unit unit)
Checks all the requirements in order to research a given technology type for the current player.
|
boolean |
canResearch(TechType type,
Unit unit,
boolean checkCanIssueCommandType) |
boolean |
canUpgrade(UpgradeType type) |
boolean |
canUpgrade(UpgradeType type,
Unit unit)
Checks all the requirements in order to upgrade a given upgrade type for the current player.
|
boolean |
canUpgrade(UpgradeType type,
Unit unit,
boolean checkCanIssueCommandType) |
int |
countdownTimer()
Returns the remaining countdown time.
|
void |
drawBox(bwapi.CoordinateType.Enum ctype,
int left,
int top,
int right,
int bottom,
Color color)
Draws a rectangle on the screen with the given color.
|
void |
drawBox(bwapi.CoordinateType.Enum ctype,
int left,
int top,
int right,
int bottom,
Color color,
boolean isSolid) |
void |
drawBoxMap(int left,
int top,
int right,
int bottom,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawBoxMap(int left,
int top,
int right,
int bottom,
Color color,
boolean isSolid) |
void |
drawBoxMap(Position leftTop,
Position rightBottom,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawBoxMap(Position leftTop,
Position rightBottom,
Color color,
boolean isSolid) |
void |
drawBoxMouse(int left,
int top,
int right,
int bottom,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawBoxMouse(int left,
int top,
int right,
int bottom,
Color color,
boolean isSolid) |
void |
drawBoxMouse(Position leftTop,
Position rightBottom,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawBoxMouse(Position leftTop,
Position rightBottom,
Color color,
boolean isSolid) |
void |
drawBoxScreen(int left,
int top,
int right,
int bottom,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawBoxScreen(int left,
int top,
int right,
int bottom,
Color color,
boolean isSolid) |
void |
drawBoxScreen(Position leftTop,
Position rightBottom,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawBoxScreen(Position leftTop,
Position rightBottom,
Color color,
boolean isSolid) |
void |
drawCircle(bwapi.CoordinateType.Enum ctype,
int x,
int y,
int radius,
Color color)
Draws a circle on the screen with the given color.
|
void |
drawCircle(bwapi.CoordinateType.Enum ctype,
int x,
int y,
int radius,
Color color,
boolean isSolid) |
void |
drawCircleMap(int x,
int y,
int radius,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawCircleMap(int x,
int y,
int radius,
Color color,
boolean isSolid) |
void |
drawCircleMap(Position p,
int radius,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawCircleMap(Position p,
int radius,
Color color,
boolean isSolid) |
void |
drawCircleMouse(int x,
int y,
int radius,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawCircleMouse(int x,
int y,
int radius,
Color color,
boolean isSolid) |
void |
drawCircleMouse(Position p,
int radius,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawCircleMouse(Position p,
int radius,
Color color,
boolean isSolid) |
void |
drawCircleScreen(int x,
int y,
int radius,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawCircleScreen(int x,
int y,
int radius,
Color color,
boolean isSolid) |
void |
drawCircleScreen(Position p,
int radius,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawCircleScreen(Position p,
int radius,
Color color,
boolean isSolid) |
void |
drawDot(bwapi.CoordinateType.Enum ctype,
int x,
int y,
Color color)
Draws a dot on the map or screen with a given color.
|
void |
drawDotMap(int x,
int y,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawDotMap(Position p,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawDotMouse(int x,
int y,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawDotMouse(Position p,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawDotScreen(int x,
int y,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawDotScreen(Position p,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawEllipse(bwapi.CoordinateType.Enum ctype,
int x,
int y,
int xrad,
int yrad,
Color color)
Draws an ellipse on the screen with the given color.
|
void |
drawEllipse(bwapi.CoordinateType.Enum ctype,
int x,
int y,
int xrad,
int yrad,
Color color,
boolean isSolid) |
void |
drawEllipseMap(int x,
int y,
int xrad,
int yrad,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawEllipseMap(int x,
int y,
int xrad,
int yrad,
Color color,
boolean isSolid) |
void |
drawEllipseMap(Position p,
int xrad,
int yrad,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawEllipseMap(Position p,
int xrad,
int yrad,
Color color,
boolean isSolid) |
void |
drawEllipseMouse(int x,
int y,
int xrad,
int yrad,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawEllipseMouse(int x,
int y,
int xrad,
int yrad,
Color color,
boolean isSolid) |
void |
drawEllipseMouse(Position p,
int xrad,
int yrad,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawEllipseMouse(Position p,
int xrad,
int yrad,
Color color,
boolean isSolid) |
void |
drawEllipseScreen(int x,
int y,
int xrad,
int yrad,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawEllipseScreen(int x,
int y,
int xrad,
int yrad,
Color color,
boolean isSolid) |
void |
drawEllipseScreen(Position p,
int xrad,
int yrad,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawEllipseScreen(Position p,
int xrad,
int yrad,
Color color,
boolean isSolid) |
void |
drawLine(bwapi.CoordinateType.Enum ctype,
int x1,
int y1,
int x2,
int y2,
Color color)
Draws a line on the map or screen with a given color.
|
void |
drawLineMap(int x1,
int y1,
int x2,
int y2,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawLineMap(Position a,
Position b,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawLineMouse(int x1,
int y1,
int x2,
int y2,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawLineMouse(Position a,
Position b,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawLineScreen(int x1,
int y1,
int x2,
int y2,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawLineScreen(Position a,
Position b,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawText(bwapi.CoordinateType.Enum ctype,
int x,
int y,
java.lang.String cstr_format)
This is an overloaded member function, provided for convenience.
|
void |
drawTextMap(int x,
int y,
java.lang.String cstr_format)
This is an overloaded member function, provided for convenience.
|
void |
drawTextMap(Position p,
java.lang.String cstr_format)
This is an overloaded member function, provided for convenience.
|
void |
drawTextMouse(int x,
int y,
java.lang.String cstr_format)
This is an overloaded member function, provided for convenience.
|
void |
drawTextMouse(Position p,
java.lang.String cstr_format)
This is an overloaded member function, provided for convenience.
|
void |
drawTextScreen(int x,
int y,
java.lang.String cstr_format)
This is an overloaded member function, provided for convenience.
|
void |
drawTextScreen(Position p,
java.lang.String cstr_format)
This is an overloaded member function, provided for convenience.
|
void |
drawTriangle(bwapi.CoordinateType.Enum ctype,
int ax,
int ay,
int bx,
int by,
int cx,
int cy,
Color color)
Draws a triangle on the screen with the given color.
|
void |
drawTriangle(bwapi.CoordinateType.Enum ctype,
int ax,
int ay,
int bx,
int by,
int cx,
int cy,
Color color,
boolean isSolid) |
void |
drawTriangleMap(int ax,
int ay,
int bx,
int by,
int cx,
int cy,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawTriangleMap(int ax,
int ay,
int bx,
int by,
int cx,
int cy,
Color color,
boolean isSolid) |
void |
drawTriangleMap(Position a,
Position b,
Position c,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawTriangleMap(Position a,
Position b,
Position c,
Color color,
boolean isSolid) |
void |
drawTriangleMouse(int ax,
int ay,
int bx,
int by,
int cx,
int cy,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawTriangleMouse(int ax,
int ay,
int bx,
int by,
int cx,
int cy,
Color color,
boolean isSolid) |
void |
drawTriangleMouse(Position a,
Position b,
Position c,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawTriangleMouse(Position a,
Position b,
Position c,
Color color,
boolean isSolid) |
void |
drawTriangleScreen(int ax,
int ay,
int bx,
int by,
int cx,
int cy,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawTriangleScreen(int ax,
int ay,
int bx,
int by,
int cx,
int cy,
Color color,
boolean isSolid) |
void |
drawTriangleScreen(Position a,
Position b,
Position c,
Color color)
This is an overloaded member function, provided for convenience.
|
void |
drawTriangleScreen(Position a,
Position b,
Position c,
Color color,
boolean isSolid) |
int |
elapsedTime()
Retrieves current amount of time in seconds that the game has elapsed.
|
void |
enableFlag(int flag)
Enables the state of a given flag.
|
java.util.List<Player> |
enemies()
Retrieves a set of all the current player's remaining enemies.
|
Player |
enemy()
Retrieves the Player interface that represents the enemy player.
|
java.util.List<Region> |
getAllRegions()
Retrieves the set of all regions on the map.
|
java.util.List<Unit> |
getAllUnits()
Retrieves the set of all accessible units.
|
int |
getAPM()
Retrieves the Actions Per Minute (APM) that the bot is producing.
|
int |
getAPM(boolean includeSelects) |
double |
getAverageFPS()
Retrieves the average logical frame rate of the game in frames per second (FPS).
|
TilePosition |
getBuildLocation(UnitType type,
TilePosition desiredPosition) |
TilePosition |
getBuildLocation(UnitType type,
TilePosition desiredPosition,
int maxRange)
Retrieves a basic build position just as the default Computer AI would.
|
TilePosition |
getBuildLocation(UnitType type,
TilePosition desiredPosition,
int maxRange,
boolean creep) |
java.util.List<Bullet> |
getBullets()
Retrieves the set of all accessible bullets.
|
int |
getDamageFrom(UnitType fromType,
UnitType toType) |
int |
getDamageFrom(UnitType fromType,
UnitType toType,
Player fromPlayer)
Calculates the damage received for a given player.
|
int |
getDamageFrom(UnitType fromType,
UnitType toType,
Player fromPlayer,
Player toPlayer) |
int |
getDamageTo(UnitType toType,
UnitType fromType) |
int |
getDamageTo(UnitType toType,
UnitType fromType,
Player toPlayer)
Calculates the damage dealt for a given player.
|
int |
getDamageTo(UnitType toType,
UnitType fromType,
Player toPlayer,
Player fromPlayer) |
Force |
getForce(int forceID)
Retrieves the Force interface object associated with a given identifier.
|
java.util.List<Force> |
getForces()
Retrieves the set of all teams/forces.
|
int |
getFPS()
Retrieves the logical frame rate of the game in frames per second (FPS).
|
int |
getFrameCount()
Retrieves the number of logical frames since the beginning of the match.
|
GameType |
getGameType()
Retrieves the GameType of the current game.
|
java.util.List<Unit> |
getGeysers()
Retrieves the set of all accessible Vespene Geysers in the game.
|
int |
getGroundHeight(int tileX,
int tileY)
Returns the ground height at the given tile position.
|
int |
getGroundHeight(TilePosition position)
Returns the ground height at the given tile position.
|
int |
getInstanceNumber()
Retrieves the Starcraft instance number recorded by BWAPI to identify which Starcraft instance an AI module belongs to.
|
boolean |
getKeyState(Key key)
Retrieves the state of the given keyboard key.
|
Error |
getLastError()
Returns the last error that was set using setLastError.
|
int |
getLastEventTime()
Retrieves the amount of time (in milliseconds) that has elapsed when running the last AI module callback.
|
int |
getLatency()
Retrieves the current latency setting that the game is set to.
|
int |
getLatencyFrames()
Retrieves the maximum delay, in number of frames, between a command being issued and the command being executed by Broodwar.
|
int |
getLatencyTime()
Retrieves the maximum delay, in milliseconds, between a command being issued and the command being executed by Broodwar.
|
java.util.List<Unit> |
getMinerals()
Retrieves the set of all accessible Mineral Fields in the game.
|
Position |
getMousePosition()
Retrieves the position of the user's mouse on the screen, in Position coordinates.
|
boolean |
getMouseState(MouseButton button)
Retrieves the state of the given mouse button.
|
java.util.List<Unit> |
getNeutralUnits()
Retrieves the set of all accessible neutral units in the game.
|
java.util.List<Position> |
getNukeDots()
Retrieves the set of all accessible Nuke dots.
|
Player |
getPlayer(int playerID)
Retrieves the Player interface object associated with a given identifier.
|
java.util.List<Player> |
getPlayers()
Retrieves the set of all players in the match.
|
Region |
getRegion(int regionID)
Retrieves the Region interface object associated with a given identifier.
|
Region |
getRegionAt(int x,
int y)
Retrieves the region at a given position.
|
Region |
getRegionAt(Position position)
Retrieves the region at a given position.
|
int |
getRemainingLatencyFrames()
Retrieves the number of frames it will take before a command sent in the current frame will be executed by the game.
|
int |
getRemainingLatencyTime()
Retrieves the number of milliseconds it will take before a command sent in the current frame will be executed by Broodwar.
|
int |
getReplayFrameCount()
Retrieves the maximum number of logical frames that have been recorded in a replay.
|
int |
getRevision()
Retrieves the current revision of BWAPI.
|
Position |
getScreenPosition()
Retrieves the top left position of the viewport from the top left corner of the map, in pixels.
|
java.util.List<Unit> |
getSelectedUnits()
Retrieves the set of units that are currently selected by the user outside of BWAPI.
|
java.util.List<TilePosition> |
getStartLocations()
Retrieves the set of all starting locations for the current map.
|
java.util.List<Unit> |
getStaticGeysers()
Retrieves the set of all Vespene Geysers that were available at the beginning of the game.
|
java.util.List<Unit> |
getStaticMinerals()
Retrieves the set of all Mineral Fields that were available at the beginning of the game.
|
java.util.List<Unit> |
getStaticNeutralUnits()
Retrieves the set of all units owned by the neutral player (resources, critters, etc.) that were available at the beginning of the game.
|
Unit |
getUnit(int unitID)
Retrieves the Unit interface object associated with a given identifier.
|
java.util.List<Unit> |
getUnitsInRadius(int x,
int y,
int radius)
Retrieves the set of accessible units that are within a given radius of a position.
|
java.util.List<Unit> |
getUnitsInRadius(Position center,
int radius)
Retrieves the set of accessible units that are within a given radius of a position.
|
java.util.List<Unit> |
getUnitsInRectangle(int left,
int top,
int right,
int bottom)
Retrieves the set of accessible units that are in a given rectangle.
|
java.util.List<Unit> |
getUnitsInRectangle(Position topLeft,
Position bottomRight)
Retrieves the set of accessible units that are in a given rectangle.
|
java.util.List<Unit> |
getUnitsOnTile(int tileX,
int tileY)
Retrieves the set of accessible units that are on a given build tile.
|
java.util.List<Unit> |
getUnitsOnTile(TilePosition tile)
Retrieves the set of accessible units that are on a given build tile.
|
boolean |
hasCreep(int tileX,
int tileY)
Checks if the given tile position has Zerg creep on it.
|
boolean |
hasCreep(TilePosition position)
Checks if the given tile position has Zerg creep on it.
|
boolean |
hasPath(Position source,
Position destination)
Checks if there is a path from source to destination.
|
boolean |
hasPower(int tileX,
int tileY)
Checks if the given tile position if powered by an owned Protoss Pylon for an optional unit type.
|
boolean |
hasPower(int tileX,
int tileY,
int tileWidth,
int tileHeight)
Checks if the given tile position if powered by an owned Protoss Pylon for an optional unit type.
|
boolean |
hasPower(int tileX,
int tileY,
int tileWidth,
int tileHeight,
UnitType unitType) |
boolean |
hasPower(int tileX,
int tileY,
UnitType unitType) |
boolean |
hasPower(TilePosition position)
Checks if the given tile position if powered by an owned Protoss Pylon for an optional unit type.
|
boolean |
hasPower(TilePosition position,
int tileWidth,
int tileHeight)
Checks if the given tile position if powered by an owned Protoss Pylon for an optional unit type.
|
boolean |
hasPower(TilePosition position,
int tileWidth,
int tileHeight,
UnitType unitType) |
boolean |
hasPower(TilePosition position,
UnitType unitType) |
boolean |
hasPowerPrecise(int x,
int y)
Checks if the given pixel position is powered by an owned Protoss Pylon for an optional unit type.
|
boolean |
hasPowerPrecise(int x,
int y,
UnitType unitType) |
boolean |
hasPowerPrecise(Position position)
Checks if the given pixel position is powered by an owned Protoss Pylon for an optional unit type.
|
boolean |
hasPowerPrecise(Position position,
UnitType unitType) |
Unit |
indexToUnit(int unitIndex)
Retrieves a Unit interface object from a given unit index.
|
boolean |
isBattleNet()
Checks if the client is in a game that was created through the Battle.net multiplayer gaming service.
|
boolean |
isBuildable(int tileX,
int tileY)
Checks if a given tile position is buildable.
|
boolean |
isBuildable(int tileX,
int tileY,
boolean includeBuildings) |
boolean |
isBuildable(TilePosition position)
Checks if a given tile position is buildable.
|
boolean |
isBuildable(TilePosition position,
boolean includeBuildings) |
boolean |
isDebug()
Retrieves the debug state of the BWAPI build.
|
boolean |
isExplored(int tileX,
int tileY)
Checks if a given tile position has been explored by the player.
|
boolean |
isExplored(TilePosition position)
Checks if a given tile position has been explored by the player.
|
boolean |
isFlagEnabled(int flag)
Checks if the state of the given flag is enabled or not.
|
boolean |
isGUIEnabled()
Checks if the GUI is enabled.
|
boolean |
isInGame()
Checks if the current client is inside a game.
|
boolean |
isLatComEnabled()
Checks the state of latency compensation.
|
boolean |
isMultiplayer()
Checks if the current client is inside a multiplayer game.
|
boolean |
isPaused()
Checks if the current game is paused.
|
boolean |
isReplay()
Checks if the client is watching a replay.
|
boolean |
issueCommand(java.util.List<Unit> units,
UnitCommand command)
Issues a given command to a set of units.
|
boolean |
isVisible(int tileX,
int tileY)
Checks if a given tile position is visible to the current player.
|
boolean |
isVisible(TilePosition position)
Checks if a given tile position is visible to the current player.
|
boolean |
isWalkable(int walkX,
int walkY)
Checks if the given mini-tile position is walkable.
|
boolean |
isWalkable(WalkPosition position)
Checks if the given mini-tile position is walkable.
|
void |
leaveGame()
Leaves the current game by surrendering and enters the post-game statistics/score screen.
|
java.lang.String |
mapFileName()
Retrieves the file name of the currently loaded map.
|
java.lang.String |
mapHash()
Calculates the SHA-1 hash of the currently loaded map file.
|
int |
mapHeight()
Retrieves the height of the map in build tile units.
|
java.lang.String |
mapName()
Retrieves the title of the currently loaded map.
|
java.lang.String |
mapPathName()
Retrieves the full path name of the currently loaded map.
|
int |
mapWidth()
Retrieves the width of the map in build tile units.
|
Player |
neutral()
Retrieves the Player interface object representing the neutral player.
|
java.util.List<Player> |
observers()
Retrieves a set of all players currently observing the game.
|
void |
pauseGame()
Pauses the game.
|
void |
pingMinimap(int x,
int y)
Pings the minimap at the given position.
|
void |
pingMinimap(Position p)
Pings the minimap at the given position.
|
void |
printf(java.lang.String cstr_format)
Prints text to the screen as a notification.
|
void |
restartGame()
Restarts the match.
|
void |
resumeGame()
Resumes the game from a paused state.
|
Player |
self()
Retrieves the player object that BWAPI is controlling.
|
void |
sendText(java.lang.String cstr_format)
Sends a text message to all other players in the game.
|
void |
sendTextEx(boolean toAllies,
java.lang.String cstr_format)
An extended version of Game::sendText which allows messages to be forwarded to allies.
|
boolean |
setAlliance(Player player) |
boolean |
setAlliance(Player player,
boolean allied)
Sets the alliance state of the current player with the target player.
|
boolean |
setAlliance(Player player,
boolean allied,
boolean alliedVictory) |
void |
setCommandOptimizationLevel(int level)
Sets the command optimization level.
|
void |
setFrameSkip(int frameSkip)
Sets the number of graphical frames for every logical frame.
|
void |
setGUI(boolean enabled)
Sets the rendering state of the Starcraft GUI.
|
boolean |
setLastError()
Sets the last error so that future calls to getLastError will return the value that was set.
|
boolean |
setLastError(Error e) |
void |
setLatCom(boolean isEnabled)
Changes the state of latency compensation.
|
void |
setLocalSpeed(int speed)
Sets the number of milliseconds Broodwar spends in each frame.
|
boolean |
setMap(java.lang.String cstr_mapFileName)
Changes the map to the one specified.
|
boolean |
setRevealAll()
Sets the state of the fog of war when watching a replay.
|
boolean |
setRevealAll(boolean reveal) |
void |
setScreenPosition(int x,
int y)
Moves the top left corner of the viewport to the provided position relative to the map's origin (top left (0,0)).
|
void |
setScreenPosition(Position p)
Moves the top left corner of the viewport to the provided position relative to the map's origin (top left (0,0)).
|
void |
setTextSize()
Sets the size of the text for all calls to drawText following this one.
|
void |
setTextSize(bwapi.Text.Size.Enum size) |
boolean |
setVision(Player player)
In a game, this function sets the vision of the current BWAPI player with the target player.
|
boolean |
setVision(Player player,
boolean enabled) |
public java.util.List<Force> getForces()
public java.util.List<Player> getPlayers()
public java.util.List<Unit> getAllUnits()
public java.util.List<Unit> getMinerals()
public java.util.List<Unit> getGeysers()
public java.util.List<Unit> getNeutralUnits()
public java.util.List<Unit> getStaticMinerals()
public java.util.List<Unit> getStaticGeysers()
public java.util.List<Unit> getStaticNeutralUnits()
public java.util.List<Bullet> getBullets()
public java.util.List<Position> getNukeDots()
public Force getForce(int forceID)
public Player getPlayer(int playerID)
public Unit getUnit(int unitID)
public Unit indexToUnit(int unitIndex)
public Region getRegion(int regionID)
public GameType getGameType()
public int getLatency()
public int getFrameCount()
public int getReplayFrameCount()
public int getFPS()
public double getAverageFPS()
public Position getMousePosition()
public boolean getMouseState(MouseButton button)
public boolean getKeyState(Key key)
public Position getScreenPosition()
public void setScreenPosition(int x, int y)
public void setScreenPosition(Position p)
public void pingMinimap(int x, int y)
public void pingMinimap(Position p)
public boolean isFlagEnabled(int flag)
public void enableFlag(int flag)
public java.util.List<Unit> getUnitsOnTile(int tileX, int tileY)
public java.util.List<Unit> getUnitsOnTile(TilePosition tile)
public java.util.List<Unit> getUnitsInRectangle(int left, int top, int right, int bottom)
public java.util.List<Unit> getUnitsInRectangle(Position topLeft, Position bottomRight)
public java.util.List<Unit> getUnitsInRadius(int x, int y, int radius)
public java.util.List<Unit> getUnitsInRadius(Position center, int radius)
public Error getLastError()
public boolean setLastError()
public boolean setLastError(Error e)
public int mapWidth()
public int mapHeight()
public java.lang.String mapFileName()
public java.lang.String mapPathName()
public java.lang.String mapName()
public java.lang.String mapHash()
public boolean isWalkable(int walkX, int walkY)
public boolean isWalkable(WalkPosition position)
public int getGroundHeight(int tileX, int tileY)
public int getGroundHeight(TilePosition position)
public boolean isBuildable(int tileX, int tileY)
public boolean isBuildable(int tileX, int tileY, boolean includeBuildings)
public boolean isBuildable(TilePosition position)
public boolean isBuildable(TilePosition position, boolean includeBuildings)
public boolean isVisible(int tileX, int tileY)
public boolean isVisible(TilePosition position)
public boolean isExplored(int tileX, int tileY)
public boolean isExplored(TilePosition position)
public boolean hasCreep(int tileX, int tileY)
public boolean hasCreep(TilePosition position)
public boolean hasPowerPrecise(int x, int y)
public boolean hasPowerPrecise(int x, int y, UnitType unitType)
public boolean hasPowerPrecise(Position position)
public boolean hasPower(int tileX, int tileY)
public boolean hasPower(int tileX, int tileY, UnitType unitType)
public boolean hasPower(TilePosition position)
public boolean hasPower(TilePosition position, UnitType unitType)
public boolean hasPower(int tileX, int tileY, int tileWidth, int tileHeight)
public boolean hasPower(int tileX, int tileY, int tileWidth, int tileHeight, UnitType unitType)
public boolean hasPower(TilePosition position, int tileWidth, int tileHeight)
public boolean hasPower(TilePosition position, int tileWidth, int tileHeight, UnitType unitType)
public boolean canBuildHere(TilePosition position, UnitType type, Unit builder)
public boolean canBuildHere(TilePosition position, UnitType type)
public boolean canBuildHere(TilePosition position, UnitType type, Unit builder, boolean checkExplored)
public boolean canMake(UnitType type)
public boolean canResearch(TechType type, Unit unit)
public boolean canResearch(TechType type)
public boolean canUpgrade(UpgradeType type, Unit unit)
public boolean canUpgrade(UpgradeType type)
public boolean canUpgrade(UpgradeType type, Unit unit, boolean checkCanIssueCommandType)
public java.util.List<TilePosition> getStartLocations()
public void printf(java.lang.String cstr_format)
public void sendText(java.lang.String cstr_format)
public void sendTextEx(boolean toAllies, java.lang.String cstr_format)
public boolean isInGame()
public boolean isMultiplayer()
public boolean isBattleNet()
public boolean isPaused()
public boolean isReplay()
public void pauseGame()
public void resumeGame()
public void leaveGame()
public void restartGame()
public void setLocalSpeed(int speed)
public boolean issueCommand(java.util.List<Unit> units, UnitCommand command)
public java.util.List<Unit> getSelectedUnits()
public Player self()
public Player enemy()
public Player neutral()
public java.util.List<Player> allies()
public java.util.List<Player> enemies()
public java.util.List<Player> observers()
public void setTextSize()
public void setTextSize(bwapi.Text.Size.Enum size)
public void drawText(bwapi.CoordinateType.Enum ctype, int x, int y, java.lang.String cstr_format)
public void drawTextMap(int x, int y, java.lang.String cstr_format)
public void drawTextMap(Position p, java.lang.String cstr_format)
public void drawTextMouse(int x, int y, java.lang.String cstr_format)
public void drawTextMouse(Position p, java.lang.String cstr_format)
public void drawTextScreen(int x, int y, java.lang.String cstr_format)
public void drawTextScreen(Position p, java.lang.String cstr_format)
public void drawBox(bwapi.CoordinateType.Enum ctype, int left, int top, int right, int bottom, Color color)
public void drawBox(bwapi.CoordinateType.Enum ctype, int left, int top, int right, int bottom, Color color, boolean isSolid)
public void drawBoxMap(int left, int top, int right, int bottom, Color color)
public void drawBoxMap(int left, int top, int right, int bottom, Color color, boolean isSolid)
public void drawBoxMap(Position leftTop, Position rightBottom, Color color)
public void drawBoxMap(Position leftTop, Position rightBottom, Color color, boolean isSolid)
public void drawBoxMouse(int left, int top, int right, int bottom, Color color)
public void drawBoxMouse(int left, int top, int right, int bottom, Color color, boolean isSolid)
public void drawBoxMouse(Position leftTop, Position rightBottom, Color color)
public void drawBoxMouse(Position leftTop, Position rightBottom, Color color, boolean isSolid)
public void drawBoxScreen(int left, int top, int right, int bottom, Color color)
public void drawBoxScreen(int left, int top, int right, int bottom, Color color, boolean isSolid)
public void drawBoxScreen(Position leftTop, Position rightBottom, Color color)
public void drawBoxScreen(Position leftTop, Position rightBottom, Color color, boolean isSolid)
public void drawTriangle(bwapi.CoordinateType.Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color)
public void drawTriangle(bwapi.CoordinateType.Enum ctype, int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid)
public void drawTriangleMap(int ax, int ay, int bx, int by, int cx, int cy, Color color)
public void drawTriangleMap(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid)
public void drawTriangleMap(Position a, Position b, Position c, Color color)
public void drawTriangleMap(Position a, Position b, Position c, Color color, boolean isSolid)
public void drawTriangleMouse(int ax, int ay, int bx, int by, int cx, int cy, Color color)
public void drawTriangleMouse(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid)
public void drawTriangleMouse(Position a, Position b, Position c, Color color)
public void drawTriangleMouse(Position a, Position b, Position c, Color color, boolean isSolid)
public void drawTriangleScreen(int ax, int ay, int bx, int by, int cx, int cy, Color color)
public void drawTriangleScreen(int ax, int ay, int bx, int by, int cx, int cy, Color color, boolean isSolid)
public void drawTriangleScreen(Position a, Position b, Position c, Color color)
public void drawTriangleScreen(Position a, Position b, Position c, Color color, boolean isSolid)
public void drawCircle(bwapi.CoordinateType.Enum ctype, int x, int y, int radius, Color color)
public void drawCircle(bwapi.CoordinateType.Enum ctype, int x, int y, int radius, Color color, boolean isSolid)
public void drawCircleMap(int x, int y, int radius, Color color)
public void drawCircleMap(int x, int y, int radius, Color color, boolean isSolid)
public void drawCircleMap(Position p, int radius, Color color)
public void drawCircleMouse(int x, int y, int radius, Color color)
public void drawCircleMouse(int x, int y, int radius, Color color, boolean isSolid)
public void drawCircleMouse(Position p, int radius, Color color)
public void drawCircleScreen(int x, int y, int radius, Color color)
public void drawCircleScreen(int x, int y, int radius, Color color, boolean isSolid)
public void drawCircleScreen(Position p, int radius, Color color)
public void drawEllipse(bwapi.CoordinateType.Enum ctype, int x, int y, int xrad, int yrad, Color color)
public void drawEllipse(bwapi.CoordinateType.Enum ctype, int x, int y, int xrad, int yrad, Color color, boolean isSolid)
public void drawEllipseMap(int x, int y, int xrad, int yrad, Color color)
public void drawEllipseMap(int x, int y, int xrad, int yrad, Color color, boolean isSolid)
public void drawEllipseMap(Position p, int xrad, int yrad, Color color)
public void drawEllipseMap(Position p, int xrad, int yrad, Color color, boolean isSolid)
public void drawEllipseMouse(int x, int y, int xrad, int yrad, Color color)
public void drawEllipseMouse(int x, int y, int xrad, int yrad, Color color, boolean isSolid)
public void drawEllipseMouse(Position p, int xrad, int yrad, Color color)
public void drawEllipseMouse(Position p, int xrad, int yrad, Color color, boolean isSolid)
public void drawEllipseScreen(int x, int y, int xrad, int yrad, Color color)
public void drawEllipseScreen(int x, int y, int xrad, int yrad, Color color, boolean isSolid)
public void drawEllipseScreen(Position p, int xrad, int yrad, Color color)
public void drawEllipseScreen(Position p, int xrad, int yrad, Color color, boolean isSolid)
public void drawDot(bwapi.CoordinateType.Enum ctype, int x, int y, Color color)
public void drawDotMap(int x, int y, Color color)
public void drawDotMap(Position p, Color color)
public void drawDotMouse(int x, int y, Color color)
public void drawDotMouse(Position p, Color color)
public void drawDotScreen(int x, int y, Color color)
public void drawDotScreen(Position p, Color color)
public void drawLine(bwapi.CoordinateType.Enum ctype, int x1, int y1, int x2, int y2, Color color)
public void drawLineMap(int x1, int y1, int x2, int y2, Color color)
public void drawLineMap(Position a, Position b, Color color)
public void drawLineMouse(int x1, int y1, int x2, int y2, Color color)
public void drawLineMouse(Position a, Position b, Color color)
public void drawLineScreen(int x1, int y1, int x2, int y2, Color color)
public void drawLineScreen(Position a, Position b, Color color)
public int getLatencyFrames()
public int getLatencyTime()
public int getRemainingLatencyFrames()
public int getRemainingLatencyTime()
public int getRevision()
public boolean isDebug()
public boolean isLatComEnabled()
public void setLatCom(boolean isEnabled)
public boolean isGUIEnabled()
public void setGUI(boolean enabled)
public int getInstanceNumber()
public int getAPM()
public int getAPM(boolean includeSelects)
public boolean setMap(java.lang.String cstr_mapFileName)
public void setFrameSkip(int frameSkip)
public boolean hasPath(Position source, Position destination)
public boolean setAlliance(Player player, boolean allied)
public boolean setAlliance(Player player)
public boolean setAlliance(Player player, boolean allied, boolean alliedVictory)
public boolean setVision(Player player)
public boolean setVision(Player player, boolean enabled)
public int elapsedTime()
public void setCommandOptimizationLevel(int level)
public int countdownTimer()
public java.util.List<Region> getAllRegions()
public Region getRegionAt(int x, int y)
public Region getRegionAt(Position position)
public int getLastEventTime()
public boolean setRevealAll()
public boolean setRevealAll(boolean reveal)
public TilePosition getBuildLocation(UnitType type, TilePosition desiredPosition, int maxRange)
public TilePosition getBuildLocation(UnitType type, TilePosition desiredPosition)
public TilePosition getBuildLocation(UnitType type, TilePosition desiredPosition, int maxRange, boolean creep)
public int getDamageFrom(UnitType fromType, UnitType toType, Player fromPlayer)
public int getDamageFrom(UnitType fromType, UnitType toType, Player fromPlayer, Player toPlayer)
public int getDamageTo(UnitType toType, UnitType fromType, Player toPlayer)