Enum shakmaty::Move[][src]

pub enum Move {
    Normal {
        role: Role,
        from: Square,
        capture: Option<Role>,
        to: Square,
        promotion: Option<Role>,
    },
    EnPassant {
        from: Square,
        to: Square,
    },
    Castle {
        king: Square,
        rook: Square,
    },
    Put {
        role: Role,
        to: Square,
    },
}

Information about a move.

Variants

Fields of Normal

Fields of EnPassant

Fields of Castle

Fields of Put

Methods

impl Move
[src]

Gets the role of the moved piece.

Gets the origin square or None for drops.

Gets the target square. For castling moves this is the corresponding rook square.

Gets the role of the captured piece or None.

Checks if the move is a capture.

Checks if the move is en passant.

Checks if the move zeros the half-move clock.

Gets the castling side.

Checks if the move is a castling move.

Gets the promotion role.

Checks if the move is a promotion.

Trait Implementations

impl Clone for Move
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Move
[src]

impl PartialEq for Move
[src]

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

This method tests for !=.

impl Debug for Move
[src]

Formats the value using the given formatter. Read more

impl Display for Move
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Move

impl Sync for Move