SC2API
An API for AI for StarCraft II
sc2_unit_filters.h
1 #pragma once
2 
3 #include "sc2_typeenums.h"
4 #include "sc2_unit.h"
5 
6 #include <vector>
7 
8 namespace sc2 {
10 struct IsUnit {
11  explicit IsUnit(UNIT_TYPEID type_);
12 
13  bool operator()(const Unit& unit_) const;
14 
15  private:
16  UNIT_TYPEID m_type;
17 };
18 
20 struct IsUnits {
21  explicit IsUnits(const std::vector<UNIT_TYPEID>& types_);
22 
23  bool operator()(const Unit& unit_) const ;
24 
25  private:
26  std::vector<UNIT_TYPEID> m_types;
27 };
28 
30 struct IsTownHall {
31  bool operator()(const Unit& unit_) const;
32 
33  bool operator()(UNIT_TYPEID type_) const;
34 };
35 
39  bool operator()(const Unit& unit_) const;
40 
41  bool operator()(UNIT_TYPEID type_) const;
42 };
43 
50  bool operator()(const Unit& unit_) const;
51 };
52 
55 struct IsGeyser {
56  bool operator()(const Unit& unit_) const;
57 
58  bool operator()(UNIT_TYPEID type_) const;
59 };
60 
67  bool operator()(const Unit& unit_) const;
68 };
69 
70 } // namespace sc2
A unit. Could be a structure, a worker or a military unit.
Definition: sc2_unit.h:70
Unit data in an observation.
Determines if the unit matches the unit type.
Definition: sc2_unit_filters.h:10
Definition: sc2_action.h:9
Definition: sc2_unit_filters.h:55
A list of enums provided for your convenience.
Determines if units matches the unit type.
Definition: sc2_unit_filters.h:20
Definition: sc2_unit_filters.h:66
Determines if the unit is town hall (command center, hatchery etc).
Definition: sc2_unit_filters.h:30
Definition: sc2_unit_filters.h:38
Definition: sc2_unit_filters.h:49