Commit 0af937cc authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port to QRandomGenerator

parent f3576754
......@@ -13,6 +13,7 @@
#include <QDebug>
#include <QSet>
#include <QRandomGenerator>
#include "settings.h"
......@@ -51,7 +52,7 @@ QList<int> aiController::autoFill(int safeMovesLeft)
if (fillLines.isEmpty()) {
break;
}
int index = qrand() % fillLines.size();
int index = QRandomGenerator::global()->bounded(fillLines.size());
fillLines.removeAt(index);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment