ren macros mask->BIT/C64->U64, del pinners/checkers/blockers in state_s

This commit is contained in:
2024-05-06 07:41:27 +02:00
parent c710da4bf9
commit 32ade1777f
11 changed files with 61 additions and 55 deletions

View File

@@ -109,7 +109,7 @@ bool is_in_check(const pos_t *pos, const color_t color)
bitboard_t sq_attackers(const pos_t *pos, const bitboard_t occ, const square_t sq, const color_t c)
{
bitboard_t attackers = 0, tmp;
bitboard_t sqbb = mask(sq);
bitboard_t sqbb = BIT(sq);
bitboard_t to;
color_t opp = OPPONENT(c);
@@ -186,7 +186,7 @@ bitboard_t sq_pinners(const pos_t *pos, const square_t sq, const color_t color)
bitboard_t between = bb_between_excl[maybe_pinner][sq];
/* keep only squares between AND on sq diag/anti */
if (popcount64(between & lines) == 1)
pinners |= mask(maybe_pinner);
pinners |= BIT(maybe_pinner);
}
/* same for rook type */
@@ -195,7 +195,7 @@ bitboard_t sq_pinners(const pos_t *pos, const square_t sq, const color_t color)
bit_for_each64(maybe_pinner, tmp, attackers) {
bitboard_t between = bb_between_excl[maybe_pinner][sq];
if (popcount64(between & lines) == 1)
pinners |= mask(maybe_pinner);
pinners |= BIT(maybe_pinner);
}
# ifdef DEBUG_ATTACK_ATTACKERS1
char str[32];