aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/Actor.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/headers/Actor.hpp')
-rw-r--r--src/main/headers/Actor.hpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/main/headers/Actor.hpp b/src/main/headers/Actor.hpp
index 7cc3be5..0e74ee0 100644
--- a/src/main/headers/Actor.hpp
+++ b/src/main/headers/Actor.hpp
@@ -1,29 +1,22 @@
#ifndef ACTOR_HPP
#define ACTOR_HPP
+#include <vector>
#include <string>
+
class Actor
{
public:
- const enum Type
- {
- PLAYER, ENEMY
- } type;
-
const unsigned maxHp;
const std::string name;
Actor() = delete;
- Actor(std::string _name, unsigned _maxHp, Type _type);
virtual ~Actor();
void damage(int amt);
void heal(int amt);
- // TODO shouldnt be done by the map ?
- // bool move(int x, y);
-
/* accessors */
bool alive() { return _alive; }
unsigned hp() { return _hp; }
@@ -31,10 +24,12 @@ public:
int x() { return _x; }
int y() { return _y; }
-private:
+protected:
bool _alive;
unsigned _hp;
int _x, _y;
+
+ Actor(std::string _name, unsigned _maxHp);
};
#endif