aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/Actor.hpp
blob: 0e74ee0ee611797157c885d2a0d1a580d7c399be (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
31
32
33
34
35
#ifndef ACTOR_HPP
#define ACTOR_HPP

#include <vector>
#include <string>


class Actor 
{
public:
    const unsigned maxHp;
    const std::string name;

    Actor() = delete;
    virtual ~Actor();

    void damage(int amt);
    void heal(int amt);

    /* accessors */
    bool alive() { return _alive; }
    unsigned hp() { return _hp; }

    int x() { return _x; }
    int y() { return _y; }

protected:
    bool _alive;
    unsigned _hp;
    int _x, _y;

    Actor(std::string _name, unsigned _maxHp);
};

#endif