assert(is_ok(m));
- // Castling moves are implemented as king capturing the rook so cannot be
- // handled correctly. Simply assume the SEE value is VALUE_ZERO that is always
- // correct unless in the rare case the rook ends up under attack.
- if (type_of(m) == CASTLING)
+ // Only deal with normal moves, assume others pass a simple see
+ if (type_of(m) != NORMAL)
return VALUE_ZERO >= threshold;
Square from = from_sq(m), to = to_sq(m);
Value balance; // Values of the pieces taken by us minus opponent's ones
Bitboard occupied, stmAttackers;
- if (type_of(m) == ENPASSANT)
- {
- occupied = SquareBB[to - pawn_push(~stm)]; // Remove the captured pawn
- balance = PieceValue[MG][PAWN];
- }
- else
- {
- balance = PieceValue[MG][piece_on(to)];
- occupied = 0;
- }
+ balance = PieceValue[MG][piece_on(to)];
+ occupied = 0;
if (balance < threshold)
return false;