sample game segment
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user