#ifndef ITEM_HPP #define ITEM_HPP #include class Actor; /* * TODO description */ class Item { public: enum Type { BULLET, MELEEWEAPON, RANGEDWEAPON, STICK, HEAL, FOOD }; const Type type; Item() = delete; virtual ~Item() {} virtual bool use(Actor &user, Actor &actor) = 0; int amount() { return _amount; } bool stackable() { return _maxAmount == 1; } protected: unsigned _maxAmount; unsigned _amount; // stackable const std::string _name; Item(Type t, const std::string &name) : type(t), _name(name) {} }; #endif