From 264c8637a30247f1054f60b7b728fb4340185efa Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 19 Jun 2014 15:44:42 +0200 Subject: [PATCH] Simplify a condition in is_KXK() No functional change. --- src/material.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.39.2