mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-27 12:36:15 +08:00
Account for double pawn push in evaluate_unstoppable_pawns()
One of the most nitpicking patches I have ever seen. Of course almost no functional change, but added just becasue we are very pedantic ;-) Spotted by Marek Kwiatkowski Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -914,6 +914,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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user