sample game segment

This commit is contained in:
2025-01-28 13:07:03 -05:00
parent ef9a07242d
commit afef9f1b19
4 changed files with 55 additions and 5 deletions

View File

@@ -31,6 +31,15 @@ pub struct QueueAgent {
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: &Board) -> Option<(usize, usize)> {
self.moves.pop_front()