diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-30 22:42:45 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-30 22:42:45 +0100 |
commit | da92752a5f9ea2c301ae0d541ae28caf3589f097 (patch) | |
tree | d111fd4293efc2a6a8afbe0cd49f29f9e9c98034 /backend | |
parent | ff7390073ad42b9584aa2c509669867edab8c2f6 (diff) |
update view command
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; }; |