else
phaseIndex = (noCaptures ? NoMovesPhaseIndex : QsearchWithoutChecksPhaseIndex);
- dc = p.discovered_check_candidates(us);
- pinned = p.pinned_pieces(p.side_to_move());
-
finished = false;
}
if (ttMove != MOVE_NONE)
{
assert(move_is_ok(ttMove));
- if (move_is_legal(pos, ttMove, pinned))
+ if (move_is_legal(pos, ttMove))
return ttMove;
}
break;
if (mateKiller != MOVE_NONE)
{
assert(move_is_ok(mateKiller));
- if (move_is_legal(pos, mateKiller, pinned))
+ if (move_is_legal(pos, mateKiller))
return mateKiller;
}
break;
break;
case PH_QCHECKS:
- numOfMoves = generate_checks(pos, moves, dc);
+ numOfMoves = generate_checks(pos, moves);
movesPicked = 0;
break;
moves[bestIndex] = moves[movesPicked++];
if ( move != ttMove
&& move != mateKiller
- && pos.pl_move_is_legal(move, pinned))
+ && pos.pl_move_is_legal(move))
return move;
}
break;
moves[bestIndex] = moves[movesPicked++];
if ( move != ttMove
&& move != mateKiller
- && pos.pl_move_is_legal(move, pinned))
+ && pos.pl_move_is_legal(move))
return move;
}
break;
move = badCaptures[movesPicked++].move;
if ( move != ttMove
&& move != mateKiller
- && pos.pl_move_is_legal(move, pinned))
+ && pos.pl_move_is_legal(move))
return move;
}
break;
moves[bestIndex] = moves[movesPicked++];
// Remember to change the line below if we decide to hash the qsearch!
// Maybe also postpone the legality check until after futility pruning?
- if (/* move != ttMove && */ pos.pl_move_is_legal(move, pinned))
+ if (/* move != ttMove && */ pos.pl_move_is_legal(move))
return move;
}
break;
{
move = moves[movesPicked++].move;
// Remember to change the line below if we decide to hash the qsearch!
- if (/* move != ttMove && */ pos.pl_move_is_legal(move, pinned))
+ if (/* move != ttMove && */ pos.pl_move_is_legal(move))
return move;
}
break;