From 537139f5d01c9d5db8bf7e1750833557f8f0081d Mon Sep 17 00:00:00 2001 From: rektdie Date: Mon, 10 Mar 2025 14:08:01 +0100 Subject: [PATCH] PrintMove prints promotion as well | bench 4118297 --- source/move.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/move.h b/source/move.h index 703b69e..e2ea3b2 100644 --- a/source/move.h +++ b/source/move.h @@ -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() {