prisePossible....
This commit is contained in:
parent
006857b8bc
commit
81a72676b5
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Reference in a new issue