Here's the code:
Code: Select all
if (can_do_null_move(board, pv, ply, alpha, beta)){
//-- Make the changes on the board
make_null_move(board, undo);
//-- Store the move in the PV data
pv->current_move = NULL;
//-- Evaluate the new board position
evaluate(board, next_pv->eval);
//-- Find the new score
e = -alphabeta(board, ply + 1, depth - NULL_REDUCTION - 1, -beta, -beta + 1);
//-- undo the null move
unmake_null_move(board, undo);
//-- is it good enough for a cut-off?
if (e >= beta)
return e;
}
Steve