PrintMove prints promotion as well | bench 4118297

This commit is contained in:
rektdie committed 2025-03-10 14:08:01 +01:00
1 parent 30aaea5e03
commit 537139f5d0
1 file changed
+12
+12
View File
@@ -56,6 +56,18 @@ public:
void PrintMove() {
std::cout << squareCoords[MoveFrom()] << squareCoords[MoveTo()];
int flags = GetFlags();
if (flags == knightPromotion || flags == knightPromoCapture) {
std::cout << 'n';
} else if (flags == bishopPromotion || flags == bishopPromoCapture) {
std::cout << 'b';
} else if (flags == rookPromotion || flags == rookPromoCapture) {
std::cout << 'r';
} else if (flags == queenPromotion || flags == queenPromoCapture) {
std::cout << 'q';
}
}
operator uint16_t() {