Files
42_SIDE_exam_05_cpp/cpp_module_01/ATarget.hpp
2022-12-12 22:34:11 +01:00

48 lines
610 B
C++

#ifndef ATARGET_HPP
#define ATARGET_HPP
#include <iostream>
#include <string>
class ASpell;
class ATarget
{
protected:
std::string type;
public:
ATarget()
{}
ATarget(ATarget const & other)
{
* this = other;
}
ATarget & operator=(ATarget const & other)
{
this->type = other.type;
return *this;
}
ATarget(std::string const & type)
{
this->type = type;
}
virtual ~ATarget()
{}
std::string const & getType() const
{
return this->type;
}
void getHitBySpell(ASpell const &) const;
virtual ATarget * clone() const = 0;
};
#include "ASpell.hpp"
#endif