|
@@ -32,10 +32,10 @@ CheckerBoard CheckerBoard::loadFromFile(string filename)
|
|
|
{
|
|
|
// If the checker position starts with M (which marks a king), skip the first character of the position and create a king
|
|
|
if (line[0] == 'M')
|
|
|
- board.placeChecker(CheckerPosition(line.substr(1, 2)), color == WHITE ? CheckerPiece::WHITE_KING : CheckerPiece::BLACK_KING);
|
|
|
+ board.setCheckerAt(CheckerPosition(line.substr(1, 2)), color == WHITE ? CheckerPiece::WHITE_KING : CheckerPiece::BLACK_KING);
|
|
|
// otherwise, use full position string and create a regular checker
|
|
|
else
|
|
|
- board.placeChecker(CheckerPosition(line), color == WHITE ? CheckerPiece::WHITE : CheckerPiece::BLACK);
|
|
|
+ board.setCheckerAt(CheckerPosition(line), color == WHITE ? CheckerPiece::WHITE : CheckerPiece::BLACK);
|
|
|
}
|
|
|
}
|
|
|
file.close();
|