-
Notifications
You must be signed in to change notification settings - Fork 0
/
Map.h
54 lines (44 loc) · 842 Bytes
/
Map.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef MAP_H
#define MAP_H
#include "Point.h"
#include "Genome.h"
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
using namespace std;
enum direction
{
NORTH, NORTH_EAST, EAST, SOUTH_EAST,
SOUTH, SOUTH_WEST, WEST, NORTH_WEST
};
class Map
{
public:
Map();
Map(int n, int m, int seed, int hardness);
~Map();
void display();
Point* getStart();
Point* getEnd();
Point* change(Point* p, int direct, int steps);
int getn();
int getm();
void displayWithPath(Genome *g);
void displayWith(Point* p);
vector<Point*> getPoints();
vector<pair<int, int> > getPath(Genome *g);
private:
int n;
int m;
Point *start;
Point *end;
vector<Point*> points;
int seed;
int hardness;
void addObstacle(int row, int size, int nb, int seed);
};
#endif