AMateria.cpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* AMateria.cpp :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2025/12/18 19:23:39 by bchanot #+# #+# */
  9. /* Updated: 2025/12/19 15:29:23 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "AMateria.hpp"
  13. /*
  14. ** ------------------------------- CONSTRUCTOR --------------------------------
  15. */
  16. AMateria::AMateria() : _type("Punch")
  17. {
  18. std::cout << this->_type << " AMateria constructed" << std::endl;
  19. }
  20. AMateria::AMateria(std::string const & type) : _type(type)
  21. {
  22. std::cout << this->_type << " AMateria constructed" << std::endl;
  23. }
  24. AMateria::AMateria( const AMateria & src ) : _type(src._type)
  25. {
  26. std::cout << this->_type << " AMateria constructed" << std::endl;
  27. }
  28. /*
  29. ** -------------------------------- DESTRUCTOR --------------------------------
  30. */
  31. AMateria::~AMateria()
  32. {
  33. std::cout << this->_type << "AMateria destroyed" << std::endl;
  34. }
  35. /*
  36. ** --------------------------------- OVERLOAD ---------------------------------
  37. */
  38. /*
  39. ** --------------------------------- METHODS ----------------------------------
  40. */
  41. void AMateria::use(ICharacter& target) {
  42. std::cout << this->_type << " In tour face ! Or mine ? Should i use on mine ... ?" << std::endl;
  43. }
  44. /*
  45. ** --------------------------------- ACCESSOR ---------------------------------
  46. */
  47. std::string const & AMateria::getType() const {
  48. return this->_type;
  49. }
  50. /* ************************************************************************** */