mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Amend defended
Amend defended to remove now redundant condition. No functional change. Resolves #125
This commit is contained in:
parent
84408e5cd6
commit
48127fe5d3
1 changed files with 2 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue