prune_unrelated -> refocus_tree

This commit is contained in:
Simon Gardling 2025-02-18 12:13:59 -05:00
parent 0d4ea1f3c5
commit 937a48f230
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -272,12 +272,13 @@ impl FutureMoves {
fn update_root_idx(&mut self, idx: usize) {
self.current_root = Some(idx);
self.current_depth -= self.depth_of(idx) - 1;
self.prune_unrelated();
self.refocus_tree();
self.extend_layers();
self.compute_values(0..self.arena.len());
}
fn prune_unrelated(&mut self) {
/// Rebuilds the Arena based on `self.current_root`, prunes unrelated nodes
fn refocus_tree(&mut self) {
let Some(root) = self.current_root else {
return;
};