diff --git a/src/agent.rs b/src/agent.rs index 97b058f..2a00d76 100644 --- a/src/agent.rs +++ b/src/agent.rs @@ -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 } - } -} diff --git a/src/main.rs b/src/main.rs index 8c1fa3f..86ed7e3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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(); }