-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmap.cpp
More file actions
49 lines (43 loc) · 944 Bytes
/
map.cpp
File metadata and controls
49 lines (43 loc) · 944 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
#include "map.h"
vector<coordinate> Map::landmarks;
Map::Map(int world)
{
world_size = world;
coordinate temp;
/*
-----------
|1 4|
| |
| |
|2 3|
-----------
*/
//LEFT TOP
temp.x = .2*world_size;
temp.y = .2*world_size;
landmarks.push_back(temp);
//LEFT DOWN
temp.x = .2*world_size;
temp.y = .8*world_size;
landmarks.push_back(temp);
//RIGHT DOWN
temp.x = .8*world_size;
temp.y = .8*world_size;
landmarks.push_back(temp);
//RIGHT UP
temp.x = .8*world_size;
temp.y = .2*world_size;
landmarks.push_back(temp);
}
//SET EMPTY GRID
void Map::set_empty_map(){
empty.clear();
for(int i = 0; i < world_size; i++){
vector<bool> test;
test.clear();
for(int j = 0; j < world_size; j++){
test.push_back(true); //TRUE = EMPTY | FALSE = NON-EMPTY
}
empty.push_back(test);
}
}