Trait minimax_alpha_beta::strategy::game_strategy::GameStrategy
source · [−]pub trait GameStrategy {
type Player;
type Move;
type Board;
fn evaluate(&self) -> f64;
fn get_winner(&self) -> Option<Self::Player>;
fn is_game_tied(&self) -> bool;
fn is_game_complete(&self) -> bool;
fn get_available_moves(&self) -> Vec<Self::Move>;
fn play(&mut self, mv: &Self::Move, maximizer: bool);
fn clear(&mut self, mv: &Self::Move);
fn get_board(&self) -> &Self::Board;
fn is_a_valid_move(&self, mv: &Self::Move) -> bool;
fn get_a_sentinel_move(&self) -> Self::Move;
}
Required Associated Types
Required Methods
fn get_winner(&self) -> Option<Self::Player>
fn get_winner(&self) -> Option<Self::Player>
Identify a winner, if exists.
fn is_game_tied(&self) -> bool
fn is_game_tied(&self) -> bool
Identify if the game is tied.
fn is_game_complete(&self) -> bool
fn is_game_complete(&self) -> bool
Identify if the game is in a completed state.
fn get_available_moves(&self) -> Vec<Self::Move>
fn get_available_moves(&self) -> Vec<Self::Move>
Ability to produce a collection of playable legal moves in the current position.
Modify the game state by playing a given move.
fn is_a_valid_move(&self, mv: &Self::Move) -> bool
fn is_a_valid_move(&self, mv: &Self::Move) -> bool
Determine if a given move is valid.
fn get_a_sentinel_move(&self) -> Self::Move
fn get_a_sentinel_move(&self) -> Self::Move
Ability to produce a sentinel (not-playable) move.