aboutsummaryrefslogtreecommitdiff
path: root/src/board/zobrist.rs
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2023-02-21 14:04:22 +0300
committereug-vs <eugene@eug-vs.xyz>2023-02-21 14:04:35 +0300
commit5e9543dcc6a012aef73d342080bfec46690b5446 (patch)
tree430450db80ebbee4ae2f8a6f54d5bd62c8eb8771 /src/board/zobrist.rs
parent0d5c2eb1666d3038fa87895cc98eadc673c54a3a (diff)
downloadchessnost-5e9543dcc6a012aef73d342080bfec46690b5446.tar.gz
refactor: use Zobirst methods in make_move
Diffstat (limited to 'src/board/zobrist.rs')
-rw-r--r--src/board/zobrist.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/board/zobrist.rs b/src/board/zobrist.rs
index e282074..8ea0038 100644
--- a/src/board/zobrist.rs
+++ b/src/board/zobrist.rs
@@ -71,9 +71,6 @@ impl Zobrist for Board {
}
fn zobrist_toggle_color(&mut self) -> () {
- self.hash ^= match self.zobrist_seed.last() {
- Some(x) => x,
- None => panic!("Something is wrong with zobrist seed list"),
- };
+ self.hash ^= self.zobrist_seed[ZOBRIST_SEED_SIZE - 1];
}
}