impl std::ops::Not for Piece

This commit is contained in:
Simon Gardling 2025-01-28 13:16:30 -05:00
parent 1803176a24
commit 30088f228a
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -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)]