alloc test

This commit is contained in:
2025-03-13 10:02:54 -04:00
parent ed5ad738e3
commit efd956d614
11 changed files with 113 additions and 12 deletions

View File

@@ -2,9 +2,11 @@ use crate::{
logic::r#move::Move,
repr::{Board, CoordPair, Piece, Winner},
};
use allocative::Allocative;
use indicatif::{ProgressIterator, ProgressStyle};
use std::{collections::HashMap, hash::BuildHasherDefault, ops::ControlFlow};
#[derive(Allocative)]
pub struct FutureMoves {
/// Arena containing all [`Move`]
arena: Vec<Move>,
@@ -23,7 +25,8 @@ pub struct FutureMoves {
board: Board,
}
#[derive(Copy, Clone)]
#[derive(Copy, Clone, Allocative)]
pub struct FutureMoveConfig {
/// Max depth of that we should try and traverse
pub max_depth: usize,
@@ -73,7 +76,7 @@ impl std::fmt::Display for FutureMoveConfig {
}
}
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, Allocative)]
#[allow(dead_code)]
pub enum ChildrenEvalMethod {
/// Best (by far) strat compared to Max or Min