]> git.sesse.net Git - stockfish/commit
Fix a bug in generate_piece_checks()
authorMarco Costalba <mcostalba@gmail.com>
Mon, 21 Sep 2009 07:47:47 +0000 (08:47 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 22 Sep 2009 06:07:16 +0000 (07:07 +0100)
commitaaffcf973e9c23165ae1aec87c6a2ec1ef29634a
tree820dbedab8d7dd64155ec7e06757853b04366fb8
parent746bcb348f6aa26d112ba11f748717b80f94e6a0
Fix a bug in generate_piece_checks()

We are generating also king moves that give check !

Of course these moves are illegal so are in any case
filtered out in MovePicker. Neverthless we should avoid
to generate them.

Also simplify a bit the code.

No functional change.

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