Cleanup and optimize Position::has_mate_threat()
authorMarco Costalba <mcostalba@gmail.com>
Mon, 9 Aug 2010 10:45:02 +0000 (11:45 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 9 Aug 2010 11:30:33 +0000 (12:30 +0100)
commit252537fd9c8cb60f765ea390d2464a42adeafc0a
tree5859d0cc4c7cb504a3505fee8fe9e1b252f3545e
parentf26e0fec64eed03279704e851b11c1654ea2c63c
Cleanup and optimize Position::has_mate_threat()

There is a functional change because we now skip
more moves and because do_move() / undo_move() is
well known to be not reversible we end up with a
change in node count, although there is actually
no change but a bit speed up.

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