Cockatrice
2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Toggle main menu visibility
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
8
class
RNG_Abstract
:
public
QObject
9
{
10
Q_OBJECT
11
public
:
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
20
extern
RNG_Abstract
*
rng
;
21
22
#endif
RNG_Abstract
Definition
rng_abstract.h:9
RNG_Abstract::makeNumbersVector
QVector< int > makeNumbersVector(int n, int min, int max)
Definition
rng_abstract.cpp:7
RNG_Abstract::testRandom
double testRandom(const QVector< int > &numbers) const
Definition
rng_abstract.cpp:22
RNG_Abstract::RNG_Abstract
RNG_Abstract(QObject *parent=nullptr)
Definition
rng_abstract.h:12
RNG_Abstract::rand
virtual unsigned int rand(int min, int max)=0
rng
RNG_Abstract * rng
Definition
main.cpp:81
libcockatrice_rng
libcockatrice
rng
rng_abstract.h
Generated by
1.18.0