-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathGameCommander.h
48 lines (34 loc) · 1.04 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
#pragma once
#include "Common.h"
#include "Timer.hpp"
#include "ProductionManager.h"
#include "ScoutManager.h"
#include "CombatCommander.h"
class CCBot;
class GameCommander
{
CCBot & m_bot;
Timer m_timer;
ProductionManager m_productionManager;
ScoutManager m_scoutManager;
CombatCommander m_combatCommander;
std::vector<Unit> m_validUnits;
std::vector<Unit> m_combatUnits;
std::vector<Unit> m_scoutUnits;
bool m_initialScoutSet;
void assignUnit(const Unit & unit, std::vector<Unit> & units);
bool isAssigned(const Unit & unit) const;
public:
GameCommander(CCBot & bot);
void onStart();
void onFrame();
void handleUnitAssignments();
void setValidUnits();
void setScoutUnits();
void setCombatUnits();
void drawDebugInterface();
void drawGameInformation(int x, int y);
bool shouldSendInitialScout();
void onUnitCreate(const Unit & unit);
void onUnitDestroy(const Unit & unit);
};