one implementation of the exam

This commit is contained in:
hugogogo
2022-12-01 15:47:19 +01:00
parent 16dcd06da6
commit c91d23a5d4
43 changed files with 925 additions and 0 deletions

38
cpp_module_01/ATarget.hpp Normal file
View File

@@ -0,0 +1,38 @@
#ifndef ATARGET_HPP
# define ATARGET_HPP
# include <iostream>
# include <string>
class ASpell;
class ATarget {
private:
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;
};
~ATarget() {};
std::string const & getType() const {return (this->type);};
void getHitBySpell(ASpell const & aspell) const;
virtual ATarget * clone() const = 0;
};
#include "ASpell.hpp"
#endif