mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Amend defended
Amend defended to remove now redundant condition. No functional change. Resolves #125
This commit is contained in:
committed by
Gary Linscott
parent
84408e5cd6
commit
48127fe5d3
@@ -503,10 +503,9 @@ namespace {
|
||||
Bitboard b, weak, defended;
|
||||
Score score = SCORE_ZERO;
|
||||
|
||||
// Non-pawn enemies defended by a pawn and under our attack
|
||||
// Non-pawn enemies defended by a pawn
|
||||
defended = (pos.pieces(Them) ^ pos.pieces(Them, PAWN))
|
||||
& ei.attackedBy[Them][PAWN]
|
||||
& (ei.attackedBy[Us][KNIGHT] | ei.attackedBy[Us][BISHOP] | ei.attackedBy[Us][ROOK]);
|
||||
& ei.attackedBy[Them][PAWN];
|
||||
|
||||
// Add a bonus according to the kind of attacking pieces
|
||||
if (defended)
|
||||
|
||||
Reference in New Issue
Block a user