Add Zobrist hashing

This commit is contained in:
stefiosif
2024-10-06 03:31:33 +03:00
parent 70ba30ba1a
commit 28409d203a
8 changed files with 340 additions and 20 deletions

View File

@@ -290,6 +290,10 @@ pub enum Color {
}
impl Color {
pub const fn idx(self) -> usize {
self as usize
}
pub const fn opponent(self) -> Self {
match self {
Self::White => Self::Black,