1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 17:37:34 +00:00

Userland: Replace arc4random() with get_random<u32>()

This commit is contained in:
Jean-Baptiste Boric 2021-05-14 17:27:38 +02:00 committed by Andreas Kling
parent 5a0468c21f
commit 090936e424
8 changed files with 19 additions and 12 deletions

View file

@ -7,6 +7,7 @@
#include "ChessEngine.h"
#include "MCTSTree.h"
#include <AK/Debug.h>
#include <AK/Random.h>
#include <LibCore/ElapsedTimer.h>
using namespace Chess::UCI;
@ -34,7 +35,7 @@ void ChessEngine::handle_go(const GoCommand& command)
// FIXME: Add different ways to terminate search.
VERIFY(command.movetime.has_value());
srand(arc4random());
srand(get_random<u32>());
Core::ElapsedTimer elapsed_time;
elapsed_time.start();