-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmap.h
More file actions
49 lines (36 loc) · 868 Bytes
/
map.h
File metadata and controls
49 lines (36 loc) · 868 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
41
42
43
44
45
46
47
48
49
#ifndef MAP_H
#define MAP_H
#include <iostream>
#include "node.h"
#include "environmentoptions.h"
#include "gl_const.h"
#include <list>
#include "tinyxml2.h"
#include "searchresult.h"
#include <sstream>
#include <string>
#include <algorithm>
#include <random>
class Map
{
public:
Map();
Map(const Map& orig);
~Map();
bool GetMap(const char *name);
bool CellIsTraversable (Cell curr) const;
bool CellOnGrid (Cell curr) const;
bool CellIsObstacle(Cell cur) const;
int * operator [] (int i);
const int * operator [] (int i) const;
void PrintPath(std::list<Node> path);
int height, width;
Cell start;
Cell goal;
double CellSize;
protected:
int ** Grid;
void BuildGrid();
std::string filename;
};
#endif