]> git.sesse.net Git - stockfish/commitdiff
Relax constrain in prevents_threat()
authorMarco Costalba <mcostalba@gmail.com>
Sat, 3 Nov 2012 14:48:34 +0000 (15:48 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 3 Nov 2012 14:57:20 +0000 (15:57 +0100)
When testing if a move blocks the threat path there is no
reason to require the threat to be a slider. Indeed threat
can be a double pawn push like in this example:

r1bq1rk1/ppp1np1p/4n1p1/3p4/3P2Q1/2P1B3/PPBN2PP/R4RK1 w - - 0 16

Where white's move Rf6 blocks the threat f5.

As a nice side effect we can retire the now useless helper
piece_is_slider().

This patch kicks in only very rare cases, indeed the bench is
still the same!

bench: 5809010


No differences found