]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Bonus for reachable outpost
[stockfish] / src / pawns.cpp
index 40037bba47ed82e93e106a7828688ced284b4556..8b44587f6962ccfc0e05ca1a7b91e4a15d84a85e 100644 (file)
@@ -116,7 +116,7 @@ namespace {
     Bitboard ourPawns   = pos.pieces(Us  , PAWN);
     Bitboard theirPawns = pos.pieces(Them, PAWN);
 
-    e->passedPawns[Us] = 0;
+    e->passedPawns[Us] = e->pawnAttacksSpan[Us] = 0;
     e->kingSquares[Us] = SQ_NONE;
     e->semiopenFiles[Us] = 0xFF;
     e->pawnAttacks[Us] = shift_bb<Right>(ourPawns) | shift_bb<Left>(ourPawns);
@@ -133,6 +133,8 @@ namespace {
         // This file cannot be semi-open
         e->semiopenFiles[Us] &= ~(1 << f);
 
+        e->pawnAttacksSpan[Us] |= pawn_attack_span(Us, s);
+
         // Flag the pawn
         neighbours  =   ourPawns   & adjacent_files_bb(f);
         doubled     =   ourPawns   & forward_bb(Us, s);