April 2018
Beginner
714 pages
18h 21m
English
To test the implementation, you can modify the algorithm to fill the board with the default piece set up by introducing the following change to the ChessAlgorithm class:
void ChessAlgorithm::newGame()
{
setupBoard();
board()->setFen(
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
);
}
Running the program should show the following result:

The modification we did in this step was very simple. First, we provided a way to tell the board what each piece type looks like. This includes not only standard chess pieces but anything that fits into char and can be set inside the ChessBoard class's internal data array. ...
Read now
Unlock full access