From: Dominik Kaiser Date: Mon, 10 Feb 2025 11:32:47 +0000 (+0100) Subject: Add HumanA and HumanB classes X-Git-Url: https://git.dkaiser.de/?a=commitdiff_plain;h=4b7e380d5f718fe557ef6ae068d7896620bc24f2;p=42%2Fcpp01.git Add HumanA and HumanB classes --- diff --git a/ex03/HumanA.hpp b/ex03/HumanA.hpp index 0c8cde6..b373665 100644 --- a/ex03/HumanA.hpp +++ b/ex03/HumanA.hpp @@ -6,11 +6,24 @@ /* By: dkaiser + +class HumanA +{ + public: + HumanA(const std::string &name, const Weapon &weapon); + void attack(void) const; + private: + Weapon weapon; + std::string name; +}; + #endif diff --git a/ex03/HumanB.hpp b/ex03/HumanB.hpp index d8ccdc8..ce4edbd 100644 --- a/ex03/HumanB.hpp +++ b/ex03/HumanB.hpp @@ -6,11 +6,25 @@ /* By: dkaiser + +class HumanB +{ + public: + HumanB(const std::string &name); + void attack(void) const; + void setWeapon(Weapon *weapon); + private: + Weapon* weapon; + std::string name; +}; + #endif