X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=6378d0ba2ff07a3ce608ab9a9b89c5976d02a607;hp=fd3eedbaacd6e52a88ecdc9f68d9243b01a9fd77;hb=b2edac7075ca238326378cb2c5ef09f7cdb2fd9e;hpb=0af24a14455bbcde181fff7632722ce55419991e diff --git a/src/position.h b/src/position.h index fd3eedba..6378d0ba 100644 --- a/src/position.h +++ b/src/position.h @@ -30,6 +30,13 @@ class Position; struct Thread; +namespace PSQT { + + extern Score psq[COLOR_NB][PIECE_TYPE_NB][SQUARE_NB]; + + void init(); +} + /// CheckInfo struct is initialized at c'tor time and keeps info used to detect /// if a move gives check. @@ -39,7 +46,7 @@ struct CheckInfo { Bitboard dcCandidates; Bitboard pinned; - Bitboard checkSq[PIECE_TYPE_NB]; + Bitboard checkSquares[PIECE_TYPE_NB]; Square ksq; }; @@ -134,12 +141,10 @@ public: // Piece specific bool pawn_passed(Color c, Square s) const; - bool pawn_on_7th(Color c) const; bool opposite_bishops() const; // Doing and undoing moves - void do_move(Move m, StateInfo& st); - void do_move(Move m, StateInfo& st, const CheckInfo& ci, bool givesCheck); + void do_move(Move m, StateInfo& st, bool givesCheck); void undo_move(Move m); void do_null_move(StateInfo& st); void undo_null_move(); @@ -360,10 +365,6 @@ inline bool Position::opposite_bishops() const { && opposite_colors(pieceList[WHITE][BISHOP][0], pieceList[BLACK][BISHOP][0]); } -inline bool Position::pawn_on_7th(Color c) const { - return pieces(c, PAWN) & rank_bb(relative_rank(c, RANK_7)); -} - inline bool Position::is_chess960() const { return chess960; }