2021-05-08 03:36:26 +02:00
|
|
|
#ifndef LOCATION_H
|
|
|
|
#define LOCATION_H
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
#include <string>
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
class Controller;
|
|
|
|
|
|
|
|
class Location
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
struct Initializer
|
|
|
|
{
|
|
|
|
const std::string& message;
|
|
|
|
const std::list<std::shared_ptr<Controller>>& interactive_controllers;
|
|
|
|
};
|
|
|
|
|
|
|
|
explicit Location(Initializer &&initializer);
|
|
|
|
|
|
|
|
virtual const std::string& interact();
|
|
|
|
const std::list<std::shared_ptr<Controller>>& controllers();
|
2021-05-16 01:44:19 +02:00
|
|
|
void removeControllers(const std::list<std::shared_ptr<Controller>>& controllers);
|
|
|
|
void setInteractionMessage(const std::string& message);
|
2021-05-08 03:36:26 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::string _interaction_message;
|
|
|
|
std::list<std::shared_ptr<Controller>> _interactive_controllers;
|
|
|
|
std::shared_ptr<Location> _current_user_location;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LOCATION_H
|