This repository has been archived on 2025-06-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
LotoStatek/headers/RandomNumberGenerator.h
2024-11-22 09:38:13 +01:00

17 lines
413 B
C++

#ifndef LOTOSTATEK_RANDOMNUMBERGENERATOR_H
#define LOTOSTATEK_RANDOMNUMBERGENERATOR_H
#include <random>
class RandomNumberGenerator {
public:
static int getRandomNumber(int min, int max) {
static std::random_device rd;
static std::mt19937 gen(rd());
static std::uniform_int_distribution<> dis(min, max);
return dis(gen);
}
};
#endif //LOTOSTATEK_RANDOMNUMBERGENERATOR_H