]> git.sesse.net Git - stockfish/commitdiff
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)
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.


No differences found