forked from yanntm/YoBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BaseLocationManager.h
36 lines (25 loc) · 1.07 KB
/
BaseLocationManager.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
#pragma once
#include "sc2api/sc2_api.h"
#include "BaseLocation.h"
class YoAgent;
class BaseLocationManager
{
YoAgent & m_bot;
std::vector<BaseLocation> m_baseLocationData;
std::vector<const BaseLocation *> m_baseLocationPtrs;
std::vector<const BaseLocation *> m_startingBaseLocations;
std::map<int, const BaseLocation *> m_playerStartingBaseLocations;
std::map<int, std::set<const BaseLocation *>> m_occupiedBaseLocations;
std::vector<std::vector<BaseLocation *>> m_tileBaseLocations;
BaseLocation * getBaseLocation(const sc2::Point2D & pos) const;
public:
BaseLocationManager(YoAgent & bot);
void onStart();
void onFrame();
void drawBaseLocations();
const std::vector<const BaseLocation *> & getBaseLocations() const;
const std::vector<const BaseLocation *> & getStartingBaseLocations() const;
const std::set<const BaseLocation *> & getOccupiedBaseLocations(int player) const;
const BaseLocation * getPlayerStartingBaseLocation(int player) const;
sc2::Point2D getNextExpansion(int player) const;
};