diff --git a/Algo/tp/Cpp/4_tp_Antoine.zip b/Algo/tp/Cpp/4_tp_Antoine.zip deleted file mode 100644 index 6233cda..0000000 Binary files a/Algo/tp/Cpp/4_tp_Antoine.zip and /dev/null differ diff --git a/Algo/tp/Cpp/4_tp/Makefile b/Algo/tp/Cpp/4_tp_Antoine/Makefile similarity index 100% rename from Algo/tp/Cpp/4_tp/Makefile rename to Algo/tp/Cpp/4_tp_Antoine/Makefile diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/bin/exe b/Algo/tp/Cpp/4_tp_Antoine/bin/exe similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/bin/exe rename to Algo/tp/Cpp/4_tp_Antoine/bin/exe diff --git a/Algo/tp/Cpp/4_tp/src/ingredient.cpp b/Algo/tp/Cpp/4_tp_Antoine/src/ingredient.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/ingredient.cpp rename to Algo/tp/Cpp/4_tp_Antoine/src/ingredient.cpp diff --git a/Algo/tp/Cpp/4_tp/src/ingredient.hpp b/Algo/tp/Cpp/4_tp_Antoine/src/ingredient.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/ingredient.hpp rename to Algo/tp/Cpp/4_tp_Antoine/src/ingredient.hpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/livreRecettes.cpp b/Algo/tp/Cpp/4_tp_Antoine/src/livreRecettes.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/livreRecettes.cpp rename to Algo/tp/Cpp/4_tp_Antoine/src/livreRecettes.cpp diff --git a/Algo/tp/Cpp/4_tp/src/livreRecettes.hpp b/Algo/tp/Cpp/4_tp_Antoine/src/livreRecettes.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/livreRecettes.hpp rename to Algo/tp/Cpp/4_tp_Antoine/src/livreRecettes.hpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/main.cpp b/Algo/tp/Cpp/4_tp_Antoine/src/main.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/main.cpp rename to Algo/tp/Cpp/4_tp_Antoine/src/main.cpp diff --git a/Algo/tp/Cpp/4_tp/src/quantite.cpp b/Algo/tp/Cpp/4_tp_Antoine/src/quantite.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/quantite.cpp rename to Algo/tp/Cpp/4_tp_Antoine/src/quantite.cpp diff --git a/Algo/tp/Cpp/4_tp/src/quantite.hpp b/Algo/tp/Cpp/4_tp_Antoine/src/quantite.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/quantite.hpp rename to Algo/tp/Cpp/4_tp_Antoine/src/quantite.hpp diff --git a/Algo/tp/Cpp/4_tp/src/recette.cpp b/Algo/tp/Cpp/4_tp_Antoine/src/recette.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/recette.cpp rename to Algo/tp/Cpp/4_tp_Antoine/src/recette.cpp diff --git a/Algo/tp/Cpp/4_tp/src/recette.hpp b/Algo/tp/Cpp/4_tp_Antoine/src/recette.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/recette.hpp rename to Algo/tp/Cpp/4_tp_Antoine/src/recette.hpp diff --git a/Algo/tp/Cpp/4_tp/src/recetteAffichage.cpp b/Algo/tp/Cpp/4_tp_Antoine/src/recetteAffichage.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/recetteAffichage.cpp rename to Algo/tp/Cpp/4_tp_Antoine/src/recetteAffichage.cpp diff --git a/Algo/tp/Cpp/4_tp/src/recetteAffichage.hpp b/Algo/tp/Cpp/4_tp_Antoine/src/recetteAffichage.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/recetteAffichage.hpp rename to Algo/tp/Cpp/4_tp_Antoine/src/recetteAffichage.hpp diff --git a/Algo/tp/Cpp/4_tp/src/unite.cpp b/Algo/tp/Cpp/4_tp_Antoine/src/unite.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/unite.cpp rename to Algo/tp/Cpp/4_tp_Antoine/src/unite.cpp diff --git a/Algo/tp/Cpp/4_tp/src/unite.hpp b/Algo/tp/Cpp/4_tp_Antoine/src/unite.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/unite.hpp rename to Algo/tp/Cpp/4_tp_Antoine/src/unite.hpp diff --git a/Algo/tp/Cpp/4_tp/tp5_recettes.pdf b/Algo/tp/Cpp/4_tp_Antoine/tp5_recettes.pdf similarity index 100% rename from Algo/tp/Cpp/4_tp/tp5_recettes.pdf rename to Algo/tp/Cpp/4_tp_Antoine/tp5_recettes.pdf diff --git a/Algo/tp/Cpp/5_tp_Antoine.zip b/Algo/tp/Cpp/5_tp_Antoine.zip deleted file mode 100644 index b458014..0000000 Binary files a/Algo/tp/Cpp/5_tp_Antoine.zip and /dev/null differ diff --git a/Algo/tp/Cpp/5_tp_Antoine/TPFarwestSuite.pdf b/Algo/tp/Cpp/5_tp_Antoine/TPFarwestSuite.pdf index 4b2accf..7ae61c7 100644 Binary files a/Algo/tp/Cpp/5_tp_Antoine/TPFarwestSuite.pdf and b/Algo/tp/Cpp/5_tp_Antoine/TPFarwestSuite.pdf differ diff --git a/Algo/tp/Cpp/5_tp_Antoine/bin/exe b/Algo/tp/Cpp/5_tp_Antoine/bin/exe index 7a04508..3c1b922 100755 Binary files a/Algo/tp/Cpp/5_tp_Antoine/bin/exe and b/Algo/tp/Cpp/5_tp_Antoine/bin/exe differ diff --git a/Algo/tp/Cpp/5_tp_Antoine/src/indien.cpp b/Algo/tp/Cpp/5_tp_Antoine/src/indien.cpp index 0d8c9e4..692be49 100644 --- a/Algo/tp/Cpp/5_tp_Antoine/src/indien.cpp +++ b/Algo/tp/Cpp/5_tp_Antoine/src/indien.cpp @@ -1,4 +1,7 @@ #include "indien.hpp" +#include "dame.hpp" +#include "brigand.hpp" +#include "cowboy.hpp" using namespace std; @@ -21,4 +24,19 @@ namespace personnage { 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; + } + } \ No newline at end of file diff --git a/Algo/tp/Cpp/5_tp_Antoine/src/indien.hpp b/Algo/tp/Cpp/5_tp_Antoine/src/indien.hpp index df3a297..7756141 100644 --- a/Algo/tp/Cpp/5_tp_Antoine/src/indien.hpp +++ b/Algo/tp/Cpp/5_tp_Antoine/src/indien.hpp @@ -6,6 +6,12 @@ namespace personnage { + class Dame; + + class Brigand; + + class Cowboy; + class Indien : public Humain { int nbPlumes; @@ -19,7 +25,9 @@ namespace personnage { void parler(const std::string &texte) const override; void sePresenter() const override; - + void scalper(Dame &dame); + void scalper(Brigand &brigand); + void scalper(Cowboy &cowboy); }; } diff --git a/Algo/tp/Cpp/5_tp_Antoine/src/main.cpp b/Algo/tp/Cpp/5_tp_Antoine/src/main.cpp index f9e53f0..edb112a 100644 --- a/Algo/tp/Cpp/5_tp_Antoine/src/main.cpp +++ b/Algo/tp/Cpp/5_tp_Antoine/src/main.cpp @@ -8,6 +8,7 @@ #include "femmeBrigand.hpp" #include "indien.hpp" +#include using namespace std; @@ -94,9 +95,13 @@ void testFemmeBrigand() { void testIndien() { personnage::Indien ventDoux{"VentDoux"}; personnage::Indien ventFort{"VentFort", "jus de pieds", 4, "Fouine"}; + personnage::Brigand robert("Robert"); ventDoux.sePresenter(); ventFort.sePresenter(); - ventFort.parler("Oeh ventDoux !"); + robert.sePresenter(); + ventFort.parler("Oeh ventDoux ! Scalpons robert !"); + ventFort.scalper(robert); + ventFort.sePresenter(); } void testGeneral1() { @@ -158,7 +163,64 @@ void testGeneral1() { } void testGeneral2() { - // vector + vector vHumain{ + new personnage::Dame("Rose"), + new personnage::Dame("Ginette", "ricard", "noir")} + // {personnage::Brigand robert = new robert("Robert")}, + // {personnage::Brigand bernard = new bernard("Bernard", "aveze", "ronchon", 200)}, + // {personnage::Cowboy george = new george("George")}, + // {personnage::Barmen franck = new franck("Franck", "The Franchy Bar")}, + // {personnage::Sherif clint = new clint("Clint")} + }; + for_each // personnage + for // cherche un sherif dans le vector puis un for qui Sherif emprisonner tt les brigands de vector + cout << "Il était une fois, une jeune et belle dame qui se promenait dans les bois avec une amie.\n"; + vector.at(0)->sePresenter(); + ginette.sePresenter(); + rose.parler("Qu'il fait beau aujourd'hui !!"); + cout << "Tout allait bien dans le meilleur des mondes, jusqu'à ce que deux brigands apparurent.\n"; + robert.sePresenter(); + bernard.sePresenter(); + robert.parler("Nous allons vous kidnapper pauvres dames !!"); + bernard.kidnapper(rose); + robert.kidnapper(ginette); + cout <<"Les pauvres Rose et Ginette se firent kidnapper par ses deux truans. Mais un vieux cowboy n'est pas loin\n"; + george.sePresenter(); + george.parler("Que faites vous bande de mal autrus !!!"); + george.tirerSur(robert); + george.tirerSur(bernard); + bernard.parler("Tu nous a loupé veillard !!"); + george.liberer(ginette); + robert.parler("À bientôt l'ancien !!"); + cout <<"Et les deux brigands pure s'en aller paisiblement car la vieux cowboy ne tiré plus tout droit.\n"; + cout <<"Surtout avec tout l'alcool qu'il s'était enpiffré. Mais il réussi quand même à liberer une des deux filles.\n"; + cout <<"Et notre cowboy retourna au bar pour se remettre de ses émotions.\n"; + george.parler("Hey Franck, un verre stp pour moi et cette dame !"); + franck.servirVerre(george); + franck.servirVerre(ginette); + franck.parler("Alors ces brigands ?!"); + george.parler("Ils se sont enfuit, j'ai plus la forme comme avant ! Mais j'ai réussi à liberer cette dame."); + cout <<"Pendant ce temps là, les brigands s'échappe toujours. Notre cowboy décide donc d'en informer le Shérif.\n"; + george.parler("Sherif !! J'ai deux brigands qui m'on échapés."); + clint.parler("Très bien george. Repose toi ! Je prends le relais"); + clint.rechercherBrigand(bernard); + clint.rechercherBrigand(robert); + cout <<"Cela s'annonce compliqué pour notre Shérif !!\n"; + clint.parler("Où on-t-il bien pu partir ???"); + pierre.sePresenter(); + pierre.parler("Sherif ! J'ai vu ces deux gangster avec une très jolie femme avec eux !"); + clint.parler("Et où ça ?"); + pierre.parler("Ils sont près de la gare !!!"); + clint.parler("En avant mon fidèle destrier pilepoil !!"); + cout <<"Notre Shérif entama donc son périple vers la gare avec son cheval pile-poil.\n"; + cout <<"Une fois arrivé, il se cacha et s'approcha discrètement de ses deux brigands avant de les intercepter.\n"; + clint.coffrerBrigand(robert); + clint.tirerSur(bernard); + clint.coffrerBrigand(bernard); + clint.liberer(rose); + rose.parler("Mais que vous êtes merveuilleux mon shérif !!"); + clint.parler("Pour vous servir Miss rose."); + cout <<"Nos deux personnage partir tout deux heureux.\n"; } @@ -172,7 +234,7 @@ int main() { // testSherif(); // testRipou(); // testFemmeBrigand(); - // testIndien(); + testIndien(); // testGeneral1(); return 0; } diff --git a/Algo/tp/Cpp/5_tp_Antoine/src/scalpable.cpp b/Algo/tp/Cpp/5_tp_Antoine/src/scalpable.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/Makefile b/Algo/tp/Cpp/Old4_tp/Makefile similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/Makefile rename to Algo/tp/Cpp/Old4_tp/Makefile diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/ingredient.cpp b/Algo/tp/Cpp/Old4_tp/src/ingredient.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/ingredient.cpp rename to Algo/tp/Cpp/Old4_tp/src/ingredient.cpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/ingredient.hpp b/Algo/tp/Cpp/Old4_tp/src/ingredient.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/ingredient.hpp rename to Algo/tp/Cpp/Old4_tp/src/ingredient.hpp diff --git a/Algo/tp/Cpp/4_tp/src/livreRecettes.cpp b/Algo/tp/Cpp/Old4_tp/src/livreRecettes.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/livreRecettes.cpp rename to Algo/tp/Cpp/Old4_tp/src/livreRecettes.cpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/livreRecettes.hpp b/Algo/tp/Cpp/Old4_tp/src/livreRecettes.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/livreRecettes.hpp rename to Algo/tp/Cpp/Old4_tp/src/livreRecettes.hpp diff --git a/Algo/tp/Cpp/4_tp/src/main.cpp b/Algo/tp/Cpp/Old4_tp/src/main.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp/src/main.cpp rename to Algo/tp/Cpp/Old4_tp/src/main.cpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/quantite.cpp b/Algo/tp/Cpp/Old4_tp/src/quantite.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/quantite.cpp rename to Algo/tp/Cpp/Old4_tp/src/quantite.cpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/quantite.hpp b/Algo/tp/Cpp/Old4_tp/src/quantite.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/quantite.hpp rename to Algo/tp/Cpp/Old4_tp/src/quantite.hpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/recette.cpp b/Algo/tp/Cpp/Old4_tp/src/recette.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/recette.cpp rename to Algo/tp/Cpp/Old4_tp/src/recette.cpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/recette.hpp b/Algo/tp/Cpp/Old4_tp/src/recette.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/recette.hpp rename to Algo/tp/Cpp/Old4_tp/src/recette.hpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/recetteAffichage.cpp b/Algo/tp/Cpp/Old4_tp/src/recetteAffichage.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/recetteAffichage.cpp rename to Algo/tp/Cpp/Old4_tp/src/recetteAffichage.cpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/recetteAffichage.hpp b/Algo/tp/Cpp/Old4_tp/src/recetteAffichage.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/recetteAffichage.hpp rename to Algo/tp/Cpp/Old4_tp/src/recetteAffichage.hpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/unite.cpp b/Algo/tp/Cpp/Old4_tp/src/unite.cpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/unite.cpp rename to Algo/tp/Cpp/Old4_tp/src/unite.cpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/src/unite.hpp b/Algo/tp/Cpp/Old4_tp/src/unite.hpp similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/src/unite.hpp rename to Algo/tp/Cpp/Old4_tp/src/unite.hpp diff --git a/Algo/tp/Cpp/4_tp_Antoine 2/tp5_recettes.pdf b/Algo/tp/Cpp/Old4_tp/tp5_recettes.pdf similarity index 100% rename from Algo/tp/Cpp/4_tp_Antoine 2/tp5_recettes.pdf rename to Algo/tp/Cpp/Old4_tp/tp5_recettes.pdf diff --git a/Algo/tp/Cpp/5_tp/Makefile b/Algo/tp/Cpp/Old5_tp/Makefile similarity index 100% rename from Algo/tp/Cpp/5_tp/Makefile rename to Algo/tp/Cpp/Old5_tp/Makefile diff --git a/Algo/tp/Cpp/5_tp/TPFarwest.pdf b/Algo/tp/Cpp/Old5_tp/TPFarwest.pdf similarity index 100% rename from Algo/tp/Cpp/5_tp/TPFarwest.pdf rename to Algo/tp/Cpp/Old5_tp/TPFarwest.pdf diff --git a/Algo/tp/Cpp/5_tp/src/barmen.cpp b/Algo/tp/Cpp/Old5_tp/src/barmen.cpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/barmen.cpp rename to Algo/tp/Cpp/Old5_tp/src/barmen.cpp diff --git a/Algo/tp/Cpp/5_tp/src/barmen.hpp b/Algo/tp/Cpp/Old5_tp/src/barmen.hpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/barmen.hpp rename to Algo/tp/Cpp/Old5_tp/src/barmen.hpp diff --git a/Algo/tp/Cpp/5_tp/src/brigand.cpp b/Algo/tp/Cpp/Old5_tp/src/brigand.cpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/brigand.cpp rename to Algo/tp/Cpp/Old5_tp/src/brigand.cpp diff --git a/Algo/tp/Cpp/5_tp/src/brigand.hpp b/Algo/tp/Cpp/Old5_tp/src/brigand.hpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/brigand.hpp rename to Algo/tp/Cpp/Old5_tp/src/brigand.hpp diff --git a/Algo/tp/Cpp/5_tp/src/cowboy.cpp b/Algo/tp/Cpp/Old5_tp/src/cowboy.cpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/cowboy.cpp rename to Algo/tp/Cpp/Old5_tp/src/cowboy.cpp diff --git a/Algo/tp/Cpp/5_tp/src/cowboy.hpp b/Algo/tp/Cpp/Old5_tp/src/cowboy.hpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/cowboy.hpp rename to Algo/tp/Cpp/Old5_tp/src/cowboy.hpp diff --git a/Algo/tp/Cpp/5_tp/src/dame.cpp b/Algo/tp/Cpp/Old5_tp/src/dame.cpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/dame.cpp rename to Algo/tp/Cpp/Old5_tp/src/dame.cpp diff --git a/Algo/tp/Cpp/5_tp/src/dame.hpp b/Algo/tp/Cpp/Old5_tp/src/dame.hpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/dame.hpp rename to Algo/tp/Cpp/Old5_tp/src/dame.hpp diff --git a/Algo/tp/Cpp/5_tp/src/humain.cpp b/Algo/tp/Cpp/Old5_tp/src/humain.cpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/humain.cpp rename to Algo/tp/Cpp/Old5_tp/src/humain.cpp diff --git a/Algo/tp/Cpp/5_tp/src/humain.hpp b/Algo/tp/Cpp/Old5_tp/src/humain.hpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/humain.hpp rename to Algo/tp/Cpp/Old5_tp/src/humain.hpp diff --git a/Algo/tp/Cpp/5_tp/src/main.cpp b/Algo/tp/Cpp/Old5_tp/src/main.cpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/main.cpp rename to Algo/tp/Cpp/Old5_tp/src/main.cpp diff --git a/Algo/tp/Cpp/5_tp/src/sherif.cpp b/Algo/tp/Cpp/Old5_tp/src/sherif.cpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/sherif.cpp rename to Algo/tp/Cpp/Old5_tp/src/sherif.cpp diff --git a/Algo/tp/Cpp/5_tp/src/sherif.hpp b/Algo/tp/Cpp/Old5_tp/src/sherif.hpp similarity index 100% rename from Algo/tp/Cpp/5_tp/src/sherif.hpp rename to Algo/tp/Cpp/Old5_tp/src/sherif.hpp diff --git a/PPP/s2/CV.pdf b/PPP/s2/CV.pdf new file mode 100644 index 0000000..d5ad0cd Binary files /dev/null and b/PPP/s2/CV.pdf differ diff --git a/PPP/s2/lettreMotivation.docx b/PPP/s2/lettreMotivation.docx new file mode 100644 index 0000000..a9a33a2 Binary files /dev/null and b/PPP/s2/lettreMotivation.docx differ