Skip to content

Commit

Permalink
Refactor .h -> .hpp and correct typos
Browse files Browse the repository at this point in the history
  • Loading branch information
MicheleMichetti committed Feb 18, 2024
1 parent 5306a8b commit 02d002d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 51 deletions.
2 changes: 1 addition & 1 deletion game/src/Map.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "Map.h"
#include "Map.hpp"

Map::Map(const uint16_t &id, const uint8_t &currentType, const std::string &mapName, const std::string &bitmapName, const tileArray &tiles, const uint16_t &dimensionX, const uint16_t &dimensionY, const entityMap &entities) {
setId(id);
Expand Down
49 changes: 0 additions & 49 deletions include/Map.h

This file was deleted.

20 changes: 20 additions & 0 deletions include/Map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
#include <vector>

using tileArray = boost::multi_array<Tile,2>;
<<<<<<< HEAD
using entityMap = std::map<uint32_t,entity::Entity>;
=======
using entityStdMap = std::map<uint32_t,entity::Entity>;
>>>>>>> 27e3747 (Refactor .h -> .hpp and correct typos)

class Map {
private:
Expand All @@ -16,28 +20,44 @@ class Map {
std::string mapName_;
std::string bitmapName_;
tileArray tiles_;
<<<<<<< HEAD
entityMap entities_;
=======
entityStdMap entities_;
>>>>>>> 27e3747 (Refactor .h -> .hpp and correct typos)

public:

Map();
<<<<<<< HEAD
Map(const uint16_t &id, const uint8_t &currentType, const std::string &mapName, const std::string &bitmapName, const tileArray &tiles, const uint16_t &dimensionX, const uint16_t &dimensionY, const entityMap &entities);
=======
Map(const uint16_t &id, const uint8_t &currentType, const std::string &mapName, const std::string &bitmapName, const tileArray &tiles, const uint16_t &dimensionX, const uint16_t &dimensionY, const entityStdMap &entities);
>>>>>>> 27e3747 (Refactor .h -> .hpp and correct typos)
~Map();

void setId(const uint16_t &id);
void setCurrentType(const uint8_t &currentType);
void setMapName(const std::string &mapName);
void setBitmapName(const std::string &bitmapName);
void setTiles(const tileArray tiles, const uint16_t &dimensionX, const uint16_t &dimensionY);
<<<<<<< HEAD
void setEntities(const entityMap &entities);
=======
void setEntities(const entityStdMap &entities);
>>>>>>> 27e3747 (Refactor .h -> .hpp and correct typos)
void setTile(const utils::Coordinate &coordinate, const Tile &tile);

const uint16_t getId();
const uint8_t getCurrentType();
const std::string getMapName();
const std::string getBitmapName();
const tileArray getTiles();
<<<<<<< HEAD
const entityMap getEntities();
=======
const entityStdMap getEntities();
>>>>>>> 27e3747 (Refactor .h -> .hpp and correct typos)

void swapTiles(Tile tile1, Tile Tile2);

Expand Down
2 changes: 1 addition & 1 deletion test/MapTest.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "Map.h"
#include "Map.hpp"

int main() {
std::cout<<"hello Map"<<std::endl;
Expand Down

0 comments on commit 02d002d

Please sign in to comment.