-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathmap.h
58 lines (49 loc) · 1002 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
55
56
57
58
//
// Created by flasque on 19/10/2024.
//
#ifndef UNTITLED1_MAP_H
#define UNTITLED1_MAP_H
#define COST_UNDEF 65535
/**
* @brief Enum for the possible soils of the map
*/
typedef enum e_soil
{
BASE_STATION,
PLAIN,
ERG,
REG,
CREVASSE
} t_soil;
/**
* @brief Array of costs for the soils
*/
static const int _soil_cost[5] = {0, 1, 2, 4, 10000};
/**
* @brief Structure for the map
*/
typedef struct s_map
{
t_soil **soils;
int **costs;
int x_max;
int y_max;
} t_map;
/**
* @brief Function to initialise the map from a file
* @param filename : the name of the file
* @return the map
*/
t_map createMapFromFile(char *);
/**
* @brief Function to create a standard training map (11x11 with only plains and base station in the middle)
* @param none
* @return a standard map
*/
t_map createTrainingMap();
/**
* @brief display the map with characters
* @param map : the map to display
*/
void displayMap(t_map);
#endif //UNTITLED1_MAP_H