Struct chess_move_gen::Move
[−]
[src]
pub struct Move { /* fields omitted */ }
Represents a move on the chess board. Uses a compact 16 bit representation
Methods
impl Move
[src]
fn from(&self) -> Square
fn to(&self) -> Square
fn promote_to(&self) -> Kind
fn distance(&self) -> i32
Returns the absolute distance moved. Eg for a push from square 8 to square 24: |24 - 8| = 16
fn is_castle(&self) -> bool
fn is_capture(&self) -> bool
fn is_ep_capture(&self) -> bool
fn is_promotion(&self) -> bool
fn castle(&self) -> Castle
fn to_string(&self) -> String
fn new_push(from: Square, to: Square) -> Move
fn new_capture(from: Square, to: Square) -> Move
fn new_castle(castle: Castle) -> Move
fn new_promotion(from: Square, to: Square, promote_to: Kind) -> Move
fn new_capture_promotion(from: Square, to: Square, promote_to: Kind) -> Move
fn new_ep_capture(from: Square, to: Square) -> Move
Trait Implementations
impl Copy for Move
[src]
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 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 !=
.