mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Remove unneeded condition. (#2057)
This is covered by the line just before. If we would like to protect against the piece value of e.g. a N == B, this could be done by an assert, no need to do this at runtime. No functional change.
This commit is contained in:
parent
ea5505821d
commit
2f11c03bbf
1 changed files with 0 additions and 2 deletions
|
@ -70,14 +70,12 @@ namespace {
|
|||
|
||||
bool is_KBPsK(const Position& pos, Color us) {
|
||||
return pos.non_pawn_material(us) == BishopValueMg
|
||||
&& pos.count<BISHOP>(us) == 1
|
||||
&& pos.count<PAWN >(us) >= 1;
|
||||
}
|
||||
|
||||
bool is_KQKRPs(const Position& pos, Color us) {
|
||||
return !pos.count<PAWN>(us)
|
||||
&& pos.non_pawn_material(us) == QueenValueMg
|
||||
&& pos.count<QUEEN>(us) == 1
|
||||
&& pos.count<ROOK>(~us) == 1
|
||||
&& pos.count<PAWN>(~us) >= 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue