Overseer
Tile.h
1 #ifndef Tile_h
2 #define Tile_h
3 
4 #include <cstdio>
5 #include "Definitions.h"
6 
7 namespace Overseer{
8 
9  enum TileTerrain{
10  buildAndPath,
11  build,
12  path,
13  mineral,
14  gas,
15  nagaTower,
16  destructable,
17  flyOnly
18  };
19 
24  class Tile {
25  public:
31  TileTerrain getTileTerrain();
32 
38  float getTerrainHeight();
39 
45  void setTerrainHeight(float height);
46 
53  // bool Doodad();
54 
60  void setTileTerrain(TileTerrain& terrain);
61 
67  void setDistNearestUnpathable(float dist);
68 
74  float getDistNearestUnpathable() const;
75 
81  void setRegionId(size_t regionId);
82 
88  size_t getRegionId();
89 
93  bool isNeutral();
94 
95  private:
96 
97  struct TileInfo {
98  TileTerrain terrain;
99  float terrainHeight;
100  };
101 
102  TileInfo m_tileInfo;
103 
104  size_t m_regionId;
105  float m_distNearestUnpathable;
106 
107  };
108 }
109 
110 #endif /* Tile_h */
bool isNeutral()
Check if the tile contain neutral unit, e.g. gas, miniral and destroable.
TileTerrain getTileTerrain()
Says what type of terrain it is on this tile, see TileTerrain for alteritives.
Definition: Tile.cpp:10
float getDistNearestUnpathable() const
Get the distance to nearest unpathable.
Definition: Tile.cpp:33
size_t getRegionId()
Get the region id this tile is in.
Definition: Tile.cpp:42
void setDistNearestUnpathable(float dist)
Set a distance to the nearest unpathable tile.
Definition: Tile.cpp:29
Definition: ChokePoint.cpp:3
A tile is area that has size 1x1 within SCII maps.
Definition: Tile.h:24
void setRegionId(size_t regionId)
Set the region id this tile belong to.
Definition: Tile.cpp:38
void setTerrainHeight(float height)
Sets the z-axis value for the tile.
Definition: Tile.cpp:20
float getTerrainHeight()
Get the z-axis value for the tile.
Definition: Tile.cpp:15
void setTileTerrain(TileTerrain &terrain)
If there exist build or wall.
Definition: Tile.cpp:24