diff --git a/src/repr.rs b/src/repr.rs index 985d770..731fb9e 100644 --- a/src/repr.rs +++ b/src/repr.rs @@ -23,6 +23,14 @@ impl Piece { } } +impl std::ops::Not for Piece { + type Output = Piece; + + fn not(self) -> Self::Output { + self.flip() + } +} + const BOARD_SIZE: usize = 8; #[derive(Copy, Clone)]