Bitboard checkers() const;
Bitboard blockers_for_king(Color c) const;
Bitboard check_squares(PieceType pt) const;
+ Bitboard pinners(Color c) const;
bool is_discovery_check_on_king(Color c, Move m) const;
// Attacks to/from a given square
// Used by NNUE
StateInfo* state() const;
- const EvalList* eval_list() const;
private:
// Initialization helpers (used while setting up a position)
template<bool Do>
void do_castling(Color us, Square from, Square& to, Square& rfrom, Square& rto);
- // ID of a piece on a given square
- PieceId piece_id_on(Square sq) const;
-
// Data members
Piece board[SQUARE_NB];
Bitboard byTypeBB[PIECE_TYPE_NB];
Thread* thisThread;
StateInfo* st;
bool chess960;
-
- // List of pieces used in NNUE evaluation function
- EvalList evalList;
};
namespace PSQT {
return st->blockersForKing[c];
}
+inline Bitboard Position::pinners(Color c) const {
+ return st->pinners[c];
+}
+
inline Bitboard Position::check_squares(PieceType pt) const {
return st->checkSquares[pt];
}
return st;
}
-inline const EvalList* Position::eval_list() const {
-
- return &evalList;
-}
-
-inline PieceId Position::piece_id_on(Square sq) const
-{
-
- assert(piece_on(sq) != NO_PIECE);
-
- PieceId pid = evalList.piece_id_list[sq];
- assert(is_ok(pid));
-
- return pid;
-}
-
#endif // #ifndef POSITION_H_INCLUDED