Struct chess_move_gen::Square
[−]
[src]
pub struct Square(pub usize);
Represents a square on the chessboard
Methods
impl Square
[src]
fn new(s: usize) -> Square
fn to_u8(&self) -> u8
fn to_i32(&self) -> i32
fn to_u32(&self) -> u32
fn raw(&self) -> usize
fn diagonal(&self) -> usize
fn anti_diagonal(&self) -> usize
fn inc(&mut self)
fn to_usize(&self) -> usize
fn flip(&self) -> Square
fn rotate_right(&self, amount: usize) -> Square
fn rotate_left(&self, amount: usize) -> Square
fn to_str(&self) -> &'static str
fn to_string(&self) -> String
fn along_row_with_col(&self, other: Square) -> Square
fn change_row(&self, row: usize) -> Square
fn row(&self) -> usize
fn rowx8(&self) -> usize
fn col(&self) -> usize
fn from(row: usize, col: usize) -> Square
fn parse(s: &str) -> Result<Option<Square>, String>
Trait Implementations
impl PartialEq for Square
[src]
fn eq(&self, __arg_0: &Square) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Square) -> bool
This method tests for !=
.
impl PartialOrd for Square
[src]
fn partial_cmp(&self, __arg_0: &Square) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Square) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Square) -> 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: &Square) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Square) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Copy for Square
[src]
impl Clone for Square
[src]
fn clone(&self) -> Square
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