mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Combine duplicated - tb.plies subtraction logic
closes https://github.com/official-stockfish/Stockfish/pull/6752 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
583e0c1c75
commit
7faecd75ac
+1
-2
@@ -541,8 +541,7 @@ std::string UCIEngine::format_score(const Score& s) {
|
|||||||
return std::string("mate ") + std::to_string(m);
|
return std::string("mate ") + std::to_string(m);
|
||||||
},
|
},
|
||||||
[](Score::Tablebase tb) -> std::string {
|
[](Score::Tablebase tb) -> std::string {
|
||||||
return std::string("cp ")
|
return std::string("cp ") + std::to_string((tb.win ? TB_CP : -TB_CP) - tb.plies);
|
||||||
+ std::to_string((tb.win ? TB_CP - tb.plies : -TB_CP - tb.plies));
|
|
||||||
},
|
},
|
||||||
[](Score::InternalUnits units) -> std::string {
|
[](Score::InternalUnits units) -> std::string {
|
||||||
return std::string("cp ") + std::to_string(units.value);
|
return std::string("cp ") + std::to_string(units.value);
|
||||||
|
|||||||
Reference in New Issue
Block a user