Struct minimax_alpha_beta::tictactoe::TicTacToe [−][src]
pub struct TicTacToe { pub board: Vec<char>, pub size: usize, pub default_char: char, pub maximizer: char, pub minimizer: char, }
Fields
board: Vec<char>
size: usize
default_char: char
maximizer: char
minimizer: char
Implementations
impl TicTacToe
[src]
impl TicTacToe
[src]pub fn create_game(
size: usize,
default_char: Option<char>,
maximizer: Option<char>,
minimizer: Option<char>
) -> TicTacToe
[src]
size: usize,
default_char: Option<char>,
maximizer: Option<char>,
minimizer: Option<char>
) -> TicTacToe
pub fn print_board(&self)
[src]
pub fn check_diagonals(&self) -> char
[src]
pub fn check_cols(&self) -> char
[src]
Trait Implementations
impl Strategy for TicTacToe
[src]
impl Strategy for TicTacToe
[src]type Player = char
type Move = usize
type Board = Vec<char>
fn evaluate(&self) -> f64
[src]
fn get_winner(&self) -> Self::Player
[src]
fn is_game_tied(&self) -> bool
[src]
fn is_game_complete(&self) -> bool
[src]
fn get_available_moves(&self) -> Vec<Self::Move>
[src]
fn play(&mut self, mv: &Self::Move, maximizer: bool)
[src]
fn clear(&mut self, mv: &Self::Move)
[src]
fn get_board(&self) -> &Self::Board
[src]
fn is_a_valid_move(&self, mv: &Self::Move) -> bool
[src]
fn get_a_sentinel_move(&self) -> Self::Move
[src]
Auto Trait Implementations
impl RefUnwindSafe for TicTacToe
impl Send for TicTacToe
impl Sync for TicTacToe
impl Unpin for TicTacToe
impl UnwindSafe for TicTacToe
Blanket Implementations
impl<T> AlphaBetaMiniMaxStrategy for T where
T: Strategy,
[src]
impl<T> AlphaBetaMiniMaxStrategy for T where
T: Strategy,
[src]impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more