Better interface to get the current move type

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2008-10-06 05:32:09 +01:00
parent a3477af2a1
commit bbf7a94d76
3 changed files with 15 additions and 11 deletions

View File

@@ -1147,7 +1147,6 @@ namespace {
Value value, bestValue = -VALUE_INFINITE;
Bitboard dcCandidates = mp.discovered_check_candidates();
Value futilityValue = VALUE_NONE;
MovePicker::MovegenPhase moveType;
bool isCheck = pos.is_check();
bool useFutilityPruning = UseFutilityPruning
&& depth < SelectiveDepth
@@ -1156,14 +1155,14 @@ namespace {
// Loop through all legal moves until no moves remain or a beta cutoff
// occurs.
while ( bestValue < beta
&& (move = mp.get_next_move(&moveType)) != MOVE_NONE
&& (move = mp.get_next_move()) != MOVE_NONE
&& !thread_should_stop(threadID))
{
assert(move_is_ok(move));
bool singleReply = (isCheck && mp.number_of_moves() == 1);
bool moveIsCheck = pos.move_is_check(move, dcCandidates);
bool moveIsGoodCapture = (moveType == MovePicker::PH_GOOD_CAPTURES);
bool moveIsGoodCapture = (mp.current_move_type() == MovePicker::PH_GOOD_CAPTURES);
bool moveIsPassedPawnPush = pos.move_is_passed_pawn_push(move);
movesSearched[moveCount++] = ss[ply].currentMove = move;