X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fendgame.cpp;h=e896e778e96aa8347b3f00405c26eddf580f97f5;hb=94a3608ab9f2334784ac3b111dc79c9eb5e33ba3;hp=4323a4209442d10601b9711018422435d3344fac;hpb=a4c11b71acc4aeab032128d4ba9d0d4ccd51aa20;p=stockfish diff --git a/src/endgame.cpp b/src/endgame.cpp index 4323a420..e896e778 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -89,7 +89,10 @@ namespace { Endgames::Endgames() { + add("KK"); add("KPK"); + add("KBK"); + add("KNK"); add("KNNK"); add("KBNK"); add("KRKP"); @@ -410,17 +413,13 @@ Value Endgame::operator()(const Position& pos) const { } -/// K and two minors vs K and one or two minors or K and two knights against -/// king alone are always draw. -template<> -Value Endgame::operator()(const Position&) const { - return VALUE_DRAW; -} +/// Some cases of trivial draws +template<> Value Endgame::operator()(const Position&) const { return VALUE_DRAW; } +template<> Value Endgame::operator()(const Position&) const { return VALUE_DRAW; } +template<> Value Endgame::operator()(const Position&) const { return VALUE_DRAW; } +template<> Value Endgame::operator()(const Position&) const { return VALUE_DRAW; } +template<> Value Endgame::operator()(const Position&) const { return VALUE_DRAW; } -template<> -Value Endgame::operator()(const Position&) const { - return VALUE_DRAW; -} /// K, bishop and one or more pawns vs K. It checks for draws with rook pawns and /// a bishop of the wrong color. If such a draw is detected, SCALE_FACTOR_DRAW