-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmap.h
More file actions
42 lines (30 loc) · 733 Bytes
/
map.h
File metadata and controls
42 lines (30 loc) · 733 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
#ifndef MAP_H
#define MAP_H
#include "gl_const.h"
#include "tinyxml/tinyxml.h"
#include "tinyxml/tinystr.h"
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
class Map {
private:
int ** Grid;
int height, width;
double CellSize;
public:
Map();
~Map();
bool getMap(const char* FileName);
bool CellIsTraversable (int curr_i, int curr_j) const;
bool CellOnGrid (int curr_i, int curr_j) const;
bool CellIsObstacle(int curr_i, int curr_j) const;
int* operator [] (int i);
const int* operator [] (int i) const;
int getWidth() const;
int getHeight() const;
double getCellSize() const;
int start_i, start_j;
int goal_i, goal_j;
};
#endif