]> git.sesse.net Git - stockfish/commitdiff
Greatly speedup has_mate_threat()
authorMarco Costalba <mcostalba@gmail.com>
Mon, 20 Apr 2009 07:10:27 +0000 (09:10 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 26 Apr 2009 12:40:26 +0000 (13:40 +0100)
Instead of loop across all legal moves to find a mate
loop across possible check moves only.

This reduces more then 10 times the number of moves to
check for a possible mate.

Also rename generate_checks() in generate_non_capture_checks()
so to better clarify what the function does.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found