X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=f6beca356bc5f0eb7cc6b66012c0a5a12890c2cc;hp=8d9dd6e7cdca399cdf7b1e9a1cfde9bd3b2f14a4;hb=69067e1988ea945977d586a1442a22be0b55671a;hpb=0a5b03af3f4291c11d1eb28bcfa607471ba81fd1 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);