]> git.sesse.net Git - stockfish/commit
Use CheckInfo to generate checks
authorMarco Costalba <mcostalba@gmail.com>
Sun, 8 Jan 2012 14:08:20 +0000 (15:08 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 8 Jan 2012 15:09:18 +0000 (16:09 +0100)
commit9b43fd79372946128924ab3d42c64559e95d29d6
treedfa0e2977e74c0c9946e3241a3e4d7ad48006e3b
parent87fc9dcaa30017dcfd886b0f304a76a63dedc35e
Use CheckInfo to generate checks

It should help to avoid recalculating check squares
of sliding attackers for queen when already done for
bishops and rooks. Of course this helps when there are
bishop, rook and queen on the board !

Fixed also a subtle bug (use of same variable b in while
condition and in condition body) introduced recently by
revision d655147e8c that triggers
in case we have at least 2 non-pawn discovered check pieces.
This is very rare that's why didn't show in the node count
verification where we actually have a case of 2 dc pieces
in position 14, but one is a pawn.

No functional change.

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