#pragma once #include #include #include #include #include "json.hpp" #include "object.h" using json = nlohmann::json; enum Direction { N, S, E, W }; struct Exit { int exitID; Direction dir; bool isLocked; friend void from_json(const json &j, Exit &e); friend void to_json(json &j, const Exit &e); }; class Room { private: int id; std::string name; std::string description; std::vector exits; public: Room(); Room(int id, std::string name, std::string desc, std::vector e); Room(const Room &r); int AvalibleExits() { return exits.size(); } void Print() const; ~Room(); friend void to_json(nlohmann::json &j, const Room &r); friend void from_json(const nlohmann::json &j, Room &r); };