X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=f6beca356bc5f0eb7cc6b66012c0a5a12890c2cc;hp=8d9dd6e7cdca399cdf7b1e9a1cfde9bd3b2f14a4;hb=0f6f42cd8334603f6fdf22645c5860c2ce6bd82f;hpb=378c8bdbb8f930472fc4316aa6c417802294bbad diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 8d9dd6e7..f6beca35 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -626,7 +626,8 @@ namespace { return score; } - // helper used by evaluate_passed_pawns to cap the distance + // king_distance() returns an estimate of the distance that the king + // of the given color has to run to reach square s. template int Evaluation::king_distance(Color c, Square s) { return std::min(distance(pos.square(c), s), 5);