- && (square_distance(wksq, queeningSq) < square_distance(bksq, queeningSq) - 2 + tempo)
- && (square_distance(wksq, wpsq + DELTA_N) < square_distance(bksq, wpsq + DELTA_N) - 2 + tempo)
- && ( square_distance(bksq, wrsq) + tempo >= 3
- || ( square_distance(wksq, queeningSq) < square_distance(bksq, wrsq) + tempo
- && (square_distance(wksq, wpsq + DELTA_N) < square_distance(bksq, wrsq) + tempo))))
+ && (distance(wksq, queeningSq) < distance(bksq, queeningSq) - 2 + tempo)
+ && (distance(wksq, wpsq + DELTA_N) < distance(bksq, wpsq + DELTA_N) - 2 + tempo)
+ && ( distance(bksq, wrsq) + tempo >= 3
+ || ( distance(wksq, queeningSq) < distance(bksq, wrsq) + tempo
+ && (distance(wksq, wpsq + DELTA_N) < distance(bksq, wrsq) + tempo))))