2021-05-07 21:36:26 -04:00
|
|
|
#ifndef PLAYER_H
|
|
|
|
#define PLAYER_H
|
|
|
|
|
|
|
|
#include "actor.h"
|
|
|
|
|
|
|
|
class Player : public Actor, public std::enable_shared_from_this<Player>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit Player();
|
|
|
|
virtual ~Player() override;
|
|
|
|
|
|
|
|
virtual void commitAction() override;
|
|
|
|
virtual void moveToLocation(const std::shared_ptr<Location>& location) override;
|
2021-05-15 19:44:19 -04:00
|
|
|
virtual bool isLocationVisited(const std::shared_ptr<Location>& location) const override;
|
2021-05-07 21:36:26 -04:00
|
|
|
virtual void giveItem(const std::shared_ptr<Item>& item) override;
|
|
|
|
virtual void useItem(const std::shared_ptr<Item>& item) override;
|
2021-05-15 19:44:19 -04:00
|
|
|
virtual bool hasItem(const std::shared_ptr<Item>& item) const override;
|
2021-05-16 11:20:57 -04:00
|
|
|
virtual void readyItem(const std::shared_ptr<Item>& item) override;
|
|
|
|
virtual bool isItemReady(const std::shared_ptr<Item>& item) const override;
|
2021-05-07 21:36:26 -04:00
|
|
|
|
|
|
|
private:
|
2021-05-15 19:44:19 -04:00
|
|
|
std::string showInventory() const;
|
2021-05-16 11:20:57 -04:00
|
|
|
void findItemToReady(const std::string &label);
|
2021-05-07 21:36:26 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PLAYER_H
|