cleanup
This commit is contained in:
11
src/attack.c
11
src/attack.c
@@ -117,16 +117,8 @@ bitboard_t sq_attackers(const pos_t *pos, const bitboard_t occ, const square_t s
|
||||
to = pos->bb[c][PAWN];
|
||||
tmp = bb_pawns_attacks(sqbb, sq_up(opp)) & to;
|
||||
attackers |= tmp;
|
||||
//to = pos->bb[c][PAWN];
|
||||
//tmp = pawn_shift_upleft(sqbb, opp) & to;
|
||||
//attackers |= tmp;
|
||||
# ifdef DEBUG_ATTACK_ATTACKERS
|
||||
bb_print("att pawn upleft", tmp);
|
||||
# endif
|
||||
//tmp = pawn_shift_upright(sqbb, opp) & to;
|
||||
//attackers |= tmp;
|
||||
# ifdef DEBUG_ATTACK_ATTACKERS
|
||||
bb_print("att pawn upright", tmp);
|
||||
bb_print("att pawn", tmp);
|
||||
# endif
|
||||
|
||||
/* knight & king */
|
||||
@@ -158,7 +150,6 @@ bitboard_t sq_attackers(const pos_t *pos, const bitboard_t occ, const square_t s
|
||||
# ifdef DEBUG_ATTACK_ATTACKERS
|
||||
bb_print("att rook/queen", tmp);
|
||||
bb_print("ATTACKERS", attackers);
|
||||
printf("attackers=%lx\n", attackers);
|
||||
# endif
|
||||
|
||||
return attackers;
|
||||
|
@@ -95,10 +95,10 @@ bool pseudo_is_legal(const pos_t *pos, const move_t move)
|
||||
* One case not handled anywhere else: when the two "disappearing" pawns
|
||||
* would discover a R/Q horizontal check.
|
||||
*/
|
||||
if (is_enpassant(move)) {
|
||||
bitboard_t rank5 = bb_rel_rank(RANK_1, us);
|
||||
if (unlikely(is_enpassant(move))) {
|
||||
bitboard_t rank5 = bb_rel_rank(RANK_5, us);
|
||||
|
||||
if ((pos->bb[us][KING] & rank5)) {
|
||||
if (unlikely((pos->bb[us][KING] & rank5))) {
|
||||
bitboard_t exclude = BIT(pos->en_passant - sq_up(us)) | BIT(from);
|
||||
bitboard_t rooks = (pos->bb[them][ROOK] | pos->bb[them][QUEEN]) & rank5;
|
||||
|
||||
|
Reference in New Issue
Block a user