forked from yanntm/YoBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GameCommander.h
49 lines (35 loc) · 1.1 KB
/
GameCommander.h
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
46
47
48
49
#pragma once
#include "Common.h"
#include "Timer.hpp"
//#include "ProductionManager.h"
#include "ScoutManager.h"
#include "CombatCommander.h"
class YoAgent;
class GameCommander
{
YoAgent & m_bot;
Timer m_timer;
//ProductionManager m_productionManager;
ScoutManager m_scoutManager;
CombatCommander m_combatCommander;
std::vector<const sc2::Unit *> m_validUnits;
std::vector<const sc2::Unit *> m_combatUnits;
std::vector<const sc2::Unit *> m_scoutUnits;
bool m_initialScoutSet;
void assignUnit(const sc2::Unit * unit, std::vector<const sc2::Unit *> & units);
bool isAssigned(const sc2::Unit * unit) const;
public:
GameCommander(YoAgent & bot);
void onStart();
void onFrame();
void handleUnitAssignments();
void setValidUnits();
void setScoutUnit(const sc2::Unit * unit);
void setScoutUnits();
void setCombatUnits();
void drawDebugInterface();
void drawGameInformation(int x, int y);
bool shouldSendInitialScout();
void onUnitCreate(const sc2::Unit * unit);
void onUnitDestroy(const sc2::Unit * unit);
};