public abstract class MapImpl extends java.lang.Object implements Map
Modifier and Type | Field and Description |
---|---|
protected Altitude |
highestAltitude |
protected java.util.List<MineralPatch> |
mineralPatches |
protected NeutralData |
neutralData |
protected java.util.Collection<Player> |
players |
protected java.util.List<org.apache.commons.lang3.tuple.MutablePair<org.apache.commons.lang3.tuple.MutablePair<AreaId,AreaId>,WalkPosition>> |
rawFrontier |
protected TerrainData |
terrainData |
protected java.util.Collection<UnitImpl> |
units |
protected java.util.List<VespeneGeyser> |
vespeneGeysers |
Constructor and Description |
---|
MapImpl(BWMap bwMap,
MapDrawer mapDrawer,
java.util.Collection<Player> players,
java.util.List<MineralPatch> mineralPatches,
java.util.List<VespeneGeyser> vespeneGeysers,
java.util.Collection<UnitImpl> units) |
protected TerrainData terrainData
protected NeutralData neutralData
protected Altitude highestAltitude
protected final java.util.List<org.apache.commons.lang3.tuple.MutablePair<org.apache.commons.lang3.tuple.MutablePair<AreaId,AreaId>,WalkPosition>> rawFrontier
protected final java.util.List<MineralPatch> mineralPatches
protected final java.util.Collection<Player> players
protected final java.util.List<VespeneGeyser> vespeneGeysers
protected final java.util.Collection<UnitImpl> units
public MapImpl(BWMap bwMap, MapDrawer mapDrawer, java.util.Collection<Player> players, java.util.List<MineralPatch> mineralPatches, java.util.List<VespeneGeyser> vespeneGeysers, java.util.Collection<UnitImpl> units)
protected BWMap getBWMap()
public TerrainData getData()
public MapPrinter getMapPrinter()
getMapPrinter
in interface Map
public boolean isInitialized()
isInitialized
in interface Map
public Graph getGraph()
public java.util.List<org.apache.commons.lang3.tuple.MutablePair<org.apache.commons.lang3.tuple.MutablePair<AreaId,AreaId>,WalkPosition>> getRawFrontier()
getRawFrontier
in interface Map
public boolean automaticPathUpdate()
automaticPathUpdate
in interface Map
public void enableAutomaticPathAnalysis()
enableAutomaticPathAnalysis
in interface Map
public void assignStartingLocationsToSuitableBases()
assignStartingLocationsToSuitableBases
in interface Map
public java.util.List<TilePosition> getUnassignedStartingLocations()
getUnassignedStartingLocations
in interface Map
public Altitude getHighestAltitude()
getHighestAltitude
in interface Map
public java.util.List<ChokePoint> getChokePoints()
getChokePoints
in interface Map
public NeutralData getNeutralData()
getNeutralData
in interface Map
public void onUnitDestroyed(Unit u)
Map
onUnitDestroyed
in interface Map
public void onMineralDestroyed(Unit u)
onMineralDestroyed
in interface Map
public void onStaticBuildingDestroyed(Unit u)
onStaticBuildingDestroyed
in interface Map
public void onBlockingNeutralDestroyed(Neutral pBlocking)
public Area getArea(WalkPosition w)
public Area getArea(TilePosition t)
public Area getNearestArea(WalkPosition w)
getNearestArea
in interface Map
public Area getNearestArea(TilePosition t)
getNearestArea
in interface Map
public Area getMainArea(TilePosition topLeft, TilePosition size)
getMainArea
in interface Map
public CPPath getPath(Position a, Position b, org.apache.commons.lang3.mutable.MutableInt pLength)
public TilePosition breadthFirstSearch(TilePosition start, Pred findCond, Pred visitCond, boolean connect8)
breadthFirstSearch
in interface Map
public TilePosition breadthFirstSearch(TilePosition start, Pred findCond, Pred visitCond)
breadthFirstSearch
in interface Map
public WalkPosition breadthFirstSearch(WalkPosition start, Pred findCond, Pred visitCond, boolean connect8)
breadthFirstSearch
in interface Map
public WalkPosition breadthFirstSearch(WalkPosition start, Pred findCond, Pred visitCond)
breadthFirstSearch
in interface Map
public void drawDiagonalCrossMap(Position topLeft, Position bottomRight, Color col)
drawDiagonalCrossMap
in interface Map
protected java.util.List<PlayerUnit> filterPlayerUnits(java.util.Collection<UnitImpl> units, Player player)
protected java.util.List<PlayerUnit> filterNeutralPlayerUnits(java.util.Collection<UnitImpl> units, java.util.Collection<Player> players)
public void setAreaIdInTile(TilePosition t)
public org.apache.commons.lang3.tuple.MutablePair<AreaId,AreaId> findNeighboringAreas(WalkPosition p)