public class UnitInPool
extends java.lang.Object
Constructor | Description |
---|---|
UnitInPool(Tag tag) |
Modifier and Type | Method | Description |
---|---|---|
void |
dead() |
|
boolean |
equals(java.lang.Object o) |
|
long |
getLastSeenGameLoop() |
|
Tag |
getTag() |
|
java.util.Optional<Unit> |
getUnit() |
|
int |
hashCode() |
|
boolean |
isAlive() |
|
static java.util.function.Predicate<UnitInPool> |
isCarryingMinerals() |
Helper function used to discover whether a unit is carrying minerals or not.
|
static java.util.function.Predicate<UnitInPool> |
isCarryingVespene() |
Helper function used to discover whether a unit is carrying vespene or not.
|
static java.util.function.Predicate<UnitInPool> |
isUnit(UnitType type) |
|
java.lang.String |
toString() |
|
Unit |
unit() |
|
UnitInPool |
update(Unit unit) |
|
UnitInPool |
update(Unit unit,
long gameLoop,
boolean alive) |
public UnitInPool(Tag tag)
public UnitInPool update(Unit unit, long gameLoop, boolean alive)
public UnitInPool update(Unit unit)
public Tag getTag()
public java.util.Optional<Unit> getUnit()
public Unit unit()
public void dead()
public boolean isAlive()
public long getLastSeenGameLoop()
public static java.util.function.Predicate<UnitInPool> isUnit(UnitType type)
public static java.util.function.Predicate<UnitInPool> isCarryingMinerals()
List<UnitInPool> units = observation().getUnits(Alliance.SELF, UnitInPool.isCarryingMinerals());
public static java.util.function.Predicate<UnitInPool> isCarryingVespene()
List<UnitInPool> units = observation().getUnits(Alliance.SELF, UnitInPool.isCarryingVespene);
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2017–2018 Ocraft Project. All rights reserved.