Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions engine/src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,11 @@ impl<'a, Log: LogLevel> Search<'a, Log> {
return score;
}

// don't bother searching if the board is in a draw state
if board.is_draw() {
return Score::DRAW;
}

// get all legal moves
let mut move_list = MoveList::new();
let mut order_list = ArrayVec::<MoveOrder, MAX_MOVE_LIST_SIZE>::new();
Expand Down