mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
Simplify chain detection
No functional change.
This commit is contained in:
parent
04fd7efdfa
commit
6e6c5b6103
1 changed files with 1 additions and 3 deletions
|
@ -92,7 +92,6 @@ namespace {
|
||||||
Bitboard b;
|
Bitboard b;
|
||||||
Square s;
|
Square s;
|
||||||
File f;
|
File f;
|
||||||
Rank r;
|
|
||||||
bool passed, isolated, doubled, opposed, chain, backward, candidate;
|
bool passed, isolated, doubled, opposed, chain, backward, candidate;
|
||||||
Score value = SCORE_ZERO;
|
Score value = SCORE_ZERO;
|
||||||
const Square* pl = pos.list<PAWN>(Us);
|
const Square* pl = pos.list<PAWN>(Us);
|
||||||
|
@ -113,13 +112,12 @@ namespace {
|
||||||
assert(pos.piece_on(s) == make_piece(Us, PAWN));
|
assert(pos.piece_on(s) == make_piece(Us, PAWN));
|
||||||
|
|
||||||
f = file_of(s);
|
f = file_of(s);
|
||||||
r = rank_of(s);
|
|
||||||
|
|
||||||
// This file cannot be semi-open
|
// This file cannot be semi-open
|
||||||
e->semiopenFiles[Us] &= ~(1 << f);
|
e->semiopenFiles[Us] &= ~(1 << f);
|
||||||
|
|
||||||
// Our rank plus previous one. Used for chain detection
|
// Our rank plus previous one. Used for chain detection
|
||||||
b = rank_bb(r) | rank_bb(Us == WHITE ? r - Rank(1) : r + Rank(1));
|
b = rank_bb(s) | rank_bb(s - pawn_push(Us));
|
||||||
|
|
||||||
// Flag the pawn as passed, isolated, doubled or member of a pawn
|
// Flag the pawn as passed, isolated, doubled or member of a pawn
|
||||||
// chain (but not the backward one).
|
// chain (but not the backward one).
|
||||||
|
|
Loading…
Add table
Reference in a new issue