mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Simplify a condition in is_KXK()
No functional change.
This commit is contained in:
@@ -66,8 +66,7 @@ namespace {
|
|||||||
// Helper templates used to detect a given material distribution
|
// Helper templates used to detect a given material distribution
|
||||||
template<Color Us> bool is_KXK(const Position& pos) {
|
template<Color Us> bool is_KXK(const Position& pos) {
|
||||||
const Color Them = (Us == WHITE ? BLACK : WHITE);
|
const Color Them = (Us == WHITE ? BLACK : WHITE);
|
||||||
return !pos.count<PAWN>(Them)
|
return !more_than_one(pos.pieces(Them))
|
||||||
&& pos.non_pawn_material(Them) == VALUE_ZERO
|
|
||||||
&& pos.non_pawn_material(Us) >= RookValueMg;
|
&& pos.non_pawn_material(Us) >= RookValueMg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user