diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/Enemy.cpp | 2 | ||||
-rw-r--r-- | backend/Enemy.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/backend/Enemy.cpp b/backend/Enemy.cpp index bb39359..9d3b26d 100644 --- a/backend/Enemy.cpp +++ b/backend/Enemy.cpp @@ -8,3 +8,5 @@ const String & Enemy::get_name() const { return this->name; } void Enemy::set_description(const String & description) { this->description = description; } const String & Enemy::get_description() const { return this->description; } +unsigned Enemy::get_health() const { return this->health_points; } + diff --git a/backend/Enemy.h b/backend/Enemy.h index 3c58c82..ea08864 100644 --- a/backend/Enemy.h +++ b/backend/Enemy.h @@ -8,6 +8,7 @@ public: const String & get_name() const; void set_description(const String & description); const String & get_description() const; + unsigned get_health() const; private: friend class EnemyFactory; @@ -18,5 +19,6 @@ public: private: String name; String description; + unsigned int health_points = 0; }; |