aboutsummaryrefslogtreecommitdiff
path: root/cpp04/ex03/Character.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp04/ex03/Character.hpp')
-rw-r--r--cpp04/ex03/Character.hpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/cpp04/ex03/Character.hpp b/cpp04/ex03/Character.hpp
new file mode 100644
index 0000000..c6ffc7b
--- /dev/null
+++ b/cpp04/ex03/Character.hpp
@@ -0,0 +1,40 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* Character.hpp :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/04/14 16:44:43 by charles #+# #+# */
+/* Updated: 2020/04/14 17:31:49 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#ifndef CHARACTER_HPP
+# define CHARACTER_HPP
+
+# include "ICharacter.hpp"
+
+# define INVENTORY_MAX_SIZE 4
+
+class Character : public ICharacter
+{
+public:
+ Character();
+ Character(Character const& other);
+ void operator=(Character const& other);
+ virtual ~Character();
+
+ Character(std::string const& name);
+ virtual std::string const& getName() const;
+ virtual void equip(AMateria* m);
+ virtual void unequip(int idx);
+ virtual void use(int idx, ICharacter& target);
+
+private:
+ AMateria* m_inventory[INVENTORY_MAX_SIZE];
+ int m_inventory_size;
+ std::string m_name;
+};
+
+#endif