X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftypes.h;h=c1598561812d949d775bd801d26cc803b61538c8;hb=110068808b51344ac59f8c6a0846f5dfdf670392;hp=0c512f5bf3f7544afcae25a0cb451fb31d952ece;hpb=ab5cd8340f2f7f8730aa7c77476edf4a98a166e4;p=stockfish diff --git a/src/types.h b/src/types.h index 0c512f5b..c1598561 100644 --- a/src/types.h +++ b/src/types.h @@ -455,6 +455,11 @@ constexpr bool is_ok(Move m) { return from_sq(m) != to_sq(m); // Catch MOVE_NULL and MOVE_NONE } +/// Based on a congruential pseudo random number generator +constexpr Key make_key(uint64_t seed) { + return seed * 6364136223846793005ULL + 1442695040888963407ULL; +} + #endif // #ifndef TYPES_H_INCLUDED #include "tune.h" // Global visibility to tuning setup