From 7faecd75acedb8b0ea9c9f8d24883d2d56f5a35a Mon Sep 17 00:00:00 2001 From: FauziAkram Date: Mon, 20 Apr 2026 17:43:56 +0200 Subject: [PATCH] Combine duplicated - tb.plies subtraction logic closes https://github.com/official-stockfish/Stockfish/pull/6752 No functional change --- src/uci.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/uci.cpp b/src/uci.cpp index e17533afd..2f2364736 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -541,8 +541,7 @@ std::string UCIEngine::format_score(const Score& s) { return std::string("mate ") + std::to_string(m); }, [](Score::Tablebase tb) -> std::string { - return std::string("cp ") - + std::to_string((tb.win ? TB_CP - tb.plies : -TB_CP - tb.plies)); + return std::string("cp ") + std::to_string((tb.win ? TB_CP : -TB_CP) - tb.plies); }, [](Score::InternalUnits units) -> std::string { return std::string("cp ") + std::to_string(units.value);