-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMap.h
More file actions
40 lines (33 loc) · 928 Bytes
/
Map.h
File metadata and controls
40 lines (33 loc) · 928 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
#ifndef MAP_H_GUARD
#define MAP_H_GUARD
#include "HeroHandler.h"
typedef std::vector< std::string > vectorString;
class Map
{
private:
vectorString m_ObjectsDesignOnMap;
std::vector<HeroHandler> m_HeroesOnMap;
std::vector<Resource> m_ResourcesOnMap;
const unsigned m_MapWidth;
const unsigned m_MapHeight;
public:
Map();
Map(const unsigned mapWidth, const unsigned mapHeight);
void UpdateHero(const Hero& hero, COORD newPosition, char heroSymbol);
void UpdateChanges(); // TODO the bot logic...
void AddResource(const Resource& resource);
void AddHero(const Hero& hero);
void RemoveHero(const std::string tag);
bool IsHeroOn(COORD position) const;
Hero& FindHero(const std::string tag) const;
std::string TryPlayerGettingResource(const char* playerTagName);
const unsigned GetMapWidth() const
{
return m_MapWidth;
}
vectorString GetObjectsToDraw() const
{
return m_ObjectsDesignOnMap;
}
};
#endif