mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Change pawn_attacks() API
Instead of pawn_attacks(Color c, Square s) define as pawn_attacks(Square s, Color c) to be more aligned to the others attack info functions. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -437,7 +437,7 @@ ScaleFactor ScalingFunction<KQKRPs>::apply(const Position& pos) {
|
||||
&& (pos.piece_attacks<KING>(kingSq) & pos.pieces(PAWN, weakerSide)))
|
||||
{
|
||||
Square rsq = pos.piece_list(weakerSide, ROOK, 0);
|
||||
if (pos.pawn_attacks(strongerSide, rsq) & pos.pieces(PAWN, weakerSide))
|
||||
if (pos.pawn_attacks(rsq, strongerSide) & pos.pieces(PAWN, weakerSide))
|
||||
return ScaleFactor(0);
|
||||
}
|
||||
return SCALE_FACTOR_NONE;
|
||||
|
||||
Reference in New Issue
Block a user