get piece pos
This commit is contained in:
parent
551a644490
commit
57fa7bb120
2 changed files with 7 additions and 0 deletions
|
@ -34,4 +34,7 @@ public:
|
|||
|
||||
// Renvoie la couleur de la pièce pour l'affichage
|
||||
virtual sf::Color getScreenColor() const = 0;
|
||||
|
||||
// Renvoie la position de la pièce
|
||||
std::pair<int, int> getPos() const;
|
||||
};
|
||||
|
|
|
@ -31,3 +31,7 @@ void Piece::changeSelection() {
|
|||
bool Piece::isSelectionnee() const {
|
||||
return selected;
|
||||
}
|
||||
|
||||
std::pair<int, int> Piece::getPos() const {
|
||||
return std::make_pair(x, y);
|
||||
}
|
||||
|
|
Reference in a new issue