2025-04-06 18:37:49 +03:00
|
|
|
mod human;
|
2025-04-07 02:28:36 +03:00
|
|
|
use crate::game::{Board, Cell, Move};
|
2025-04-06 18:37:49 +03:00
|
|
|
|
|
|
|
pub use human::PlayerConsole;
|
|
|
|
|
|
|
|
pub trait Player {
|
2025-04-07 02:28:36 +03:00
|
|
|
fn start_new_game(&mut self, p: Cell) -> Result<(), Box<dyn std::error::Error>>;
|
2025-04-06 18:37:49 +03:00
|
|
|
fn request_move(&self, b: &Board) -> Result<Move, Box<dyn std::error::Error>>;
|
|
|
|
fn name(&self) -> &str;
|
|
|
|
}
|