diff options
Diffstat (limited to 'backend/Location.h')
-rw-r--r-- | backend/Location.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/backend/Location.h b/backend/Location.h index 1b23c78..6068a99 100644 --- a/backend/Location.h +++ b/backend/Location.h @@ -1,9 +1,41 @@ #pragma once +#include "List.hpp" + +class Enemy; +class Object; + +enum Direction { + NORTH = 0, + EAST = 1, + SOUTH = 2, + WEST = 3, +}; + class Location { +public: + void set_name(const char * name); + const char * get_name(); + void set_description(const char * description); + const char * get_description(); + void set_exit(Direction dir, Location * location = nullptr); + Location * get_exit(Direction dir); + protected: - Location() = default; - virtual ~Location() = default; + Location(const char * name = "", const char * description = ""); + virtual ~Location(); friend class LocationFactory; +private: + const char * name = nullptr; + const char * description = nullptr; + List<Enemy*> enemies = {}; + List<Object*> objects = {}; + + Location * edges[4] = { + nullptr, + nullptr, + nullptr, + nullptr, + }; }; |