Retire direction.cpp

Move the code to bitboard.cpp

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2010-12-26 16:27:58 +01:00
parent cb7f20913e
commit 4dded4e72f
7 changed files with 55 additions and 82 deletions

View File

@@ -244,7 +244,7 @@ MoveStack* generate_evasions(const Position& pos, MoveStack* mlist) {
case QUEEN:
// In case of a queen remove also squares attacked in the other direction to
// avoid possible illegal moves when queen and king are on adjacent squares.
if (direction_is_straight(checksq, ksq))
if (squares_straight_aligned(checksq, ksq))
sliderAttacks |= RookPseudoAttacks[checksq] | pos.attacks_from<BISHOP>(checksq);
else
sliderAttacks |= BishopPseudoAttacks[checksq] | pos.attacks_from<ROOK>(checksq);