From da92752a5f9ea2c301ae0d541ae28caf3589f097 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 30 Oct 2024 22:42:45 +0100 Subject: update view command --- backend/Enemy.cpp | 2 ++ backend/Enemy.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'backend') 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; }; -- cgit v1.2.3