- // Threat gives a discovered check through the move's checking piece
- if (matt & pos.king_square(pos.side_to_move()))
- {
- assert(between_bb(mto, pos.king_square(pos.side_to_move())) & tfrom);
- return true;
- }
-
- return false;
- }
-
-
- // prevents_threat() tests whether a move is able to defend against the so
- // called threat move (the best move returned from a null search that fails
- // low). In this case will not be pruned.
-
- bool prevents_threat(const Position& pos, Move move, Move threat) {
-
- assert(is_ok(move));
- assert(is_ok(threat));
- assert(!pos.is_capture_or_promotion(move));
- assert(!pos.is_passed_pawn_push(move));
-
- Square mfrom = from_sq(move);
- Square mto = to_sq(move);
- Square tfrom = from_sq(threat);
- Square tto = to_sq(threat);
+ Square m1from = from_sq(first);
+ Square m2from = from_sq(second);
+ Square m1to = to_sq(first);
+ Square m2to = to_sq(second);