Add a see() function that take only destination square

In this case firstlocates the least valuable attacker, if any,
then proceed as usual.

This will be used by next patch.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2008-12-09 11:20:47 +01:00
parent 235df6a887
commit aaad48464b
4 changed files with 52 additions and 20 deletions

View File

@@ -250,8 +250,8 @@ Bitboard BMask[64];
int BAttackIndex[64];
Bitboard BAttacks[0x1480];
Bitboard SetMaskBB[64];
Bitboard ClearMaskBB[64];
Bitboard SetMaskBB[65];
Bitboard ClearMaskBB[65];
Bitboard StepAttackBB[16][64];
Bitboard RayBB[64][8];
@@ -433,6 +433,8 @@ namespace {
// be necessary to touch any of them.
void init_masks() {
SetMaskBB[SQ_NONE] = 0ULL;
ClearMaskBB[SQ_NONE] = ~SetMaskBB[SQ_NONE];
for(Square s = SQ_A1; s <= SQ_H8; s++) {
SetMaskBB[s] = (1ULL << s);
ClearMaskBB[s] = ~SetMaskBB[s];