X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=935d86b205c82ee2ff3e2ab81ca3b5edaafc053e;hp=baf49705db7a6e00034a9ed9f561f267fda9b9cc;hb=6f3d78769257c9ef1678a35b0b7b48629e0aab1e;hpb=1d1b7df7c6b3496d1a3fe926cadf25d91e1558f6 diff --git a/src/position.h b/src/position.h index baf49705..935d86b2 100644 --- a/src/position.h +++ b/src/position.h @@ -171,6 +171,7 @@ private: // Initialization helpers (used while setting up a position) void clear(); void set_castling_right(Color c, Square rfrom); + void set_state(StateInfo* si) const; // Helper functions void do_castling(Square kfrom, Square kto, Square rfrom, Square rto); @@ -179,15 +180,6 @@ private: void remove_piece(Square s, Color c, PieceType pt); void move_piece(Square from, Square to, Color c, PieceType pt); - // Computing hash keys from scratch (for initialization and debugging) - Key compute_key() const; - Key compute_pawn_key() const; - Key compute_material_key() const; - - // Computing incremental evaluation scores and material counts - Score compute_psq_score() const; - Value compute_non_pawn_material(Color c) const; - // Board and pieces Piece board[SQUARE_NB]; Bitboard byTypeBB[PIECE_TYPE_NB]; @@ -292,7 +284,7 @@ inline Square Position::castling_rook_square(CastlingRight cr) const { template inline Bitboard Position::attacks_from(Square s) const { - return Pt == BISHOP || Pt == ROOK ? attacks_bb(s, pieces()) + return Pt == BISHOP || Pt == ROOK ? attacks_bb(s, byTypeBB[ALL_PIECES]) : Pt == QUEEN ? attacks_from(s) | attacks_from(s) : StepAttacksBB[Pt][s]; }