private static void Fill(ulong[] array, MTRandom random) { for (int i = 0; i < array.Length; i++) { array[i] = random.genrand_int64(); } }
static ZobristHashing() { var random = new MTRandom(0); PieceHashes = new ulong[2 * (int)PieceType.Count * 64]; Fill(PieceHashes, random); EnPassantHashes = new ulong[64]; Fill(EnPassantHashes, random); CastlingHashes = new ulong[64]; Fill(CastlingHashes, random); WhiteSideHash = random.genrand_int64(); }
private ulong GetSparseRandomUlong() { return(_random.genrand_int64() & _random.genrand_int64() & _random.genrand_int64()); }