mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Simplify a condition in is_KXK()
No functional change.
This commit is contained in:
parent
55a3e0af8d
commit
264c8637a3
1 changed files with 1 additions and 2 deletions
|
@ -66,8 +66,7 @@ namespace {
|
|||
// Helper templates used to detect a given material distribution
|
||||
template<Color Us> bool is_KXK(const Position& pos) {
|
||||
const Color Them = (Us == WHITE ? BLACK : WHITE);
|
||||
return !pos.count<PAWN>(Them)
|
||||
&& pos.non_pawn_material(Them) == VALUE_ZERO
|
||||
return !more_than_one(pos.pieces(Them))
|
||||
&& pos.non_pawn_material(Us) >= RookValueMg;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue