Cockatrice 2026-10-19-Development-3.1.2-beta.2
A 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#include <qtmetamacros.h>
7
8class RNG_Abstract : public QObject
9{
10 Q_OBJECT
11public:
12 explicit RNG_Abstract(QObject *parent = nullptr) : QObject(parent)
13 {
14 }
15 virtual unsigned int rand(int min, int max) = 0;
16 QVector<int> makeNumbersVector(int n, int min, int max);
17 [[nodiscard]] double testRandom(const QVector<int> &numbers) const;
18};
19
20extern RNG_Abstract *rng;
21
22#endif
Definition rng_abstract.h:9
QVector< int > makeNumbersVector(int n, int min, int max)
Definition rng_abstract.cpp:7
double testRandom(const QVector< int > &numbers) const
Definition rng_abstract.cpp:22
RNG_Abstract(QObject *parent=nullptr)
Definition rng_abstract.h:12
virtual unsigned int rand(int min, int max)=0
RNG_Abstract * rng
Definition main.cpp:81