1
0
This repository has been archived on 2025-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
CPP_Module_03/ex00/ClapTrap.hpp

48 lines
1.5 KiB
C++
Raw Normal View History

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ClapTrap.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/20 14:08:19 by adjoly #+# #+# */
/* Updated: 2024/11/25 15:51:49 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#pragma once
# include <string>
typedef unsigned int uint;
class ClapTrap {
private:
std::string _name;
uint _health;
uint _energyPoints;
uint _attackDamage;
public:
ClapTrap(void);
ClapTrap(std::string);
ClapTrap(const ClapTrap &);
~ClapTrap(void);
ClapTrap &operator=(const ClapTrap &);
void attack(const std::string& target);
void takeDamage(uint amount);
void beRepaired(uint amount);
uint getAttackDamage(void) const;
uint getEnergyPoints(void) const;
uint getHealth(void) const;
std::string getName(void) const;
void setAttackDamage(uint);
void setEnergyPoints(uint);
void setHealth(uint);
void setName(std::string);
};