#pragma once #include "List.h" #include "ListIterator.h" class Enemy; class Object; enum Direction { NORTH = 0, EAST = 1, SOUTH = 2, WEST = 3, }; static constexpr const Direction DIRECTIONS[] = { NORTH, EAST, SOUTH, WEST }; 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); ListRange get_objects(); protected: Location(const char * name = "", const char * description = ""); virtual ~Location(); friend class LocationFactory; private: const char * name = nullptr; const char * description = nullptr; List enemies = {}; List objects = {}; Location * edges[4] = { nullptr, nullptr, nullptr, nullptr, }; };