elo: multithreading improvements

This commit is contained in:
2025-03-03 11:06:24 -05:00
parent c368ffc495
commit 6d920ce5af
2 changed files with 20 additions and 24 deletions

View File

@@ -4,7 +4,8 @@ use std::io;
use std::io::prelude::*;
#[allow(dead_code)]
pub trait Agent {
// implements `Send` so we can use it in a multithreaded `EloArena`
pub trait Agent: Send {
/// Returns the move of an [`Agent`]
fn next_move(&mut self, board: &Board) -> Option<CoordPair>;
/// Returns the name of the [`Agent`]