From: Marco Costalba Date: Thu, 19 Jun 2014 13:44:42 +0000 (+0200) Subject: Simplify a condition in is_KXK() X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=264c8637a30247f1054f60b7b728fb4340185efa;p=fairystockfish.git Simplify a condition in is_KXK() No functional change. --- diff --git a/src/material.cpp b/src/material.cpp index 9a12066..0949a1b 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; }