summaryrefslogtreecommitdiff
path: root/src/see.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/see.c')
-rwxr-xr-xsrc/see.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/see.c b/src/see.c
index 4b534bb..4ba62ad 100755
--- a/src/see.c
+++ b/src/see.c
@@ -201,7 +201,13 @@ Return value:
COOR_TO_BB(pos->cNonPawns[BLACK][0]));
}
-static BITBOARD
+// Non-static (unlike its historical file-local status) so
+// generate.c's Part B (_GenerateEscapes) bitboard work can call it
+// directly for king-flight safety testing, passing an occupancy
+// bitboard with the king itself removed to correctly account for
+// x-ray/discovered attacks when the king steps out of a slider's way
+// -- see board_representation/MOVEGEN_MIGRATION.md section 6a.
+BITBOARD
_WhoAttacksSquareBB(IN POSITION *pos,
IN COOR cSquare,
IN ULONG uSide,