public class BWTA
extends java.lang.Object
Constructor and Description |
---|
BWTA() |
Modifier and Type | Method and Description |
---|---|
static void |
analyze()
Before any other global functions can be called, the map must first be analyzed.
|
static java.util.List<BaseLocation> |
getBaseLocations()
Returns the set of base locations on the map.
|
static double |
getGroundDistance(TilePosition start,
TilePosition end)
Returns the ground distance between the two given tile positions.
|
static java.util.List<Chokepoint> |
getChokepoints()
Returns the set of chokepoints in the map.
|
static BaseLocation |
getNearestBaseLocation(int x,
int y)
Returns the nearest base location(in ground/walking distance).
|
static BaseLocation |
getNearestBaseLocation(Position position)
Returns the nearest base location(in ground/walking distance).
|
static BaseLocation |
getNearestBaseLocation(TilePosition tileposition)
Returns the nearest base location(in ground/walking distance).
|
static Chokepoint |
getNearestChokepoint(int x,
int y)
Returns the nearest chokepoint (in ground/walking distance).
|
static Chokepoint |
getNearestChokepoint(Position position)
Returns the nearest chokepoint (in ground/walking distance).
|
static Chokepoint |
getNearestChokepoint(TilePosition tileposition)
Returns the nearest chokepoint (in ground/walking distance).
|
static Polygon |
getNearestUnwalkablePolygon(int x,
int y)
Returns the nearest unwalkable polygon.
|
static Polygon |
getNearestUnwalkablePolygon(TilePosition tileposition)
Returns the nearest unwalkable polygon.
|
static Position |
getNearestUnwalkablePosition(Position position)
Returns the nearest position that is on the boundary of an unwalkable polygon, or border of the map.
|
static Region |
getRegion(int x,
int y)
Returns the region that the tile position is inside.
|
static Region |
getRegion(Position position)
Returns the region that the tile position is inside.
|
static Region |
getRegion(TilePosition tileposition)
Returns the region that the tile position is inside.
|
static java.util.List<Region> |
getRegions()
Returns the set of regions in the map.
|
static BaseLocation |
getStartLocation(Player player)
Given a pointer to a Player object, this function returns a pointer to the player's starting base location.
|
static java.util.List<BaseLocation> |
getStartLocations()
Returns the set of base locations that are start locations.
|
static java.util.List<Polygon> |
getUnwalkablePolygons()
Returns the set of unwalkable polygons.
|
static boolean |
isConnected(int x1,
int y1,
int x2,
int y2)
Returns true if there exists a static path between the two given tile positions.
|
static boolean |
isConnected(TilePosition a,
TilePosition b)
Returns true if there exists a static path between the two given tile positions.
|
static void |
readMap()
Reads the contents of the map in to BWTA.
|
public static void readMap()
public static void analyze()
public static java.util.List<Region> getRegions()
public static java.util.List<Chokepoint> getChokepoints()
public static java.util.List<BaseLocation> getBaseLocations()
public static java.util.List<BaseLocation> getStartLocations()
public static java.util.List<Polygon> getUnwalkablePolygons()
public static BaseLocation getStartLocation(Player player)
public static Region getRegion(int x, int y)
public static Region getRegion(TilePosition tileposition)
public static Region getRegion(Position position)
public static Chokepoint getNearestChokepoint(int x, int y)
public static Chokepoint getNearestChokepoint(TilePosition tileposition)
public static Chokepoint getNearestChokepoint(Position position)
public static BaseLocation getNearestBaseLocation(int x, int y)
public static BaseLocation getNearestBaseLocation(TilePosition tileposition)
public static BaseLocation getNearestBaseLocation(Position position)
public static Polygon getNearestUnwalkablePolygon(int x, int y)
public static Polygon getNearestUnwalkablePolygon(TilePosition tileposition)
public static Position getNearestUnwalkablePosition(Position position)
public static boolean isConnected(int x1, int y1, int x2, int y2)
public static boolean isConnected(TilePosition a, TilePosition b)
public static double getGroundDistance(TilePosition start, TilePosition end)