1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 00:33:09 +00:00

Use distance<file>() function in endgame.cpp

This one occurance of distance function was most likely overlooked.

No functional change.

Resolves #376
This commit is contained in:
joergoster 2015-07-08 13:48:42 +02:00 committed by Joona Kiiski
parent b2edac7075
commit 3054db989d

View file

@ -471,7 +471,7 @@ ScaleFactor Endgame<KRPKR>::operator()(const Position& pos) const {
if ( r == RANK_6
&& distance(bksq, queeningSq) <= 1
&& rank_of(wksq) + tempo <= RANK_6
&& (rank_of(brsq) == RANK_1 || (!tempo && distance(file_of(brsq), f) >= 3)))
&& (rank_of(brsq) == RANK_1 || (!tempo && distance<File>(brsq, wpsq) >= 3)))
return SCALE_FACTOR_DRAW;
if ( r >= RANK_6