d03 ex01 refondus avec meilleurs gestion de la classe de base

This commit is contained in:
Hugo LAMY
2022-02-21 15:45:38 +01:00
parent 8918b348e0
commit 7a9435b869
16 changed files with 683 additions and 73 deletions

View File

@@ -0,0 +1,39 @@
#ifndef SCAVTRAP_HPP
# define SCAVTRAP_HPP
# include "ClapTrap.hpp"
# ifndef DEBUG
# define DEBUG 0
# endif
class ScavTrap : public ClapTrap
{
private:
// Attributes
bool _activeMode;
static std::string const _defaultName;
static unsigned int const _defaultHitPoints;
static unsigned int const _defaultEnergyPoints;
static unsigned int const _defaultAttackDamages;
public:
// Constructors
ScavTrap(std::string const &name = ScavTrap::_defaultName);
ScavTrap(ScavTrap const &src);
// Destructors
virtual ~ScavTrap(void);
// Member functions
virtual void attack(std::string const &target);
void guardGate(void);
// Operators
ScavTrap &operator=(ScavTrap const &rhs);
};
std::ostream &operator<<(std::ostream &o, ScavTrap const &rhs);
#endif