mirror of
https://github.com/Ladebeze66/cpp-partie-1.git
synced 2025-12-16 14:08:04 +01:00
55 lines
1.8 KiB
C++
55 lines
1.8 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ClapTrap.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/12/30 13:53:03 by fgras-ca #+# #+# */
|
|
/* Updated: 2023/12/30 22:24:32 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef CLAPTRAP_HPP
|
|
#define CLAPTRAP_HPP
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
|
|
#define RESET "\033[0m"
|
|
#define BLACK "\033[30m"
|
|
#define RED "\033[31m"
|
|
#define GREEN "\033[32m"
|
|
#define YELLOW "\033[33m"
|
|
#define BLUE "\033[34m"
|
|
#define MAGENTA "\033[35m"
|
|
#define CYAN "\033[36m"
|
|
#define WHITE "\033[37m"
|
|
|
|
class ClapTrap
|
|
{
|
|
protected:
|
|
std::string Name;
|
|
unsigned int HitPoints;
|
|
unsigned int EnergyPoints;
|
|
unsigned int AttackDamage;
|
|
|
|
public:
|
|
ClapTrap();
|
|
ClapTrap(std::string name);
|
|
ClapTrap(const ClapTrap ©);
|
|
ClapTrap & operator = (const ClapTrap &operator_aff);
|
|
~ClapTrap();
|
|
|
|
void attack(const std::string& target);
|
|
void takeDamage(unsigned int amount);
|
|
void beRepaired(unsigned int amount);
|
|
|
|
std::string getName() const;
|
|
unsigned int getHitPoints() const;
|
|
unsigned int getEnergyPoints() const;
|
|
unsigned int getAttackDamage() const;
|
|
void printStats() const;
|
|
};
|
|
|
|
#endif |