diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-01-25 06:50:10 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-01-25 06:50:10 +0300 |
commit | 5efe1af18bd92533154d02a90cf2181452809087 (patch) | |
tree | 0de69513d41c01381d746ddbc95980bcb1ebc21a /src | |
parent | 87e7b1341647bf24c21771c9fa5be5ff10e97e73 (diff) | |
download | chessnost-5efe1af18bd92533154d02a90cf2181452809087.tar.gz |
feat: use constant RNG seed
Diffstat (limited to 'src')
-rw-r--r-- | src/board/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/board/mod.rs b/src/board/mod.rs index 61327eb..19c25ac 100644 --- a/src/board/mod.rs +++ b/src/board/mod.rs @@ -1,4 +1,4 @@ -use rand::Rng; +use rand::{rngs::StdRng,SeedableRng,Rng}; use crate::{bitboard::{Bitboard, serialize_bitboard, bitscan, pop_count}, moves::{Move, MoveKind}, attacks::Attacks, square::Square}; use self::ttable::{TranspositionTable, TTABLE_SIZE}; @@ -126,7 +126,7 @@ impl Board { } } - let mut rng = rand::thread_rng(); + let mut rng = StdRng::seed_from_u64(228); let zobrist_seed = [(); 781].map(|_| rng.gen()); let mut board = Self { |