int depth_btm (TFastNode * node, int ply, int depth, int move, bool check, int legals) { if (legals==1 && !_CAPTURE(move)) { return depth-1; } if (check) { return depth-1; } if (PIECE(move)==PAWN) { if (TARGETSQ (move) <= h2) { if (TARGETSQ(move)>=a2) { return depth-1; } if (SPECIALCASE(move)==_QUEEN_PROMOTION) { return depth-1; } } else if (TARGETSQ (move) <= h3 && node->wpieces<2 &&\ passed_bpawn (node, TARGETSQ (move))) { return depth-1; } } if (g.nullmate[ply-1]) { return depth-1; } if (_CAPTURE (move) && TARGETSQ(move)==TARGETSQ(g.path[ply-2]) &&\ piece_val[CAPTURED(move)]==piece_val[CAPTURED(g.path[ply-2])] &&\ profcap_b (node, move)) { return depth-1; } if (q_mates_K (node)) { return depth-1; } return depth-10; }
static void addcapturemove(const S_BOARD *pos,int move, S_MOVELIST *list) { ASSERT(sqonboard(FROMSQ(move))); ASSERT(sqonboard(TOSQ(move))); ASSERT(piecevalid(CAPTURED(move))); list->moves[list->count].move = move; list->moves[list->count].score = MvvLvaScores[CAPTURED(move)][pos->pieces[FROMSQ(move)]]+1000000; list->count++; }
static void AddCaptureMove(const CHESS_BOARD *pos, int move, MOVELIST *list) { ASSERT(SqOnBoard(FROMSQ(move))); ASSERT(SqOnBoard(TOSQ(move))); ASSERT(PieceValid(CAPTURED(move))); ASSERT(CheckBoard(pos)); list->moves[list->count].move = move; list->moves[list->count].score = MvvLvaScores[CAPTURED(move)][pos->pieces[FROMSQ(move)]] + 1000000; list->count++; }
static void AddCaptureMove(const S_BOARD *pos, int move, S_MOVELIST *list) { list->moves[list->count].move = move; list->moves[list->count].score = MvvLvaScores[CAPTURED(move)][pos->pieces[FROMSQ(move)]] + 1000000; list->count++; }