// Skip TT move if is not a capture or a promotion, this avoids
// qsearch tree explosion due to a possible perpetual check or
// similar rare cases when TT table is full.
// Skip TT move if is not a capture or a promotion, this avoids
// qsearch tree explosion due to a possible perpetual check or
// similar rare cases when TT table is full.
- cur->score = piece_value_midgame(pos.piece_on(move_to(m)))
- - piece_type(pos.piece_on(move_from(m)));
+ cur->score = PieceValueMidgame[pos.piece_on(move_to(m))]
+ - type_of(pos.piece_on(move_from(m)));
m = cur->move;
if ((seeScore = pos.see_sign(m)) < 0)
cur->score = seeScore - History::MaxValue; // Be sure we are at the bottom
m = cur->move;
if ((seeScore = pos.see_sign(m)) < 0)
cur->score = seeScore - History::MaxValue; // Be sure we are at the bottom
- else if (pos.move_is_capture(m))
- cur->score = piece_value_midgame(pos.piece_on(move_to(m)))
- - piece_type(pos.piece_on(move_from(m))) + History::MaxValue;
+ else if (pos.is_capture(m))
+ cur->score = PieceValueMidgame[pos.piece_on(move_to(m))]
+ - type_of(pos.piece_on(move_from(m))) + History::MaxValue;