The getColumn() and getRow() functions

The final section of code contains functions to get the row and column of the piece:

int Piece::getColumn() const {
return column_;
}

int Piece::getRow() const {
return row_;
}

These functions simply return the value of the private column_ or row_ variable. Now that you have a better understanding of the Piece class, let's move on to the Board.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset