]> git.sesse.net Git - stockfish/commit
Use legal positions for endgame initialization
authorMarco Costalba <mcostalba@gmail.com>
Fri, 14 Mar 2014 08:57:34 +0000 (09:57 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 14 Mar 2014 08:57:34 +0000 (09:57 +0100)
commitd0587f2c7f31ea30885007beca76e832b8713501
tree6ec595fa8a0084a3eab703ea3678cd559bb2116e
parent1f4798a173ea6579ef42a423d71f2e36d3894a03
Use legal positions for endgame initialization

During endgame initialization we get the material
hash key of each endgame forging and ad-hoc position
that in same cases is illegal (leaves teh king under
capture). This is not a problem for the material key,
but rises an assert when SF is run in debug mode with
'testKingCapture' set in pos_is_ok().

So rewrite the code to always produce legal positions.

No functional change.
src/endgame.cpp