mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Small micro-optimization in get_pawn_info()
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
f05d059b17
commit
564ed5b38c
1 changed files with 4 additions and 5 deletions
|
@ -303,12 +303,11 @@ PawnInfo* PawnInfoTable::get_pawn_info(const Position& pos) {
|
|||
// it cannot be backward. If can capture an enemy pawn or if
|
||||
// there are friendly pawns behind on neighboring files it cannot
|
||||
// be backward either.
|
||||
|
||||
bool backward;
|
||||
if ( passed
|
||||
|| isolated
|
||||
|| chain
|
||||
|| (pos.attacks_from<PAWN>(s, us) & theirPawns)
|
||||
|| (ourPawns & behind_bb(us, r) & neighboring_files_bb(f)))
|
||||
if ( (passed | isolated | chain)
|
||||
|| (ourPawns & behind_bb(us, r) & neighboring_files_bb(f))
|
||||
|| (pos.attacks_from<PAWN>(s, us) & theirPawns))
|
||||
backward = false;
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue