#include "location.h" #include Location::Location(Initializer &&initializer) : _interaction_message(initializer.message), _interactive_controllers(initializer.interactive_controllers) {} const std::string& Location::interact() { return _interaction_message; } const std::list>& Location::controllers() { return _interactive_controllers; } void Location::removeControllers(const std::list> &controllers) { for (const auto& to_remove_controller : controllers) { for (auto it = _interactive_controllers.begin(); it != _interactive_controllers.end(); ++it) { if ((*it) == to_remove_controller) { _interactive_controllers.erase(it); break; } } } } void Location::setInteractionMessage(const std::string& message) { _interaction_message = message; }