bugfix: epCapture on square a1 was possible

This commit is contained in:
rektdie committed 2024-04-10 10:13:52 +02:00
1 parent 1a25479a8c
commit d6574824fd
3 files changed
+16 -3

No files matched your search

+13
View File
@@ -32,6 +32,19 @@ void Perft(Board &board, int depth) {
totalNodes += nodeCount;
std::cout << squareCoords[board.moveList[i].MoveFrom()]
<< squareCoords[board.moveList[i].MoveTo()];
// Promotions
int flags = board.moveList[i].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';
}
std::cout << ": " << nodeCount << '\n';
}
auto finish = std::chrono::steady_clock::now();