Overseer
NeutralSetObj.h
1 #ifndef _NEUTRAL_SET_OBJ_H_
2 #define _NEUTRAL_SET_OBJ_H_
3 
4 #include "sc2api/sc2_api.h"
5 #include "Definitions.h"
6 
7 namespace Overseer{
8  typedef spatial::box_multimap<2, sc2::Point2D, sc2::UNIT_TYPEID, spatial::accessor_less<accessors::point2d_accessor, sc2::Point2D>> NeutralContainer;
9 
14  struct NeutralImpl{
20  NeutralImpl(const sc2::ObservationInterface* obs);
21 
28  bool isMineral(sc2::Point2D& pos);
29 
36  bool isGas(sc2::Point2D& pos);
37 
44  bool isDestructible(sc2::Point2D& pos);
45 
52  bool isNagaTower(sc2::Point2D& pos);
53 
54  private:
55  // check if UNIT_TYPEID is neutral of intresst
56  bool isNeutral(const sc2::UNIT_TYPEID& check);
57 
58  NeutralContainer m_NeutralUnits;
59  };
60 }
61 
62 #endif /*_NEUTRAL_SET_OBJ_H_*/
Used to find neutral objects on the map.
Definition: NeutralSetObj.h:14
bool isMineral(sc2::Point2D &pos)
Check if a point is a mineral or not.
Definition: NeutralSetObj.cpp:22
bool isNagaTower(sc2::Point2D &pos)
Check if a point is a Xelnaga tower or not.
Definition: NeutralSetObj.cpp:80
NeutralImpl(const sc2::ObservationInterface *obs)
Constructor sets all neutral positions to a map.
Definition: NeutralSetObj.cpp:11
Definition: ChokePoint.cpp:3
bool isDestructible(sc2::Point2D &pos)
Check if a point is a destructable object or not.
Definition: NeutralSetObj.cpp:54
bool isGas(sc2::Point2D &pos)
Check if a point is a geyser or not.
Definition: NeutralSetObj.cpp:41