Enum chess_pgn_parser::Move [] [src]

pub enum Move {
    BasicMove {
        piece: Piece,
        to: Square,
        from: Square,
        is_capture: bool,
        promoted_to: Option<Piece>,
    },
    CastleKingside,
    CastleQueenside,
}

Variants

BasicMove

Fields

piece: Piece
to: Square
from: Square
is_capture: bool
promoted_to: Option<Piece>
CastleKingsideCastleQueenside

Methods

impl Move
[src]

fn new(piece: Piece, to: Square) -> Move

fn from(&self, square: Square) -> Move

fn capture(&self) -> Move

fn with_promotion(&self, piece: Piece) -> Move

fn no_mark(&self) -> MarkedMove

fn check(&self) -> MarkedMove

fn checkmate(&self) -> MarkedMove

Trait Implementations

impl Clone for Move
[src]

fn clone(&self) -> Move

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Debug for Move
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Eq for Move
[src]

impl PartialEq for Move
[src]

fn eq(&self, __arg_0: &Move) -> bool

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

fn ne(&self, __arg_0: &Move) -> bool

This method tests for !=.