feat: finishing the exercice 01 of the module 03
This commit is contained in:
parent
5a33a3c5b7
commit
4971decf2d
5 changed files with 231 additions and 0 deletions
34
cpp03/ex00/ClapTrap.hpp
Normal file
34
cpp03/ex00/ClapTrap.hpp
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ClapTrap.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/01/10 14:54:21 by rparodi #+# #+# */
|
||||
/* Updated: 2025/01/10 15:52:10 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef CLAPTRAP_HPP
|
||||
#define CLAPTRAP_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
class ClapTrap {
|
||||
public:
|
||||
ClapTrap(std::string name);
|
||||
~ClapTrap();
|
||||
void attack(const std::string& target);
|
||||
void takeDamage(unsigned int amount);
|
||||
void beRepaired(unsigned int amount);
|
||||
private:
|
||||
ClapTrap();
|
||||
std::string _name;
|
||||
int _hit_point;
|
||||
int _energy_point;
|
||||
int _attack_damage;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue