diff options
Diffstat (limited to 'sim')
-rw-r--r-- | sim/include/kurator/sim/HitPoints.h | 1 | ||||
-rw-r--r-- | sim/src/HitPoints.cpp | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sim/include/kurator/sim/HitPoints.h b/sim/include/kurator/sim/HitPoints.h index 8930e3a..96b54b0 100644 --- a/sim/include/kurator/sim/HitPoints.h +++ b/sim/include/kurator/sim/HitPoints.h @@ -12,6 +12,7 @@ struct HitPoints double health; void deal(double damage); bool is_alive() const; + double total() const; }; diff --git a/sim/src/HitPoints.cpp b/sim/src/HitPoints.cpp index da980f1..28cf7f7 100644 --- a/sim/src/HitPoints.cpp +++ b/sim/src/HitPoints.cpp @@ -21,5 +21,12 @@ HitPoints::is_alive() const } +double +HitPoints::total() const +{ + return health; +} + + } // namespace sim } // namespace kurator |