d03 ex03 introduction template pour main

This commit is contained in:
Hugo LAMY
2022-02-19 10:03:39 +01:00
parent a2bd7db6a9
commit 817fac957b
10 changed files with 476 additions and 0 deletions

30
d03/ex03/FragTrap.cpp Normal file
View File

@@ -0,0 +1,30 @@
#include "FragTrap.hpp"
FragTrap::FragTrap( std::string name ) : ClapTrap(name) {
_class = "FragTrap";
_hit = 100;
_energy = 100;
_attack = 30;
std::cout << _class << " " << FragTrap::_name << " created with number " << _number << "\n";
return;
}
/*
* destructor
*/
FragTrap::~FragTrap( void ) {
std::cout << _class << " " << FragTrap::_name << " destructed\n";
return;
}
/*
* special capacity
*/
void FragTrap::highFivesGuys() {
std::cout << _class << " " << FragTrap::_name << " wait for a high fives, common guys\n";
}