petites transformations sur les makefiles

This commit is contained in:
hugogogo
2022-02-27 22:07:04 +01:00
parent c056db80b7
commit 8f6c8259c8
15 changed files with 351 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#ifndef AMATERIA_HPP
# define AMATERIA_HPP
# include <iostream>
#include "ICharacter.hpp"
class AMateria {
public:
AMateria(std::string const & type);
virtual ~AMateria();
std::string const & getType() const; //Returns the materia type
virtual AMateria* clone() const = 0;
virtual void use(ICharacter& target);
protected:
std::string _type;
};
#endif

View File

@@ -0,0 +1,18 @@
#ifndef CHARACTER_HPP
# define CHARACTER_HPP
#include "ICharacter.hpp"
class Character : public ICharacter {
public:
Character();
Character( Character const & src );
~Character();
Character & operator=( Character const & rhs );
private:
};
#endif

19
d04/ex03/headers/Cure.hpp Normal file
View File

@@ -0,0 +1,19 @@
#ifndef CURE_HPP
# define CURE_HPP
#include "AMateria.hpp"
class Cure : public AMateria {
public:
Cure();
Cure( Cure const & src );
~Cure();
Cure & operator=( Cure const & rhs );
private:
};
#endif

View File

@@ -0,0 +1,15 @@
#ifndef ICE_HPP
# define ICE_HPP
class ICharacter {
public:
virtual ~ICharacter() {}
virtual std::string const & getName() const = 0;
virtual void equip(AMateria* m) = 0;
virtual void unequip(int idx) = 0;
virtual void use(int idx, ICharacter& target) = 0;
};
#endif

18
d04/ex03/headers/Ice.hpp Normal file
View File

@@ -0,0 +1,18 @@
#ifndef ICE_HPP
# define ICE_HPP
#include "AMateria.hpp"
class Ice : public AMateria {
public:
Ice();
Ice( Ice const & src );
~Ice();
Ice & operator=( Ice const & rhs );
private:
};
#endif