1 #ifndef _OVERSEER_CHOKEPOINT_H_ 2 #define _OVERSEER_CHOKEPOINT_H_ 10 typedef std::tuple<size_t, size_t, size_t> ChokePointId;
28 ChokePoint(
const Region* region1,
const Region* region2,
size_t cp_id, std::vector<TilePosition> tilePositions);
35 std::pair<const Region*, const Region*>
getRegions()
const;
56 std::vector<sc2::Point2D>
getPoints()
const;
70 ChokePointId
getId()
const;
99 std::pair<const Region *, const Region *> m_regions;
100 std::vector<UnitPosition> m_neutralUnitPositions;
101 std::vector<TilePosition> m_tilePositions;
102 TilePosition m_center;
std::vector< sc2::Point2D > getPoints() const
Get the points within the chokepoint.
Definition: ChokePoint.cpp:35
sc2::Point2D getMidPoint() const
Gets the mid point of the chokepoint.
Definition: ChokePoint.cpp:30
ChokePoint(const Region *region1, const Region *region2, size_t cp_id, std::vector< TilePosition > tilePositions)
class Constructor
Definition: ChokePoint.cpp:10
std::vector< TilePosition > getTilePositions() const
Get the tile positions inside the chokePoint.
std::string getStringId() const
Gets the chokepoint id as a string.
Definition: ChokePoint.cpp:49
size_t getChokePointId() const
Gets the chokepoints position between two regions (INTERNAL USE ONLY).
Definition: ChokePoint.cpp:60
Definition: ChokePoint.cpp:3
bool adjacent(ChokePoint &cp) const
check if this chokepoint share a region with chokepoint cp.
Definition: ChokePoint.cpp:66
A region handler.
Definition: Region.h:67
Class that is used as a chokepoint container with size and positioning on the map.
Definition: ChokePoint.h:17
bool operator==(const ChokePoint &rhs) const
How two chokepoints will be check if equal.
Definition: ChokePoint.cpp:62
std::pair< const Region *, const Region * > getRegions() const
Gets the regions where a chokepoint exists between them.
Definition: ChokePoint.cpp:21
ChokePointId getId() const
Get the id of the chokepoint.
Definition: ChokePoint.cpp:56
size_t size() const
Get the size of the found chokepoint.
Definition: ChokePoint.cpp:25