]> git.sesse.net Git - stockfish/commitdiff
Fix comment for kingAdjacentZoneAttacksCount
authorStéphane Nicolet <cassio@free.fr>
Thu, 19 Feb 2015 20:33:07 +0000 (21:33 +0100)
committerJoona Kiiski <joona.kiiski@gmail.com>
Fri, 20 Feb 2015 19:59:26 +0000 (19:59 +0000)
The comment for kingAdjacentZoneAttacksCount[] was bogus, using
reversed semantics for color.

No functional change

Resolves #262

src/evaluate.cpp

index 8c5ecc36847ac88e5be0b7be3b19650fb853aa65..77096c9b30f62d581d52c944051865913154bef9 100644 (file)
@@ -61,11 +61,11 @@ namespace {
     // KingAttackWeights array.
     int kingAttackersWeight[COLOR_NB];
 
     // KingAttackWeights array.
     int kingAttackersWeight[COLOR_NB];
 
-    // kingAdjacentZoneAttacksCount[color] is the number of attacks to squares
-    // directly adjacent to the king of the given color. Pieces which attack
-    // more than one square are counted multiple times. For instance, if black's
-    // king is on g8 and there's a white knight on g5, this knight adds
-    // 2 to kingAdjacentZoneAttacksCount[BLACK].
+    // kingAdjacentZoneAttacksCount[color] is the number of attacks by the given
+    // color to squares directly adjacent to the enemy king. Pieces which attack
+    // more than one square are counted multiple times. For instance, if there is
+    // a white knight on g5 and black's king is on g8, this white knight adds 2
+    // to kingAdjacentZoneAttacksCount[WHITE].
     int kingAdjacentZoneAttacksCount[COLOR_NB];
 
     Bitboard pinnedPieces[COLOR_NB];
     int kingAdjacentZoneAttacksCount[COLOR_NB];
 
     Bitboard pinnedPieces[COLOR_NB];