-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimulation.h
39 lines (34 loc) · 980 Bytes
/
Simulation.h
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
#include <mutex>
#include <cstring>
#include <chrono>
#include <thread>
#include "shared_header.h"
#include "Entity.h"
#include "Datagrid.h"
#include "Personne.h"
#include "Obstacle.h"
#include "Command.h"
class Simulation
{
double people;
int four_threads_cond;
int bench_time_cond;
std::vector<Entity*> personnes;
std::vector<Entity*> obstacles;
public:
Simulation(double people, int four_threads_cond, int bench_time_cond);
~Simulation();
void fill_grid(Entity* e);
std::vector<Entity*> get_vObstacles();
std::vector<Entity*> get_vPersonnes();
int start();
bool isRunning();
Datagrid* dataGrid;
private:
static std::vector<int> azimuth(int, int); // Helper for creating a path
std::queue<Command*> path(int, int, std::vector<int>); // Compute path to the azimuth
// More helpers for path finding
std::vector<int> getNextPos(CommandN*, int, int);
std::vector<int> getNextPos(CommandNW*, int, int);
std::vector<int> getNextPos(CommandW*, int, int);
};