Amend defended
authorJonathan Calovski <jonoface@live.com.au>
Fri, 21 Nov 2014 21:46:59 +0000 (05:46 +0800)
committerGary Linscott <glinscott@gmail.com>
Fri, 21 Nov 2014 21:46:59 +0000 (05:46 +0800)
Amend defended to remove now redundant condition.

No functional change.

Resolves #125

src/evaluate.cpp

index b47570e86303863cc968e632ca49b15ca9e175b0..b7a596efba1bfc1f9af5e50971bfae7abd4dcda6 100644 (file)
@@ -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)