From: Dominik Kaiser Date: Mon, 10 Feb 2025 11:21:03 +0000 (+0100) Subject: Add and implement Weapon class X-Git-Url: https://git.dkaiser.de/?a=commitdiff_plain;h=4b927759598b01c486063d09551303a936752956;p=42%2Fcpp01.git Add and implement Weapon class --- diff --git a/ex03/Weapon.cpp b/ex03/Weapon.cpp index 42bb132..e9dde06 100644 --- a/ex03/Weapon.cpp +++ b/ex03/Weapon.cpp @@ -6,7 +6,21 @@ /* By: dkaiser type; +} + +void Weapon::setType(const std::string &type) +{ + this->type = type; +} diff --git a/ex03/Weapon.hpp b/ex03/Weapon.hpp index ee8c299..917b367 100644 --- a/ex03/Weapon.hpp +++ b/ex03/Weapon.hpp @@ -6,11 +6,23 @@ /* By: dkaiser + +class Weapon +{ + public: + Weapon(void); + const std::string& getType(void) const; + void setType(const std::string &type); + private: + std::string type; +}; + #endif