}
void MovePicker::score_noncaptures() {
- // First score by history, when no history is available then use
- // piece/square tables values. This seems to be better then a
- // random choice when we don't have an history for any move.
+ // Score by history and max gain for the move.
Move m;
Piece piece;
Square from, to;
case PH_TT_MOVES:
move = (curMove++)->move;
if ( move != MOVE_NONE
- && move_is_legal(pos, move, pinned))
+ && pos.move_is_legal(move, pinned))
return move;
break;
case PH_KILLERS:
move = (curMove++)->move;
if ( move != MOVE_NONE
- && move_is_legal(pos, move, pinned)
+ && pos.move_is_legal(move, pinned)
&& move != ttMoves[0].move
&& move != ttMoves[1].move
&& !pos.move_is_capture(move))