-/// Position::update_checkers() updates checkers info, used in do_move()
-template<PieceType Piece>
-inline void Position::update_checkers(Bitboard* pCheckersBB, Square ksq, Square from,
- Square to, Bitboard dcCandidates) {
-
- if (Piece != KING && bit_is_set(piece_attacks<Piece>(ksq), to))
- set_bit(pCheckersBB, to);
-
- if (Piece != QUEEN && bit_is_set(dcCandidates, from))
- {
- if (Piece != ROOK)
- (*pCheckersBB) |= (piece_attacks<ROOK>(ksq) & rooks_and_queens(side_to_move()));
-
- if (Piece != BISHOP)
- (*pCheckersBB) |= (piece_attacks<BISHOP>(ksq) & bishops_and_queens(side_to_move()));
- }
-}
-
-
-/// Position:pinned_pieces() returns a bitboard of all pinned (against the
-/// king) pieces for the given color.
-Bitboard Position::pinned_pieces(Color c) const {
-
- Square ksq = king_square(c);
- return hidden_checks<ROOK, true>(c, ksq) | hidden_checks<BISHOP, true>(c, ksq);
-}
-
-
-/// Position:discovered_check_candidates() returns a bitboard containing all
-/// pieces for the given side which are candidates for giving a discovered
-/// check. The code is almost the same as the function for finding pinned
-/// pieces.
-
-Bitboard Position::discovered_check_candidates(Color c) const {
-
- Square ksq = king_square(opposite_color(c));
- return hidden_checks<ROOK, false>(c, ksq) | hidden_checks<BISHOP, false>(c, ksq);
-}
-
-