aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/Item.hpp
blob: caa1e6f15086b0c6ce1b1fb7b214af92ade2078f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef ITEM_HPP
#define ITEM_HPP

#include <string>

class Actor;

/*
 * TODO description
 */
class Item
{
public:
    Item() = delete;
    virtual ~Item() {}

    virtual bool use(Actor &user, Actor &actor) = 0;

    bool stackable() { return _maxAmount == 1; }

protected:
    unsigned _maxAmount;
    unsigned _amount; // stackable

    const std::string _name;

    Item(const std::string &name) : _name(name) {}
};

#endif