/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
- Copyright (C) 2008 Marco Costalba
+ Copyright (C) 2008-2009 Marco Costalba
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
for (Bitboard b = 0ULL; b < 256ULL; b++)
+ {
+ assert(count_1s(b) == int(uint8_t(count_1s(b))));
BitCount8Bit[b] = (uint8_t)count_1s(b);
+ }
}
{
delete PawnTable[i];
delete MaterialTable[i];
+ PawnTable[i] = NULL;
+ MaterialTable[i] = NULL;
}
}
if ( bit_is_set(p.piece_attacks<QUEEN>(from), to)
&& !bit_is_set(p.pinned_pieces(them), from)
&& !(rook_attacks_bb(to, occ & ClearMaskBB[from]) & p.rooks_and_queens(us))
- && !(rook_attacks_bb(to, occ & ClearMaskBB[from]) & p.rooks_and_queens(us)))
+ && !(bishop_attacks_bb(to, occ & ClearMaskBB[from]) & p.bishops_and_queens(us)))
ei.mateThreat[them] = make_move(from, to);
}