Cockatrice 2025-11-30-Development-2.11.0-beta.38
A cross-platform virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
rng_abstract.h
Go to the documentation of this file.
1#ifndef RNG_ABSTRACT_H
2#define RNG_ABSTRACT_H
3
4#include <QObject>
5#include <QVector>
6
7class RNG_Abstract : public QObject
8{
9 Q_OBJECT
10public:
11 explicit RNG_Abstract(QObject *parent = nullptr) : QObject(parent)
12 {
13 }
14 virtual unsigned int rand(int min, int max) = 0;
15 QVector<int> makeNumbersVector(int n, int min, int max);
16 [[nodiscard]] double testRandom(const QVector<int> &numbers) const;
17};
18
19extern RNG_Abstract *rng;
20
21#endif
Definition rng_abstract.h:8
QVector< int > makeNumbersVector(int n, int min, int max)
Definition rng_abstract.cpp:5
double testRandom(const QVector< int > &numbers) const
Definition rng_abstract.cpp:19
RNG_Abstract(QObject *parent=nullptr)
Definition rng_abstract.h:11
virtual unsigned int rand(int min, int max)=0
RNG_Abstract * rng
Definition main.cpp:46