Skip to content

Commit

Permalink
Using consistent member name format "my_member"
Browse files Browse the repository at this point in the history
  • Loading branch information
MicheleMichetti committed Feb 18, 2024
1 parent bb09edc commit 5aa42de
Showing 1 changed file with 41 additions and 39 deletions.
80 changes: 41 additions & 39 deletions game/include/Map.hpp
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
#pragma once

#include <Tile.hpp>
#include <boost/multi_array.hpp>

#include <iostream>
#include <map>
#include <string>
#include <map>
#include <boost/multi_array.hpp>

using tileArray = boost::multi_array<Tile, 2>;
using entityMap = std::map<uint32_t, entity::Entity>;
using tileArray = boost::multi_array<Tile,2>;
using entityMap = std::map<uint32_t,entity::Entity>;

class Map {
private:
uint16_t id_;
uint8_t currentType_;
std::string mapName_;
std::string bitmapName_;
tileArray tiles_;
entityMap entities_;

public:
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);
~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);
void setEntities(const entityMap& entities);
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();
const entityMap getEntities();

void swapTiles(Tile tile1, Tile Tile2);

bool doesItCollide(const tils::Coordinate& coordinate, const uint8_t& direction);
bool doesItInteract(const utils::Coordinate& coordinate, const uint8_t& direction);
bool isPokemonBattleTriggered();
bool isTrainerBattleTriggered();
private:
uint16_t id_;
uint8_t current_type_;
std::string map_name_;
std::string bitmap_name_;
tileArray tiles_;
entityMap entities_;

public:

Map();
Map(const uint16_t &id, const uint8_t &current_type, const std::string &map_name, const std::string &bitmap_name, const tileArray &tiles, const uint16_t &dimensionX, const uint16_t &dimensionY, const entityMap &entities);
~Map();

void setId(const uint16_t &id);
void setCurrentType(const uint8_t &current_type);
void setMapName(const std::string &map_name);
void setBitmapName(const std::string &bitmap_name);
void setTiles(const tileArray tiles, const uint16_t &dimensionX, const uint16_t &dimensionY);
void setEntities(const entityMap &entities);
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();
const entityMap getEntities();

void swapTiles(Tile tile1, Tile Tile2);

bool doesItCollide(const tils::Coordinate &coordinate, const uint8_t &direction);
bool doesItInteract(const utils::Coordinate &coordinate, const uint8_t &direction);
bool isPokemonBattleTriggered();
bool isTrainerBattleTriggered();

}

0 comments on commit 5aa42de

Please sign in to comment.