/ CPP_Modules / CPP_Module_03 / ex03 / ClapTrap.hpp
ClapTrap.hpp
 1  /* ************************************************************************** */
 2  /*                                                                            */
 3  /*                                                        :::      ::::::::   */
 4  /*   ClapTrap.hpp                                       :+:      :+:    :+:   */
 5  /*                                                    +:+ +:+         +:+     */
 6  /*   By: gychoi <gychoi@student.42seoul.kr>         +#+  +:+       +#+        */
 7  /*                                                +#+#+#+#+#+   +#+           */
 8  /*   Created: 2023/08/07 17:49:25 by gychoi            #+#    #+#             */
 9  /*   Updated: 2023/08/12 20:37:52 by gychoi           ###   ########.fr       */
10  /*                                                                            */
11  /* ************************************************************************** */
12  
13  #pragma once
14  #ifndef __CLAPTRAP_HPP__
15  #define __CLAPTRAP_HPP__
16  
17  #include <string>
18  
19  class	ClapTrap
20  {
21  	protected:
22  		std::string const	name;
23  		int					_hit;
24  		unsigned int		_energy;
25  		unsigned int		_attack;
26  
27  	public:
28  		ClapTrap(void);
29  		ClapTrap(std::string const& name);
30  		ClapTrap(ClapTrap const& target);
31  		ClapTrap& operator=(ClapTrap const& target);
32  		virtual ~ClapTrap(void);
33  
34  		virtual std::string		getName(void) const;
35  		int						getHit(void) const;
36  		unsigned int			getEnergy(void) const;
37  		unsigned int			getAttack(void) const;
38  
39  		virtual void	attack(std::string const& target);
40  		void			takeDamage(unsigned int amount);
41  		void			beRepaired(unsigned int amount);
42  		virtual void	introduce(void);
43  };
44  
45  #endif	/* __CLAPTRAP_HPP__ */