Trait GameState
turk
pub trait GameState: Clone { type Move: Clone; fn next_player(&self) -> Player; fn apply_move(&mut self, mov: Self::Move); fn for_each_move<F: FnMut(Self::Move)>(&self, f: F); fn eval_score(&self, player: Player) -> i32; fn can_move(&self) -> bool { ... } fn solve(&self, depth: usize) -> Option<Self::Move> { ... } }
type Move: Clone
fn next_player(&self) -> Player
fn apply_move(&mut self, mov: Self::Move)
fn for_each_move<F: FnMut(Self::Move)>(&self, f: F)
fn eval_score(&self, player: Player) -> i32
fn can_move(&self) -> bool
fn solve(&self, depth: usize) -> Option<Self::Move>