Package | Description |
---|---|
com.github.ocraft.s2client.bot | |
com.github.ocraft.s2client.bot.gateway |
Modifier and Type | Method | Description |
---|---|---|
default void |
ClientEvents.onBuildingConstructionComplete(UnitInPool unitInPool) |
Called when the unit in the previous step had a build progress less than 1.0 but is greater than or equal to
1.0 in the current step.
|
default void |
ClientEvents.onUnitCreated(UnitInPool unitInPool) |
Called when a Unit has been created by the player.
|
default void |
ClientEvents.onUnitDestroyed(UnitInPool unitInPool) |
Called whenever one of the player's units has been destroyed.
|
default void |
ClientEvents.onUnitEnterVision(UnitInPool unitInPool) |
Called when an enemy unit enters vision from out of fog of war.
|
default void |
ClientEvents.onUnitIdle(UnitInPool unitInPool) |
Called when a unit becomes idle, this will only occur as an event so will only be called when the unit becomes
idle and not a second time.
|
Modifier and Type | Method | Description |
---|---|---|
UnitInPool |
ObservationInterface.getUnit(Tag tag) |
Get the unit state as represented by the last call to getObservation.
|
UnitInPool |
UnitInPool.update(Unit unit) |
|
UnitInPool |
UnitInPool.update(Unit unit,
long gameLoop,
boolean alive) |
Modifier and Type | Method | Description |
---|---|---|
static java.util.Map<Point,java.util.List<UnitInPool>> |
QueryInterface.cluster(java.util.List<UnitInPool> units,
double distanceApart) |
Clusters units within some distance of each other and returns a list of them and their center of mass.
|
java.util.List<UnitInPool> |
ObservationInterface.getUnits() |
Get a list of all known units in the game.
|
java.util.List<UnitInPool> |
ObservationInterface.getUnits(Alliance alliance) |
|
java.util.List<UnitInPool> |
ObservationInterface.getUnits(Alliance alliance,
java.util.function.Predicate<UnitInPool> filter) |
Get all units belonging to a certain alliance and meet the conditions provided by the filter.
|
java.util.List<UnitInPool> |
ObservationInterface.getUnits(java.util.function.Predicate<UnitInPool> filter) |
Get all units belonging to self that meet the conditions provided by the filter.
|
static java.util.function.Predicate<UnitInPool> |
UnitInPool.isCarryingMinerals() |
Helper function used to discover whether a unit is carrying minerals or not.
|
static java.util.function.Predicate<UnitInPool> |
UnitInPool.isCarryingVespene() |
Helper function used to discover whether a unit is carrying vespene or not.
|
static java.util.function.Predicate<UnitInPool> |
UnitInPool.isUnit(UnitType type) |
Modifier and Type | Method | Description |
---|---|---|
static java.util.Map<Point,java.util.List<UnitInPool>> |
QueryInterface.cluster(java.util.List<UnitInPool> units,
double distanceApart) |
Clusters units within some distance of each other and returns a list of them and their center of mass.
|
java.util.List<UnitInPool> |
ObservationInterface.getUnits(Alliance alliance,
java.util.function.Predicate<UnitInPool> filter) |
Get all units belonging to a certain alliance and meet the conditions provided by the filter.
|
java.util.List<UnitInPool> |
ObservationInterface.getUnits(java.util.function.Predicate<UnitInPool> filter) |
Get all units belonging to self that meet the conditions provided by the filter.
|
Copyright © 2017–2018 Ocraft Project. All rights reserved.