Enum pleco::core::PieceType [−][src]
#[repr(u8)]pub enum PieceType { None, P, N, B, R, Q, K, All, }
All possible Types of Pieces on a chessboard.
For a representation of pieces considering color as well, see Piece
Variants
None
P
N
B
R
Q
K
All
Methods
impl PieceType
[src]
impl PieceType
pub fn value(&self) -> i8
[src]
pub fn value(&self) -> i8
Returns the relative value of a piece.
Used for sorting moves.
pub fn is_none(self) -> bool
[src]
pub fn is_none(self) -> bool
Returns if the piece is PieceType::None
pub fn is_some(self) -> bool
[src]
pub fn is_some(self) -> bool
Returns if the piece is not PieceType::None
pub fn is_real(self) -> bool
[src]
pub fn is_real(self) -> bool
Checks if the piece is actually real, as in the Piece is not None
or All
.
pub fn char_lower(&self) -> char
[src]
pub fn char_lower(&self) -> char
Return the lowercase character of a Piece
.
pub fn char_upper(&self) -> char
[src]
pub fn char_upper(&self) -> char
Return the uppercase character of a Piece
.
Trait Implementations
impl Copy for PieceType
[src]
impl Copy for PieceType
impl Clone for PieceType
[src]
impl Clone for PieceType
fn clone(&self) -> PieceType
[src]
fn clone(&self) -> PieceType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for PieceType
[src]
impl PartialEq for PieceType
fn eq(&self, other: &PieceType) -> bool
[src]
fn eq(&self, other: &PieceType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]This method tests for !=
.
impl Debug for PieceType
[src]
impl Debug for PieceType
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for PieceType
[src]
impl Display for PieceType