#ifndef SCREEPS_ROOM_HPP #define SCREEPS_ROOM_HPP #include "Constants.hpp" #include "Object.hpp" namespace Screeps { class RoomObject; class RoomPosition; class StructureController; class StructureStorage; class Room : public Object { public: explicit Room(JS::Value value); std::optional controller() const; int energyAvailable() const; int energyCapacityAvailable() const; JSON memory() const; void setMemory(const JSON&); std::string name() const; std::optional storage() const; // StructureTerminal terminal() const; // RoomVisual visual() const; // std::string serializePath(...) // ... deserializePath(const std::string path); int createConstructionSite(int x, int y, std::string structureType, std::optional name = std::nullopt); int createConstructionSite(const RoomPosition& pos, std::string structureType, std::optional name = std::nullopt); int createFlag(int x, int y, std::optional name = std::nullopt, std::optional color = std::nullopt, std::optional secondaryColor = std::nullopt); int createFlag(const RoomPosition& pos, std::optional name = std::nullopt, std::optional color = std::nullopt, std::optional secondaryColor = std::nullopt); std::vector> find(int type, std::function predicate = {}) const; template std::vector> find(std::function predicate = {}) const { if (predicate) { auto p = [&](const JS::Value& value) { return predicate(T(value)); }; return find(T::findConstant, p); } else return find(T::findConstant); } int findExitTo(const std::string& room); int findExitTo(const Room& room); // ... findPath(const RoomPosition& fromPos, const RoomPosition& toPos, JSON options); // ... getEventLog(bool raw); std::optional getPositionAt(int x, int y); // RoomTerrain getTerrain(); // ... lookAt(int x, int y); // ... lookAt(const RoomPosition& target); // ... lookAtArea(int top, int left, int bottom, int right, std::optional asArray = std::nullopt); // ... lookForAt(const std::string& type, int x, int y); // ... lookForAt(const std::string& type, const RoomPosition& target); // ... lookAtArea(const std::string& type, // int top, // int left, // int bottom, // int right, // std::optional asArray = std::nullopt); }; } // namespace Screeps #endif // SCREEPS_ROOM_HPP