Skip to content

Commit

Permalink
Correction 2
Browse files Browse the repository at this point in the history
  • Loading branch information
MJZ1977 committed Feb 22, 2019
1 parent 616a7c4 commit 8659e9e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/evaluate.cpp
Expand Up @@ -793,11 +793,15 @@ namespace {
sf = std::min(40 + (pos.opposite_bishops() ? 2 : 7) * pos.count<PAWN>(strongSide), sf);
if (abs(eg) < Value(400) && pos.non_pawn_material() < 6000)
{
Bitboard safePawnPush = pos.pieces(strongSide, PAWN) + (strongSide == WHITE ? NORTH : SOUTH);
Bitboard safePawnPush;
if (strongSide == WHITE)
safePawnPush = shift<NORTH>(pos.pieces(strongSide, PAWN));
else
safePawnPush = shift<SOUTH>(pos.pieces(strongSide, PAWN));
safePawnPush &= ~pos.pieces(~strongSide);
safePawnPush &= ~(attackedBy[~strongSide][PAWN]
| (attackedBy2[~strongSide] & ~attackedBy2[strongSide]));
if (~safePawnPush)
//safePawnPush &= ~(attackedBy[~strongSide][PAWN]
// | (attackedBy2[~strongSide] & ~attackedBy2[strongSide]));
if (!bool(safePawnPush))
sf -= 2;
}
}
Expand Down

0 comments on commit 8659e9e

Please sign in to comment.