Files
rttt/player/mod.rs

11 lines
346 B
Rust
Raw Normal View History

2025-04-06 18:37:49 +03:00
mod human;
2025-04-07 02:04:18 +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:04:18 +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>>;
2026-01-04 17:45:57 +03:00
fn message(&self, msg: &str) -> Result<(), Box<dyn std::error::Error>>;
2025-04-06 18:37:49 +03:00
}