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: usizedefault_char: charmaximizer: charminimizer: char

Implementations

impl TicTacToe[src]

pub fn create_game(
    size: usize,
    default_char: Option<char>,
    maximizer: Option<char>,
    minimizer: Option<char>
) -> TicTacToe
[src]

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]

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

Blanket Implementations

impl<T> AlphaBetaMiniMaxStrategy for T where
    T: Strategy
[src]

pub fn get_best_move(&mut Self, i64, bool) -> <T as Strategy>::Move[src]

pub fn minimax_score(&mut Self, i64, bool, f64, f64, i64) -> f64[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.