diff --git a/includes/Safari/PlateauSafari.hpp b/includes/Safari/PlateauSafari.hpp index aae3e8d..06d82b9 100644 --- a/includes/Safari/PlateauSafari.hpp +++ b/includes/Safari/PlateauSafari.hpp @@ -12,7 +12,7 @@ struct PlateauSafari : public Plateau { // Pareil que deplacementValide mais est utilisable avec des coordonnées bool deplacementValideCoor(const int x1, const int y1, const int x2, - const int y2, const bool debug = false) const; + const int y2) const; // Vérifie que le déplacement est valide bool deplacementValide(const int destX, const int destY) const; diff --git a/src/Safari/PlateauSafari.cpp b/src/Safari/PlateauSafari.cpp index a032d5e..742fc9f 100644 --- a/src/Safari/PlateauSafari.cpp +++ b/src/Safari/PlateauSafari.cpp @@ -149,8 +149,7 @@ void PlateauSafari::afficherPlateau(std::ostream &out, const bool d) const { } bool PlateauSafari::deplacementValideCoor(const int x1, const int y1, - const int x2, const int y2, - const bool d) const { + const int x2, const int y2) const { // Vérifier qu'il n'y a pas de barrière sur le chemin for (PieceSafari *barriere : barrieres) { Position pos1 = barriere->getPos(); @@ -200,13 +199,6 @@ bool PlateauSafari::deplacementValideCoor(const int x1, const int y1, y1 > std::min(pos1.second, pos2.second) && y2 <= std::min(pos1.second, pos2.second); - if (d) { // debug - std::cout << std::boolalpha << "barriere " << pos1.first << "," - << pos1.second << " | " << pos2.first << "," << pos2.second - << " et pieces " << x1 << "," << y1 << " | " << x2 << "," << y2 - << " => " << gvd << " " << dvg << " " << hvb << " " << bvh - << std::endl; - } if (gvd || dvg || hvb || bvh) { return false; } @@ -222,8 +214,7 @@ bool PlateauSafari::deplacementValide(const int x, const int y) const { Position posInitiale = selection->getPos(); - return deplacementValideCoor(posInitiale.first, posInitiale.second, x, y, - true); + return deplacementValideCoor(posInitiale.first, posInitiale.second, x, y); } Position PlateauSafari::getPlaceholderBarriere() const {