31 lines
717 B
C++
31 lines
717 B
C++
#include "../../includes/Safari/PieceSafari.hpp"
|
|
|
|
PieceSafari::PieceSafari(const enum Categorie cat, const int posX,
|
|
const int posY)
|
|
: Piece(to_string(cat), posX, posY) {
|
|
std::cout << "pièce - " << categorie << "\n";
|
|
}
|
|
|
|
PieceSafari::~PieceSafari() {}
|
|
|
|
std::string PieceSafari::to_string(const enum Categorie cat) const {
|
|
switch (cat) {
|
|
case Barriere:
|
|
return "Barrière";
|
|
case Elephant:
|
|
return "Éléphant";
|
|
case Rhinoceros:
|
|
return "Rhinocéros";
|
|
case Lion:
|
|
return "Lion";
|
|
|
|
default:
|
|
std::cerr << "Catégorie inconnue (PieceSafari).\n";
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
}
|
|
|
|
sf::Color PieceSafari::getScreenColor() const {
|
|
// TODO
|
|
return sf::Color::White;
|
|
}
|