diff --git a/mino/src/piece.rs b/mino/src/piece.rs index 96f12f6..d4da7e1 100644 --- a/mino/src/piece.rs +++ b/mino/src/piece.rs @@ -5,7 +5,7 @@ use crate::matrix::Mat; use core::ops::Range; /// Represents a location for a piece, including its orientation. -#[derive(Copy, Clone, Eq, PartialEq, Debug, Hash)] +#[derive(Copy, Clone, Eq, PartialEq, Hash)] pub struct Loc { /// Horizontal coordinate. pub x: i16, @@ -29,6 +29,12 @@ impl From<(i16, i16)> for Loc { } } +impl core::fmt::Debug for Loc { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + (self.x, self.y, self.r).fmt(f) + } +} + /// Represents a rotation state for a piece. The initial state is "north" (`N`), and there /// are 4 total orientations to represent each 90 degree turn possible. #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Default, Hash)]