AMateria.cpp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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/26 01:09:08 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "AMateria.hpp"
  13. /*
  14. ** ------------------------------- CONSTRUCTOR --------------------------------
  15. */
  16. AMateria::AMateria() : _type("Punch")
  17. {
  18. }
  19. AMateria::AMateria(std::string const & type) : _type(type)
  20. {
  21. }
  22. AMateria::AMateria( const AMateria & src ) : _type(src._type)
  23. {
  24. }
  25. /*
  26. ** -------------------------------- DESTRUCTOR --------------------------------
  27. */
  28. AMateria::~AMateria()
  29. {
  30. }
  31. /*
  32. ** --------------------------------- OVERLOAD ---------------------------------
  33. */
  34. /*
  35. ** --------------------------------- METHODS ----------------------------------
  36. */
  37. void AMateria::use(ICharacter& target) {
  38. std::cout << "Use " << this->_type << " on " << target.getName() << "." << std::endl;
  39. }
  40. /*
  41. ** --------------------------------- ACCESSOR ---------------------------------
  42. */
  43. std::string const & AMateria::getType() const {
  44. return this->_type;
  45. }
  46. /* ************************************************************************** */