-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
36 lines (27 loc) · 793 Bytes
/
Copy pathmain.cpp
File metadata and controls
36 lines (27 loc) · 793 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
#include "Astar.hpp"
#include "Wall.hpp"
#include "heuristic.hpp"
#include "Agent.hpp"
#include "MAPPGridState.hpp"
#include "porting.hpp"
vector<Wall> MAPPGridState::walls = {};
int main()
{
/* Create walls */
MAPPGridState::walls.emplace_back(Wall(10, 7));
MAPPGridState::walls.emplace_back(Wall(3, 5));
Agent agent_1(0,0, 10,10, "Agent 1");
Agent agent_2(0,5, 15,17, "Agent 2");
vector<Agent> agents;
agents.emplace_back(agent_1);
agents.emplace_back(agent_2);
MAPPGridState grid( agents, 100, 100, 0 );
OUTPUT << "↓Original state↓";
grid.show();
vector<MAPPGridState> results = Astar::astar(grid);
for( auto iter = results.begin(); iter < results.end(); ++iter )
{
iter->show();
}
return 0;
}