pub enum Piece {
Show 15 variants
None,
Pawn,
Lance,
Knight,
Silver,
Gold,
Bishop,
Rook,
King,
ProPawn,
ProLance,
ProKnight,
ProSilver,
ProBishop,
ProRook,
}Variants§
None
Pawn
Lance
Knight
Silver
Gold
Bishop
Rook
King
ProPawn
ProLance
ProKnight
ProSilver
ProBishop
ProRook
Implementations§
Source§impl Piece
impl Piece
pub fn to_byte(&self) -> u8
pub fn to_usize(&self) -> usize
pub fn promote(&self) -> Option<Piece>
pub fn to_csa(&self) -> String
pub fn to_sfen(&self) -> char
pub fn revert_promotion(&self) -> Option<Piece>
pub fn is_valid_promotion(&self, promoted: &Piece) -> bool
pub fn is_promoted(&self) -> bool
pub const fn max_piece_in_hand(&self) -> usize
pub fn generate_moves( &self, from: &Square, occupied: &[Bitboard; 2], moves: &mut Vec<Square>, )
Trait Implementations§
impl Copy for Piece
impl Eq for Piece
impl StructuralPartialEq for Piece
Auto Trait Implementations§
impl Freeze for Piece
impl RefUnwindSafe for Piece
impl Send for Piece
impl Sync for Piece
impl Unpin for Piece
impl UnwindSafe for Piece
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more