Repository navigation
Expand file tree
/
Copy pathmap.h
More file actions
64 lines (55 loc) · 1.67 KB
/
Copy pathmap.h
File metadata and controls
64 lines (55 loc) · 1.67 KB
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
59
60
61
62
63
64
#ifndef MAP_H
#define MAP_H
#include "string"
#include "block.h"
#include <vector>
#include "ia.h"
#include "player.h"
using namespace std;
class Map
{
private:
bool replace(std::string& str, const std::string& from, const std::string& to) ;
///
/// \brief split divise une chaine de caractère
/// \param s string à diviser
/// \param delimeter le string qui fixe les lignes de découpage
/// \return le vecteur contenant les différents morceaux
///
vector<string> split(string s,string delimeter);
///
/// \brief itsMapFile variable to know which map was load
///
std::string itsMapFile;
std::vector<Block> itsBlocks;
void addBlock(Block & block);
int itsWidthMap,itsHeightMap;
public:
///
/// \brief Map constructeur de la carte
///
Map();
/// \brief ~Map destructeur de la carte
~Map();
///
/// \brief loadMap charge le fichier correspond au niveau dans la memoire
/// \param mapFile chemin d'acces vers le niveau a charger
///
vector<Personnage*> loadMap(std::string mapFile);
///
/// \brief getItsBlocks getter de itsBlocks
/// \return retourne les blocks de la carte chargé
///
std::vector<Block> & getItsBlocks();
///
/// \brief getItsWidthMap getter itsWidthMap soit la largeur de la carte
/// \return retourne la largeur de la carte en block
///
int getItsWidthMap() const;
///
/// \brief getItsHeightMap getter itsHeightMap soit la hauteur de la carte
/// \return retourne la hauteur de la carte en block
///
int getItsHeightMap() const;
};
#endif // MAP_H