1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 09:13:08 +00:00

Exclude queen from Rook Contact Check computation

In ei.attackedBy, Queen does not x-ray through Rook, but the Rook does
X-ray through the Queen.

So most of the rook contact checks supported by queen are, in fact,
Queen Contact Checks and they are already scored separately.

Bench: 7762189

Resolves #338
This commit is contained in:
Alain SAVARD 2015-04-18 22:12:56 +01:00 committed by Joona Kiiski
parent 6c040c821a
commit 078625e333

View file

@ -438,7 +438,7 @@ namespace {
{
// ...and then remove squares not supported by another enemy piece
b &= ( ei.attackedBy[Them][PAWN] | ei.attackedBy[Them][KNIGHT]
| ei.attackedBy[Them][BISHOP] | ei.attackedBy[Them][QUEEN]);
| ei.attackedBy[Them][BISHOP]);
if (b)
attackUnits += RookContactCheck * popcount<Max15>(b);