diff options
Diffstat (limited to 'src/randomization/generator.cpp')
-rw-r--r-- | src/randomization/generator.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/randomization/generator.cpp b/src/randomization/generator.cpp index b9bcb8a..56fbbf1 100644 --- a/src/randomization/generator.cpp +++ b/src/randomization/generator.cpp @@ -1,14 +1,13 @@ #include "generator.hpp" -RandomNumberGenerator::RandomNumberGenerator(const unsigned int &seed) +RandomNumberGenerator::RandomNumberGenerator(const uint32_t &seed) { this->_generator = std::make_unique<std::mt19937>(seed); } -unsigned int RandomNumberGenerator::in_range(const unsigned int &a, - const unsigned int &b) const +uint32_t RandomNumberGenerator::in_range(const uint32_t &a, const uint32_t &b) const { - auto random_distribution = std::uniform_int_distribution<unsigned int>(a, b); + auto random_distribution = std::uniform_int_distribution<uint32_t>(a, b); return random_distribution(*this->_generator); } |