You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
#include "indien.hpp"
|
|
#include "dame.hpp"
|
|
#include "brigand.hpp"
|
|
#include "cowboy.hpp"
|
|
|
|
using namespace std;
|
|
|
|
namespace personnage {
|
|
|
|
Indien::Indien(const string &nom, const string &boisson, const int nbPlumes, const string &totem)
|
|
:Humain(nom, boisson), nbPlumes{nbPlumes}, totem{totem}
|
|
{}
|
|
|
|
string Indien::getNom() const {
|
|
return Humain::getNom();
|
|
}
|
|
|
|
void Indien::parler(const string &texte) const {
|
|
Humain::parler(texte + " Ugh !");
|
|
}
|
|
|
|
void Indien::sePresenter() const {
|
|
this->parler("Oyh, moi être " + this->getNom() + " et aimer " + this->getBoisson() + ".");
|
|
this->parler("Moi vénérer totem " + this->totem + ". Moi guerrier. Moi avoir " + to_string(this->nbPlumes) + " plumes.");
|
|
}
|
|
|
|
void Indien::scalper(Dame &dame) {
|
|
dame.seFaireScalper(*this);
|
|
nbPlumes += 1;
|
|
}
|
|
|
|
void Indien::scalper(Brigand &brigand) {
|
|
brigand.seFaireScalper(*this);
|
|
nbPlumes += 1;
|
|
}
|
|
|
|
void Indien::scalper(Cowboy &cowboy) {
|
|
cowboy.seFaireScalper(*this);
|
|
nbPlumes+= 1;
|
|
}
|
|
|
|
} |