Struct zero_sum::impls::tak::State [] [src]

pub struct State {
    pub p1_flatstones: u8,
    pub p1_capstones: u8,
    pub p2_flatstones: u8,
    pub p2_capstones: u8,
    pub board: Vec<Vec<Vec<Piece>>>,
    pub ply_count: u16,
    // some fields omitted
}

The state of the game.

Fields

Player 1's remaining flatstones.

Player 1's remaining capstones.

Player 2's remaining flatstones.

Player 2's remaining capstones.

The board of pieces.

The number of half-moves passed since the start.

Methods

impl State
[src]

Creates a blank state of the specified board size.

Panics

This function panics if it is passed a board size less than 3 or greater than 8.

Creates a state from the given board size and executes the given plies.

Creates a state from a string in TPS format, i.e. "[TPS \"x5/x5/x5/x5/x5 1 1\"]".

Returns None if the provided string has an error.

Trait Implementations

impl Extrapolatable<Ply> for State
[src]

Returns a list of plies that should be considered from the current state. The search system does not assume that all plies returned are correct. Read more

impl State for State
[src]

Returns the number of plies that have passed in the game.

Executes the given ply on this state. Pass None to execute a null move.

Reverts the given ply from the state. Pass None to revert a null move.

Returns None if the game has not reached a conclusion.

Returns true if the state is in a good place to allow the null move search optimization. This is optional to implement, returning a default of false. Read more

Executes each ply in plies on the result of the previous ply.

impl Debug for State
[src]

Formats the value using the given formatter.

impl Eq for State
[src]

impl PartialEq for State
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Clone for State
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for State
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for State
[src]

Formats the value using the given formatter. Read more