pub struct Piece {
pub color: i16,
/* private fields */
}Fields§
§color: i16Implementations§
Source§impl Piece
impl Piece
pub fn new(piece_type: PieceType) -> Piece
pub fn get_piece_points(&self) -> Result<[Point; 4], OutOfBoundsError>
pub fn move_piece(&mut self, direction: &TetrisDirection)
pub fn rotate_piece(&mut self, rotation: &Rotation)
Trait Implementations§
impl Copy 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