Struct retroboard::RetroBoard[][src]

pub struct RetroBoard { /* fields omitted */ }
Expand description

A shakmaty::Board where Unmove are played and all legal Unmove can be generated. At every time the position must be legal. This does include unreachable positions, like this position.

Implementations

Returns a new RetroBoard with empty RetroPocket for both colors.

Returns a new RetroBoard with defined RetroPocket, see RetroPocket::from_str documentation to see which string format is expected.

Examples
use retroboard::RetroBoard;
let r = RetroBoard::new("3k4/8/8/8/8/8/8/2RKR3 w - - 0 1", "PNQ1", "7BBBB").unwrap();

Generate legal unmoves, which are all the pseudo legal unmoves which do not put the opponent’s king in check. If the opponent’s king is in check at the beginning of our turn, the only legal unmoves are those which stop it from being in check.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Consider valid positions with too many/impossible checkers (unreachable positions)

Performs the conversion.

Feeds this value into the given Hasher. Read more

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

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.