Skip to content

Commit f936e4f

Browse files
committed
Fix random number generator
1 parent fd9946e commit f936e4f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/engine/global.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ inline T randint(T start, T end)
2626
start = end;
2727
end = tmp;
2828
}
29-
std::default_random_engine generator;
29+
std::random_device d;
30+
std::default_random_engine generator(d());
3031
if constexpr (std::is_integral<T>()) {
3132
std::uniform_int_distribution<T> distribution(start, end);
3233
return distribution(generator);

0 commit comments

Comments
 (0)