diff options
Diffstat (limited to 'src/board/io.rs')
-rw-r--r-- | src/board/io.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/board/io.rs b/src/board/io.rs index cb73c52..b5cd95e 100644 --- a/src/board/io.rs +++ b/src/board/io.rs @@ -1,9 +1,8 @@ use std::io::{stdin, stdout, Write}; -use rand::{rngs::StdRng,SeedableRng,Rng}; use crate::{bitboard::Bitboard, attacks::Attacks, moves::Move, square::Square}; -use super::{Board, PieceType, ttable::TTABLE_SIZE}; +use super::{Board, PieceType, ttable::TTABLE_SIZE, zobrist::Zobrist}; const PIECE_CHARS: [&str; 12] = [ "♟︎", "♞", "♝", "♜", "♛", "♚", @@ -91,8 +90,6 @@ impl IO for Board { } } - let mut rng = StdRng::seed_from_u64(228); - let zobrist_seed = [(); 781].map(|_| rng.gen()); let mut board = Self { piece_sets, @@ -103,10 +100,10 @@ impl IO for Board { ep_target: None, // TODO: parse from FEN hash: 0, transposition_table: vec![None; TTABLE_SIZE as usize], - zobrist_seed, + zobrist_seed: Board::seed(), }; board.update_occupancy(); - board.update_zobrist_hash(); + board.compute_hash(); board } |