diff --git a/src/Butin/PieceButin.cpp b/src/Butin/PieceButin.cpp index bccd638..98f2f39 100644 --- a/src/Butin/PieceButin.cpp +++ b/src/Butin/PieceButin.cpp @@ -18,6 +18,7 @@ std::string PieceButin::to_string(const enum Categorie cat) const { return "Noire"; default: + std::cerr << "Catégorie inconnue (PieceButin).\n"; exit(EXIT_FAILURE); } } diff --git a/src/Dames/Dames.cpp b/src/Dames/Dames.cpp index d2f00f7..0d1b7f8 100644 --- a/src/Dames/Dames.cpp +++ b/src/Dames/Dames.cpp @@ -55,6 +55,10 @@ bool Dames::prisePossible(Joueur &joueur) const { int y = 1; for (int i = 0; i < pieces.size(); i++) { PieceDames *p = dynamic_cast(pieces[i]); + if (!p) { + std::cerr << "Cette pièce est.. étrange.\n"; + exit(EXIT_FAILURE); + } if (p->getDame()) { // if(plateau[x][y] == nullptr) } diff --git a/src/Dames/PieceDames.cpp b/src/Dames/PieceDames.cpp index 24ffd86..1b84825 100644 --- a/src/Dames/PieceDames.cpp +++ b/src/Dames/PieceDames.cpp @@ -23,6 +23,7 @@ std::string PieceDames::to_string(const enum Categorie cat) const { return "Noire"; default: + std::cerr << "Catégorie inconnue (PieceDames).\n"; exit(EXIT_FAILURE); } } diff --git a/src/Safari/PieceSafari.cpp b/src/Safari/PieceSafari.cpp index 7a9af78..07240fc 100644 --- a/src/Safari/PieceSafari.cpp +++ b/src/Safari/PieceSafari.cpp @@ -18,6 +18,7 @@ std::string PieceSafari::to_string(const enum Categorie cat) const { return "Lion"; default: + std::cerr << "Catégorie inconnue (PieceSafari).\n"; exit(EXIT_FAILURE); } }