X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=0949a1bf418a899072865ad043d1048c39a1598b;hp=9a120661eb249306d1a52994a4485ea1b6bf60f9;hb=264c8637a30247f1054f60b7b728fb4340185efa;hpb=55a3e0af8d0d1e169cc8b16541ffeb41e157b66e diff --git a/src/material.cpp b/src/material.cpp index 9a120661..0949a1bf 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -66,8 +66,7 @@ namespace { // Helper templates used to detect a given material distribution template bool is_KXK(const Position& pos) { const Color Them = (Us == WHITE ? BLACK : WHITE); - return !pos.count(Them) - && pos.non_pawn_material(Them) == VALUE_ZERO + return !more_than_one(pos.pieces(Them)) && pos.non_pawn_material(Us) >= RookValueMg; }