Bug fix for KQKRPs endgame
authorChris Caino <chricainogithub@gmail.com>
Mon, 14 Oct 2013 23:09:05 +0000 (00:09 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 15 Oct 2013 05:34:29 +0000 (07:34 +0200)
commit2bf18bfc6396ae7292f57fc021b390fc05cd0f95
treea8f27d1a327805a8495c94baac9a4bdb203e15f7
parent5aeb907fa19afb22c92b3076d3ff73386cf7755c
Bug fix for KQKRPs endgame

This lost position 8/8/3q4/8/5k2/2P1R3/2K2P2/8 w - - 0 1
was previously evaluated as a draw.

The king and rook need to be correctly placed with
respect to the _same_ pawn.

(Note also that the check for the pawn being on RANK_2
in the old version is redundant: it must be on RANK_2 if
it hopes to protect a rook on RANK_3)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/endgame.cpp