prisePossible....

This commit is contained in:
Emma 2024-01-01 19:56:08 +01:00
parent 006857b8bc
commit 81a72676b5

View file

@ -55,11 +55,12 @@ bool Dames::prisePossible(Joueur &joueur) const {
int y = 1; int y = 1;
for (uint i = 0; i < pieces.size(); i++) { for (uint i = 0; i < pieces.size(); i++) {
const PieceDames *p = dynamic_cast<const PieceDames *>(pieces[i]); const PieceDames *p = dynamic_cast<const PieceDames *>(pieces[i]);
const std::pair<const int, const int> pos = p->getPos();
if (!p) { if (!p) {
throw std::runtime_error("Cette pièce est.. étrange."); throw std::runtime_error("Cette pièce est.. étrange.");
} }
if (p->getDame()) { if (!p->getDame()) {
// if(plateau[x][y] == nullptr) //if(plateau.getPiece(pos.first-1, pos.second) == nullptr)
} }
} }
return false; return false;