X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=64760d4da5d206f7efc4ac6535fb0b0266cf261a;hp=66a5942aedf19ae9042a0b4ec5fde6eef0cf71f1;hb=c0136fb7286416be2ec179b4787f53d77023eeaf;hpb=8dc4396477ca43c1e711920a4ca74a3b5c954003 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 66a5942a..64760d4d 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -795,7 +795,6 @@ namespace { { Square s = pop_1st_bit(&b); - assert(pos.piece_on(s) == piece_of_color_and_type(Us, PAWN)); assert(pos.pawn_is_passed(Us, s)); int r = int(relative_rank(Us, s) - RANK_2); @@ -820,9 +819,6 @@ namespace { squaresToQueen = squares_in_front_of(Us, s); defendedSquares = squaresToQueen & ei.attacked_by(Us); - // There are no enemy pawns in the pawn's path - assert(!(squaresToQueen & pos.pieces(PAWN, Them))); - // If there is an enemy rook or queen attacking the pawn from behind, // add all X-ray attacks by the rook or queen. Otherwise consider only // the squares in the pawn's path attacked or occupied by the enemy. @@ -900,6 +896,7 @@ namespace { Square s = pop_1st_bit(&b); Square queeningSquare = relative_square(c, make_square(square_file(s), RANK_8)); int d = square_distance(s, queeningSquare) + - (relative_rank(c, s) == RANK_2) // Double pawn push - square_distance(pos.king_square(opposite_color(c)), queeningSquare) + int(c != pos.side_to_move());