mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 11:06:58 +08:00
Simplify kf definition in shelter_storm()
No functional change.
This commit is contained in:
committed by
Marco Costalba
parent
5e331f9618
commit
04fd7efdfa
@@ -226,9 +226,7 @@ Value Entry::shelter_storm(const Position& pos, Square ksq) {
|
||||
Bitboard ourPawns = b & pos.pieces(Us);
|
||||
Bitboard theirPawns = b & pos.pieces(Them);
|
||||
Rank rkUs, rkThem;
|
||||
File kf = file_of(ksq);
|
||||
|
||||
kf = (kf == FILE_A) ? FILE_B : (kf == FILE_H) ? FILE_G : kf;
|
||||
File kf = std::max(FILE_B, std::min(FILE_G, file_of(ksq)));
|
||||
|
||||
for (int f = kf - 1; f <= kf + 1; f++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user