X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fendgame.cpp;h=ef55119b76f811f4fb75e038000af6f7491336f5;hp=273f040ac40d5dc51219bd8e7845f81e981f9525;hb=7c1f8dbde93267c7958a4de5e167a43e38c9e1e9;hpb=dc7fd868f4fa41251a9521a0b25e3adb483bfd83 diff --git a/src/endgame.cpp b/src/endgame.cpp index 273f040a..ef55119b 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -20,14 +20,13 @@ #include #include +#include "bitboard.h" #include "bitcount.h" #include "endgame.h" #include "movegen.h" using std::string; -extern uint32_t probe_kpk_bitbase(Square wksq, Square wpsq, Square bksq, Color stm); - namespace { // Table used to drive the defending king towards the edge of the board @@ -223,7 +222,7 @@ Value Endgame::operator()(const Position& pos) const { wpsq = mirror(wpsq); } - if (!probe_kpk_bitbase(wksq, wpsq, bksq, stm)) + if (!Bitbases::probe_kpk(wksq, wpsq, bksq, stm)) return VALUE_DRAW; Value result = VALUE_KNOWN_WIN @@ -893,5 +892,5 @@ ScaleFactor Endgame::operator()(const Position& pos) const { // Probe the KPK bitbase with the weakest side's pawn removed. If it's a draw, // it's probably at least a draw even with the pawn. - return probe_kpk_bitbase(wksq, wpsq, bksq, stm) ? SCALE_FACTOR_NONE : SCALE_FACTOR_DRAW; + return Bitbases::probe_kpk(wksq, wpsq, bksq, stm) ? SCALE_FACTOR_NONE : SCALE_FACTOR_DRAW; }