[−]Enum myopic_brain::Side
Represents the two different teams in a game of chess.
Variants
Implementations
impl Side
pub fn pawn_dir(self) -> Dir
Get the vertical direction in which a pawn on this side moves (north or south).
pub fn pawn_first_rank(self) -> BitBoard
Get the rank on which a pawn on this side starts the game.
pub fn pawn_third_rank(self) -> BitBoard
Get the rank to which a pawn on this side moves to following it's special two rank first move.
pub fn pawn_promoting_from_rank(self) -> BitBoard
Get the rank a pawn on this side must be on for it to be able to promote on it's next move.
pub fn pawn_promoting_dest_rank(self) -> BitBoard
The rank a pawn on this side will end up on after promoting to another piece.
Trait Implementations
impl Clone for Side
pub fn clone(&self) -> Side
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Side
impl Debug for Side
impl Display for Side
impl Eq for Side
impl FromStr for Side
type Err = Error
The associated error which can be returned from parsing.
pub fn from_str(s: &str) -> Result<Side, <Side as FromStr>::Err>
impl Hash for Side
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Side
pub fn cmp(&self, other: &Side) -> Ordering
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Side> for Side
impl PartialOrd<Side> for Side
pub fn partial_cmp(&self, other: &Side) -> Option<Ordering>
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Reflectable for Side
impl StructuralEq for Side
impl StructuralPartialEq for Side
Auto Trait Implementations
impl RefUnwindSafe for Side
[src]
impl Send for Side
[src]
impl Sync for Side
[src]
impl Unpin for Side
[src]
impl UnwindSafe for Side
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,