Struct poirebot::genius::Brain[][src]

pub struct Brain {
    pub color: Color,
    pub last_move: Option<Move>,
    pub opponent_last_move: Option<Move>,
    // some fields omitted
}

Fields

color: Color

This brain’s color.

last_move: Option<Move>

The last move by the brain.

opponent_last_move: Option<Move>

The last move by the opponent.

Implementations

impl Brain[src]

pub fn new(board: Board, color: Color) -> Self[src]

Create a new brain with the given board and color.

pub fn opponent_move(&mut self, m: Move)[src]

Apply a move from the opponent.

pub fn own_move(&mut self, m: Move)[src]

Apply a move by the brain.

pub fn choose_move(&mut self, sensor: Sender<Option<Move>>)[src]

Select a move for the brain.

Trait Implementations

impl Clone for Brain[src]

impl Copy for Brain[src]

impl Debug for Brain[src]

Auto Trait Implementations

impl RefUnwindSafe for Brain

impl Send for Brain

impl Sync for Brain

impl Unpin for Brain

impl UnwindSafe for Brain

Blanket Implementations

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

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

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

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,