mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Simplify backward pawn definition
Make use of 'lever' attribute No functional change Resolves #234
This commit is contained in:
parent
7837fb2aca
commit
8aa8608c2a
1 changed files with 4 additions and 5 deletions
|
@ -144,12 +144,11 @@ namespace {
|
|||
lever = theirPawns & pawnAttacksBB[s];
|
||||
|
||||
// Test for backward pawn.
|
||||
// If the pawn is passed, isolated, or connected it cannot be
|
||||
// If the pawn is passed, isolated, connected or a lever it cannot be
|
||||
// backward. If there are friendly pawns behind on adjacent files
|
||||
// or if it can capture an enemy pawn it cannot be backward either.
|
||||
if ( (passed | isolated | connected)
|
||||
|| (ourPawns & pawn_attack_span(Them, s))
|
||||
|| (pos.attacks_from<PAWN>(s, Us) & theirPawns))
|
||||
// it cannot be backward either.
|
||||
if ( (passed | isolated | connected | lever)
|
||||
|| (ourPawns & pawn_attack_span(Them, s)))
|
||||
backward = false;
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue