From: Marco Costalba Date: Thu, 19 Jun 2014 13:44:42 +0000 (+0200) Subject: Simplify a condition in is_KXK() X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=264c8637a30247f1054f60b7b728fb4340185efa Simplify a condition in is_KXK() No functional change. --- 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; }