diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-04-13 18:44:40 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-04-13 18:44:40 +0200 |
| commit | 119f7f96e77a2d86d692e82645dde4c2dc054052 (patch) | |
| tree | 73c863970a5d0ac8a3c77f9bf96e5aaf2c4c66c8 /cpp03/ex00/FragTrap.hpp | |
| parent | 3d48ed0312f9c0ae691560d7cd688f46917e3fd4 (diff) | |
| download | piscine_cpp-119f7f96e77a2d86d692e82645dde4c2dc054052.tar.gz piscine_cpp-119f7f96e77a2d86d692e82645dde4c2dc054052.tar.bz2 piscine_cpp-119f7f96e77a2d86d692e82645dde4c2dc054052.zip | |
cpp03, except ex04
Diffstat (limited to 'cpp03/ex00/FragTrap.hpp')
| -rw-r--r-- | cpp03/ex00/FragTrap.hpp | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/cpp03/ex00/FragTrap.hpp b/cpp03/ex00/FragTrap.hpp index 200b412..423116d 100644 --- a/cpp03/ex00/FragTrap.hpp +++ b/cpp03/ex00/FragTrap.hpp @@ -6,38 +6,42 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/02/22 05:17:16 by cacharle #+# #+# */ -/* Updated: 2020/02/22 05:40:56 by cacharle ### ########.fr */ +/* Updated: 2020/04/13 15:17:02 by charles ### ########.fr */ /* */ /* ************************************************************************** */ -#ifndef FRAGTRAP_CPP -# define FRAGTRAP_CPP +#ifndef FRAGTRAP_HPP +# define FRAGTRAP_HPP +# include <cstdlib> +# include <iostream> # include <string> class FragTrap { +public: FragTrap(); - FragTrap(FragTrap const & other); - FragTrap operator=(FragTrap const & other); + FragTrap(std::string name); + FragTrap(FragTrap const& other); + void operator=(FragTrap const& other); ~FragTrap(); - rangedAttack(std::string const & target); - meleeAttack(std::string const & target); - takeDamage(unsigned int amount); - beRepaired(unsigned int amount); - vaulthunter_dot_exe(std::string const & target); + void rangedAttack(std::string const& target) const; + void meleeAttack(std::string const& target) const; + void takeDamage(unsigned int amount); + void beRepaired(unsigned int amount); + void vaulthunter_dot_exe(std::string const& target); - protected: - std::string name; - int hitPoints; - int maxHitPoints; - int energyPoints; - int maxEnergyPoints; - int level; - int meleeAttackDamage; - int rangedAttackDamage; - int armorDamageReduction; +private: + unsigned int m_hitPoints; + unsigned int m_maxHitPoints; + unsigned int m_energyPoints; + unsigned int m_maxEnergyPoints; + unsigned int m_level; + std::string m_name; + unsigned int m_meleeAttackDamage; + unsigned int m_rangedAttackDamage; + unsigned int m_armorDamageReduction; }; #endif |
