Fix castling through check
authorH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 11 Feb 2018 11:14:28 +0000 (12:14 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 11 Feb 2018 11:14:28 +0000 (12:14 +0100)
commitf889e98412098c0bf11ce0802d254f6efcd7d248
treefba48748e3e8b8d394c6edd1ff81ea93a08805a6
parent70aa0d4c1af1e1e9704cb60d9a5022fe4f1240ff
Fix castling through check

Castling through check, like walking into check, is supposed to be  tested
through early move generation in the reply node. But this early generation
was triggered by testing whether the 'to-piece' was a King, while the way
castling is implemented promotes the King to a Rook. This way castling
escaped the test. Now early move generation is done based on the from-piece.
dropper.c