diff --git a/source/utils.cpp b/source/utils.cpp index 25b3678..17f63f6 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -34,7 +34,7 @@ Move parseMove(Board &board, std::string_view str) { // Promotion if (str.length() > 4) { - if (board.GetPieceColor(from) != board.GetPieceColor(to)) { + if (board.occupied.IsSet(to)) { switch(str[4]) { case 'r': flag = rookPromoCapture;