Struct chess::ChessMove
[−]
[src]
pub struct ChessMove { // some fields omitted }
Represent a ChessMove in memory
Methods
impl ChessMove
[src]
fn new(source: Square, dest: Square, promotion: Option<Piece>) -> ChessMove
Create a new chess move, given a source Square
, a destination Square, and an optional promotion
Piece`
fn get_source(&self) -> Square
Get the source square (square the piece is currently on).
fn get_dest(&self) -> Square
Get the destination square (square the piece is going to).
fn get_promotion(&self) -> Option<Piece>
Get the promotion piece (maybe).
Trait Implementations
impl PartialEq for ChessMove
[src]
fn eq(&self, __arg_0: &ChessMove) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ChessMove) -> bool
This method tests for !=
.
impl PartialOrd for ChessMove
[src]
fn partial_cmp(&self, __arg_0: &ChessMove) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &ChessMove) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &ChessMove) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &ChessMove) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &ChessMove) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Copy for ChessMove
[src]
impl Clone for ChessMove
[src]
fn clone(&self) -> ChessMove
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