From efea8712aaf8169b1184cceb83705ca6b8783173 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 14 Apr 2020 18:02:14 +0200 Subject: cpp04, ex03 not finished, require more sophisticated main --- cpp04/ex03/Character.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 cpp04/ex03/Character.hpp (limited to 'cpp04/ex03/Character.hpp') 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 +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* 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 -- cgit