[][src]Trait turk::GameState

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> { ... } }

Associated Types

type Move: Clone

Loading content...

Required methods

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

Loading content...

Provided methods

fn can_move(&self) -> bool

fn solve(&self, depth: usize) -> Option<Self::Move>

Loading content...

Implementors

Loading content...