mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
Userland: Replace arc4random() with get_random<u32>()
This commit is contained in:
parent
5a0468c21f
commit
090936e424
8 changed files with 19 additions and 12 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "ChessWidget.h"
|
||||
#include "PromotionDialog.h"
|
||||
#include <AK/Random.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <LibCore/File.h>
|
||||
|
@ -382,7 +383,7 @@ void ChessWidget::reset()
|
|||
m_playback_move_number = 0;
|
||||
m_board_playback = Chess::Board();
|
||||
m_board = Chess::Board();
|
||||
m_side = (arc4random() % 2) ? Chess::Color::White : Chess::Color::Black;
|
||||
m_side = (get_random<u32>() % 2) ? Chess::Color::White : Chess::Color::Black;
|
||||
m_drag_enabled = true;
|
||||
input_engine_move();
|
||||
update();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue