mastring the simple heritage
This commit is contained in:
parent
245ac4c3a9
commit
d161579a2a
13 changed files with 376 additions and 4 deletions
35
cpp03/ex02/ClapTrap.hpp
Normal file
35
cpp03/ex02/ClapTrap.hpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ClapTrap.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/01/10 14:54:21 by rparodi #+# #+# */
|
||||
/* Updated: 2025/01/24 18:32:41 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef CLAPTRAP_HPP
|
||||
#define CLAPTRAP_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
class ClapTrap {
|
||||
public:
|
||||
ClapTrap();
|
||||
ClapTrap(std::string name);
|
||||
~ClapTrap();
|
||||
void attack(const std::string& target);
|
||||
void takeDamage(unsigned int amount);
|
||||
void beRepaired(unsigned int amount);
|
||||
protected:
|
||||
std::string _name;
|
||||
int _hit_point;
|
||||
int _energy_point;
|
||||
int _attack_damage;
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue