From 88aabb485affe1a38192e87cda57716cfc83d6d0 Mon Sep 17 00:00:00 2001 From: myitinos Date: Mon, 31 Dec 2018 15:25:58 +0800 Subject: [PATCH] renamed function to check alive or not and added name getter --- class/character.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/class/character.hpp b/class/character.hpp index 875d883..bb055d7 100644 --- a/class/character.hpp +++ b/class/character.hpp @@ -32,12 +32,12 @@ class Character this->def = def; } - bool checkDied() + bool isDead() { return hp <= 0; } - bool checkAlive() + bool isAlive() { return hp > 0; } @@ -62,6 +62,11 @@ class Character return def; } + char *getName() + { + return name; + } + int getAtt() { return att;