Character.hpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* Character.hpp :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2025/12/19 16:40:56 by bchanot #+# #+# */
  9. /* Updated: 2025/12/19 16:48:33 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #ifndef CHARACTER_HPP
  13. # define CHARACTER_HPP
  14. # include <iostream>
  15. # include <string>
  16. #include "ICharacter.hpp"
  17. class Character : public ICharacter
  18. {
  19. public:
  20. Character();
  21. Character( Character const & src );
  22. Character( std::string const &name );
  23. ~Character();
  24. Character & operator=( Character const & rhs );
  25. virtual std::string const & getName() const;
  26. virtual void equip(AMateria* m);
  27. virtual void unequip(int idx);
  28. virtual void use(int idx, ICharacter& target);
  29. private:
  30. std::string const & _name;
  31. AMateria *_items[4];
  32. };
  33. std::ostream & operator<<( std::ostream & o, Character const & i );
  34. #endif /* ******************************************************* CHARACTER_H */