mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Bring back just bishop pins
This commit is contained in:
parent
7062db7cb2
commit
57797822f8
1 changed files with 6 additions and 0 deletions
|
@ -577,6 +577,12 @@ Value do_evaluate(const Position& pos, Value& margin) {
|
||||||
|
|
||||||
mobility += MobilityBonus[Piece][mob];
|
mobility += MobilityBonus[Piece][mob];
|
||||||
|
|
||||||
|
if (Piece == BISHOP && (PseudoAttacks[Piece][pos.king_square(Them)] & s)) {
|
||||||
|
const Bitboard between = BetweenBB[s][pos.king_square(Them)] & pos.pieces();
|
||||||
|
if (!more_than_one(between))
|
||||||
|
score += make_score(25, 25);
|
||||||
|
}
|
||||||
|
|
||||||
// Decrease score if we are attacked by an enemy pawn. Remaining part
|
// Decrease score if we are attacked by an enemy pawn. Remaining part
|
||||||
// of threat evaluation must be done later when we have full attack info.
|
// of threat evaluation must be done later when we have full attack info.
|
||||||
if (ei.attackedBy[Them][PAWN] & s)
|
if (ei.attackedBy[Them][PAWN] & s)
|
||||||
|
|
Loading…
Add table
Reference in a new issue