added potion and restore_health

This commit is contained in:
2024-07-11 21:32:23 -04:00
parent ae5cd1e0c6
commit 0312986dce
7 changed files with 102 additions and 33 deletions

12
src/potion.cc Normal file
View File

@ -0,0 +1,12 @@
#include "potion.h"
potion::potion(const potion_type type, const int duration):
type{type}, remaining_duration{duration} {}
potion_type potion::get_type() const {
return type;
}
int potion::get_duration() const {
return remaining_duration;
}