Simplify KBNK endgame implementation
authorprotonspring <mike@whiteley.org>
Sat, 8 Dec 2018 17:08:59 +0000 (10:08 -0700)
committerStéphane Nicolet <cassio@free.fr>
Thu, 20 Dec 2018 09:47:18 +0000 (10:47 +0100)
commitb54bcfddaa2a5f6c5d4d5b54243a682a098f49a3
treeb6a1063c171e9023e0176a1432d1768c7a95c556
parent0f2df4e4afa37946e02a2b647ff21146e0588af7
Simplify KBNK endgame implementation

We do not need to change the winnerKSq variable, so we can simplify
a little bit the logic of the code by changing only the loserKSq
variable when it is necessary. Also consolidate and clarify comments.

See the pull request thread for a proof that the code is correct:
https://github.com/official-stockfish/Stockfish/pull/1854

No functional change
src/endgame.cpp