[][src]Trait shakmaty::FromSetup

pub trait FromSetup: Sized {
    pub fn from_setup(
        setup: &dyn Setup,
        mode: CastlingMode
    ) -> Result<Self, PositionError<Self>>; }

Validate and set up an arbitrary position. All provided chess variants support this.

Required methods

pub fn from_setup(
    setup: &dyn Setup,
    mode: CastlingMode
) -> Result<Self, PositionError<Self>>
[src]

Set up a position.

Errors

Returns PositionError if the setup does not meet basic validity requirements. Meeting the requirements does not imply that the position is actually reachable with a series of legal moves from the starting position.

Loading content...

Implementors

impl FromSetup for Antichess[src]

impl FromSetup for Atomic[src]

impl FromSetup for Chess[src]

impl FromSetup for Crazyhouse[src]

impl FromSetup for Horde[src]

impl FromSetup for KingOfTheHill[src]

impl FromSetup for RacingKings[src]

impl FromSetup for ThreeCheck[src]

Loading content...