[−][src]Enum myopic_core::CastleZone
Represents one of the four different areas on a chessboard where the special castling move can take place (two for each side).
Variants
Implementations
impl CastleZone
[src]
pub fn kingside(side: Side) -> CastleZone
[src]
Return the kingside zone for the given side.
pub fn queenside(side: Side) -> CastleZone
[src]
Return the queenside zone for the given side.
pub fn iter() -> impl Iterator<Item = CastleZone>
[src]
Create an iterator traversing all zones in order.
pub fn source_squares(self) -> BitBoard
[src]
Returns a set of exactly two squares which denote the required locations of the king and rook in order for the corresponding castle move to take place.
pub fn rook_data(self) -> (Piece, Square, Square)
[src]
Returns a triple containing the rook which moves in the corresponding castle move along with it's required start square followed by the square it will finish on.
pub fn king_data(self) -> (Piece, Square, Square)
[src]
Returns a triple containing the king which moves in the corresponding castle move along with it's required start square followed by the square it will finish on.
pub fn unoccupied_requirement(self) -> BitBoard
[src]
Returns a set containing the squares which are required to be free of any other pieces in order for the corresponding castle move to be legal.
pub fn uncontrolled_requirement(self) -> BitBoard
[src]
Returns a set containing the squares which are required to be free of enemy control in order for the corresponding castle move to be legal.
pub fn lift(self) -> CastleZoneSet
[src]
Lifts this zone to a set of one element.
Trait Implementations
impl Clone for CastleZone
[src]
pub fn clone(&self) -> CastleZone
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for CastleZone
[src]
impl Debug for CastleZone
[src]
impl Eq for CastleZone
[src]
impl FromIterator<CastleZone> for CastleZoneSet
[src]
pub fn from_iter<T: IntoIterator<Item = CastleZone>>(iter: T) -> Self
[src]
impl Hash for CastleZone
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for CastleZone
[src]
pub fn cmp(&self, other: &CastleZone) -> Ordering
[src]
#[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<CastleZone> for CastleZone
[src]
pub fn eq(&self, other: &CastleZone) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<CastleZone> for CastleZone
[src]
pub fn partial_cmp(&self, other: &CastleZone) -> Option<Ordering>
[src]
#[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 CastleZone
[src]
A castle is reflected by it's side, i.e.
- WK <==> BK
- WQ <==> BQ
impl StructuralEq for CastleZone
[src]
impl StructuralPartialEq for CastleZone
[src]
Auto Trait Implementations
impl RefUnwindSafe for CastleZone
[src]
impl Send for CastleZone
[src]
impl Sync for CastleZone
[src]
impl Unpin for CastleZone
[src]
impl UnwindSafe for CastleZone
[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, 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>,