From 879c2c04d9c3879f871cfe79f9b25fd23c5184b4 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 11 Jun 2015 11:38:49 -0400 Subject: Wrote EntityManager --- src/map.h | 70 --------------------------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 src/map.h (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h deleted file mode 100644 index 22333aa..0000000 --- a/src/map.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef MAP_H -#define MAP_H - -#include -#include -#include - -class Entity; - -class Map { - public: - Map(int id); - Map() : Map(-1) {} - Map(const Map& map); - Map(Map&& map); - ~Map(); - Map& operator= (Map other); - friend void swap(Map& first, Map& second); - - enum class MoveType { - Wall, - Wrap, - Warp, - ReverseWarp - }; - - enum class MoveDir { - Left, - Right, - Up, - Down - }; - - struct EntityData { - std::string name; - std::pair position; - std::map items; - }; - - struct Adjacent { - MoveType type = MoveType::Wall; - int map = -1; - }; - - static MoveType moveTypeForShort(std::string str); - static MoveDir moveDirForShort(std::string str); - static bool moveTypeTakesMap(MoveType type); - - int getID() const; - const int* getMapdata() const; - std::string getTitle() const; - const Adjacent& getAdjacent(MoveDir dir) const; - - void createEntities(std::list>& entities) const; - bool operator==(const Map& other) const; - bool operator!=(const Map& other) const; - - void setMapdata(int* mapdata); - void setTitle(std::string title); - void setAdjacent(MoveDir dir, MoveType type, int map); - void addEntity(EntityData& data); - private: - int* mapdata; - std::string title; - int id; - std::list entities; - std::map adjacents; -}; - -#endif -- cgit 1.4.1