Skip to content

Commit

Permalink
update wolges to 1abe1bcf24b48b20203482909bf9d198c525197c
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-k committed Feb 22, 2024
1 parent af4a16b commit 8ace536
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/movegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2448,9 +2448,10 @@ impl KurniaMoveGenerator {
let play = construct_play();
if equity_pred.borrow_mut()(equity, &play) {
if borrowed.len() >= max_gen {
borrowed.pop();
*borrowed.peek_mut().unwrap() = ValuedMove { equity, play };
} else {
borrowed.push(ValuedMove { equity, play });
}
borrowed.push(ValuedMove { equity, play });
}
}

Expand Down Expand Up @@ -2533,8 +2534,7 @@ impl KurniaMoveGenerator {
);
}

self.plays = found_moves.into_inner().into_vec();
self.plays.sort_unstable();
self.plays = found_moves.into_inner().into_sorted_vec();

let _ = std::mem::replace(&mut working_buffer.multi_leaves, multi_leaves);
}
Expand Down Expand Up @@ -2579,9 +2579,10 @@ impl KurniaMoveGenerator {
let play = construct_play();
if equity_pred.borrow_mut()(equity, &play) {
if borrowed.len() >= max_gen {
borrowed.pop();
*borrowed.peek_mut().unwrap() = ValuedMove { equity, play };
} else {
borrowed.push(ValuedMove { equity, play });
}
borrowed.push(ValuedMove { equity, play });
}
}

Expand Down Expand Up @@ -2662,8 +2663,7 @@ impl KurniaMoveGenerator {
);
}

self.plays = found_moves.into_inner().into_vec();
self.plays.sort_unstable();
self.plays = found_moves.into_inner().into_sorted_vec();

let _ = std::mem::replace(&mut working_buffer.multi_leaves, multi_leaves);
}
Expand Down

0 comments on commit 8ace536

Please sign in to comment.