]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Tweak knight PSQT tables
[stockfish] / src / position.cpp
index 55a4c4a2fa0e0ca56ae6fe3832a2649698ad3963..325f3e4db6b2ce023eadef0e575e0245237ec0f3 100644 (file)
@@ -411,11 +411,14 @@ const string Position::pretty(Move move) const {
 }
 
 
-/// Position:hidden_checkers() returns a bitboard of all pinned / discovered check
-/// pieces, according to the call parameters. Pinned pieces protect our king and
-/// discovered check pieces attack the enemy king.
-
-Bitboard Position::hidden_checkers(Color c, Color kingColor) const {
+/// Position::check_blockers() returns a bitboard of all the pieces with color
+/// 'c' that are blocking check on the king with color 'kingColor'. A piece
+/// blocks a check if removing that piece from the board would result in a
+/// position where the king is in check. A check blocking piece can be either a
+/// pinned or a discovered check piece, according if its color 'c' is the same
+/// or the opposite of 'kingColor'.
+
+Bitboard Position::check_blockers(Color c, Color kingColor) const {
 
   Bitboard b, pinners, result = 0;
   Square ksq = king_square(kingColor);