docs: Starting to add Doxygen comments
This commit is contained in:
parent
ca6468cc62
commit
8e381cf109
2 changed files with 75 additions and 5 deletions
28
Board.cpp
28
Board.cpp
|
|
@ -88,6 +88,22 @@ void Board::setupInitialPosition() {
|
|||
}
|
||||
return;
|
||||
}
|
||||
/**
|
||||
* Sets entire board to nullptr
|
||||
*/
|
||||
void Board::clearBoard() {
|
||||
for(int i = 0; i < 8; i++) {
|
||||
for(int j = 0; j < 8; j++) {
|
||||
boardGrid[i][j] = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes a FEN string and creates a board to that spec
|
||||
* @param strFEN A full FEN string
|
||||
* @return Returns -1 on failure, 0 on success
|
||||
*/
|
||||
|
||||
int Board::setupFromFEN(std::string strFEN) {
|
||||
std::vector<std::string> splitFEN = split(strFEN, ' ');
|
||||
|
|
@ -269,6 +285,18 @@ int Board::setupFromFEN(std::string strFEN) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void Board::nextTurn() {
|
||||
playerTurn = (playerTurn == PL_WHITE) ? PL_BLACK : PL_WHITE; // switch to other player's turn
|
||||
// do initial checks -- is their king in check? do they have any legal moves?
|
||||
// stalemate check - do we really need to call getLegalMoves() on every single Piece?
|
||||
}
|
||||
|
||||
/**
|
||||
* This function should only be called after you have confirmed the move is legal!
|
||||
* This will execute the move and assume you've already checked it.
|
||||
* @param from The Square on which the Piece is departing
|
||||
* @param to The Square to which the Piece is moving to
|
||||
*/
|
||||
void Board::movePiece(Square from, Square to) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue