forked from yanntm/YoBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMicroManager.h
More file actions
45 lines (31 loc) · 754 Bytes
/
MicroManager.h
File metadata and controls
45 lines (31 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#include "Common.h"
#include "SquadOrder.h"
#include "Micro.h"
#include "MapTools.h"
struct AirThreat
{
UnitTag unit;
double weight;
};
struct GroundThreat
{
UnitTag unit;
double weight;
};
class YoAgent;
class MicroManager
{
std::vector<const sc2::Unit *> m_units;
protected:
YoAgent & m_bot;
SquadOrder order;
virtual void executeMicro(const std::vector<const sc2::Unit *> & targets) = 0;
void trainSubUnits(const sc2::Unit * unit) const;
public:
MicroManager(YoAgent & bot); //, MapTools & map);
const std::vector<const sc2::Unit *> & getUnits() const;
void setUnits(const std::vector<const sc2::Unit *> & u);
void execute(const SquadOrder & order);
void regroup(const sc2::Point2D & regroupPosition) const;
};