remove QueueAgent

This commit is contained in:
2025-01-28 16:16:20 -05:00
parent 78ce4d4973
commit 652ea97f83
2 changed files with 0 additions and 38 deletions

View File

@@ -1,5 +1,4 @@
use crate::{board::Board, piece::Piece};
use std::collections::VecDeque;
pub trait Agent {
fn next_move(&mut self, board: &Board) -> Option<(usize, usize)>;
@@ -24,31 +23,3 @@ impl Agent for ManualAgent {
self.color
}
}
pub struct QueueAgent {
moves: VecDeque<(usize, usize)>,
color: Piece,
}
impl QueueAgent {
pub fn new(moves: impl IntoIterator<Item = (usize, usize)>, color: Piece) -> Self {
Self {
moves: moves.into_iter().collect(),
color,
}
}
}
impl Agent for QueueAgent {
fn next_move(&mut self, _: &Board) -> Option<(usize, usize)> {
self.moves.pop_front()
}
fn name(&self) -> &'static str {
"Queue Agent"
}
fn color(&self) -> Piece {
self.color
}
}