Bitboard doubleBlocked = attackedBy2[Them]
| (pos.pieces(Us, PAWN) & (shift<Down>(pos.pieces()) | attackedBy[Them][ALL_PIECES]))
| (pawn_attacks_bb<Them>(pos.pieces(Them, PAWN) & pe->pawn_attacks(Them)));
+ Bitboard inaccessible = pos.pieces(Us, PAWN) & shift<Down>(pos.pieces(Them, PAWN));
// Traverse all paths of the CTF pieces to the CTF targets.
// Put squares that are attacked or occupied on hold for one iteration.
for (int dist = 0; (ctfPieces || onHold || onHold2) && (ctfTargets & ~processed); dist++)
| (PseudoMoves[Us][ptCtf][s] & ~pos.pieces())) & ~processed & pos.board_bb();
ctfPieces |= attacks & ~blocked;
onHold |= attacks & ~doubleBlocked;
- onHold2 |= attacks;
+ onHold2 |= attacks & ~inaccessible;
}
}
}