/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ClapTrap.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/23 10:54:07 by narnaud #+# #+# */ /* Updated: 2022/07/19 02:49:28 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #pragma once #include #include using std::cout; using std::endl; class ClapTrap { public: static ClapTrap *registery[128]; static int amount; ClapTrap (void); ClapTrap (std::string name); ClapTrap (ClapTrap const & src); virtual ~ClapTrap (void); ClapTrap & operator= (ClapTrap const & src); virtual void attack(const std::string& target); void takeDamage(unsigned int amount); void beRepaired(unsigned int amount); std::string getName(void) const; static ClapTrap *getClapTrap(std::string name); protected: std::string _name; unsigned int _health; unsigned int _energy; unsigned int _attack; unsigned int _id; };