Update Algorithm explanation.txt

This commit is contained in:
Coding with Tom
2025-01-30 01:36:36 +00:00
committed by GitHub
parent 0c9195a5c1
commit 24c1bb97fe

View File

@@ -267,7 +267,7 @@ We create a pin array. The first index is the square being pinned. The second in
const int pinned_square = (DEBRUIJN64[MAGIC * (temp_pin_bitboard ^ (temp_pin_bitboard - 1)) >> 58]); //get the square
temp_pin_bitboard &= temp_pin_bitboard - 1; //remove one bit from bitboard
if (temp_pin_bitboard == 0) //if the bitboard is not empty then that piece was pinned.
if (temp_pin_bitboard == 0) //if the bitboard is now empty then that piece was pinned.
{
pinArray[pinNumber][PINNED_SQUARE_INDEX] = pinned_square; //add the pinned square
pinArray[pinNumber][PINNING_PIECE_INDEX] = piece_square; //add the pinning piece