diff --git a/src/position.h b/src/position.h index a7654aa1..d470ef90 100644 --- a/src/position.h +++ b/src/position.h @@ -128,7 +128,6 @@ public: bool capture(Move m) const; bool capture_or_promotion(Move m) const; bool gives_check(Move m) const; - bool advanced_pawn_push(Move m) const; Piece moved_piece(Move m) const; Piece captured_piece() const; @@ -310,11 +309,6 @@ inline bool Position::pawn_passed(Color c, Square s) const { return !(pieces(~c, PAWN) & passed_pawn_span(c, s)); } -inline bool Position::advanced_pawn_push(Move m) const { - return type_of(moved_piece(m)) == PAWN - && relative_rank(sideToMove, to_sq(m)) > RANK_6; -} - inline int Position::pawns_on_same_color_squares(Color c, Square s) const { return popcount(pieces(c, PAWN) & ((DarkSquares & s) ? DarkSquares : ~DarkSquares)); } diff --git a/src/search.cpp b/src/search.cpp index fa592a85..af7f801f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1579,7 +1579,7 @@ moves_loop: // When in check, search starts from here if ( bestValue > VALUE_TB_LOSS_IN_MAX_PLY && !givesCheck && futilityBase > -VALUE_KNOWN_WIN - && !pos.advanced_pawn_push(move)) + && type_of(move) != PROMOTION) { if (moveCount > 2)