-/// Position:pinned_pieces() returns a bitboard of all pinned (against the
-/// king) pieces for the given color.
-Bitboard Position::pinned_pieces(Color c) const {
-
- if (st->pinned[c] != ~EmptyBoardBB)
- return st->pinned[c];
-
- Bitboard p1, p2;
- Square ksq = king_square(c);
- st->pinned[c] = hidden_checks<ROOK, true>(c, ksq, p1) | hidden_checks<BISHOP, true>(c, ksq, p2);
- st->pinners[c] = p1 | p2;
- return st->pinned[c];
-}
-
-Bitboard Position::pinned_pieces(Color c, Bitboard& p) const {
-
- if (st->pinned[c] == ~EmptyBoardBB)
- pinned_pieces(c);
-
- p = st->pinners[c];
- return st->pinned[c];
-}
-
-Bitboard Position::discovered_check_candidates(Color c) const {
-
- if (st->dcCandidates[c] != ~EmptyBoardBB)
- return st->dcCandidates[c];
-
- Bitboard dummy;
- Square ksq = king_square(opposite_color(c));
- st->dcCandidates[c] = hidden_checks<ROOK, false>(c, ksq, dummy) | hidden_checks<BISHOP, false>(c, ksq, dummy);
- return st->dcCandidates[c];
-}
-