This commit is contained in:
Simon Gardling 2025-01-28 13:14:01 -05:00
parent afef9f1b19
commit 1803176a24
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
2 changed files with 11 additions and 11 deletions

View File

@ -13,7 +13,7 @@ pub struct ManualAgent {
}
impl Agent for ManualAgent {
fn next_move(&mut self, board: &Board) -> Option<(usize, usize)> {
fn next_move(&mut self, _: &Board) -> Option<(usize, usize)> {
todo!("user input not implemented")
}
@ -41,7 +41,7 @@ impl QueueAgent {
}
impl Agent for QueueAgent {
fn next_move(&mut self, board: &Board) -> Option<(usize, usize)> {
fn next_move(&mut self, _: &Board) -> Option<(usize, usize)> {
self.moves.pop_front()
}
@ -59,7 +59,7 @@ pub struct AutoAgent {
}
impl Agent for AutoAgent {
fn next_move(&mut self, board: &Board) -> Option<(usize, usize)> {
fn next_move(&mut self, _: &Board) -> Option<(usize, usize)> {
todo!("next_move not implemented")
}
@ -71,9 +71,3 @@ impl Agent for AutoAgent {
self.color
}
}
impl AutoAgent {
pub const fn new(color: Piece) -> Self {
Self { color }
}
}

View File

@ -8,8 +8,14 @@ mod misc;
mod repr;
fn main() {
let player1 = QueueAgent::new([(0, 0), (1, 0), (1, 2), (3, 2), (3, 0)], Piece::Black);
let player2 = QueueAgent::new([(1, 1), (2, 2), (3, 3), (3, 1), (0, 2)], Piece::White);
let player1 = QueueAgent::new(
[(0, 0), (1, 0), (1, 2), (3, 2), (3, 0), (3, 4), (0, 1)],
Piece::Black,
);
let player2 = QueueAgent::new(
[(1, 1), (2, 2), (3, 3), (3, 1), (0, 2), (4, 2), (3, 5)],
Piece::White,
);
let mut game = Game::new(Box::new(player1), Box::new(player2));
game.game_loop();
}