mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 01:27:16 +08:00
Simplify semiopen_file (#2165)
This is a non-functional simplification. Since our file_bb handles either Files or Squares, using Square here removes some code. Not likely any performance difference despite the test. STC LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 6081 W: 1444 L: 1291 D: 3346 http://tests.stockfishchess.org/tests/view/5ceb3e2e0ebc5925cf07ab03 Non functional change.
This commit is contained in:
committed by
Marco Costalba
parent
190f38a7c2
commit
c645587270
@@ -357,8 +357,8 @@ namespace {
|
||||
score += RookOnPawn * popcount(pos.pieces(Them, PAWN) & PseudoAttacks[ROOK][s]);
|
||||
|
||||
// Bonus for rook on an open or semi-open file
|
||||
if (pos.is_semiopen_file(Us, file_of(s)))
|
||||
score += RookOnFile[bool(pos.is_semiopen_file(Them, file_of(s)))];
|
||||
if (pos.is_on_semiopen_file(Us, s))
|
||||
score += RookOnFile[bool(pos.is_on_semiopen_file(Them, s))];
|
||||
|
||||
// Penalty when trapped by the king, even more if the king cannot castle
|
||||
else if (mob <= 3)
|
||||
|
||||
Reference in New Issue
Block a user