This rng is used when the normal synced rng is not available this is currently only he case at the very start of the scenario (random generation of starting units traits). More...
#include <random_new_deterministic.hpp>
Public Member Functions | |
rng_deterministic (rand_rng::mt_rng &gen) | |
virtual | ~rng_deterministic () |
Public Member Functions inherited from random_new::rng | |
rng () | |
uint32_t | next_random () |
Provides the next random draw. More... | |
virtual | ~rng () |
unsigned int | get_random_calls () |
Provides the number of random calls to the rng in this context. More... | |
int | get_random_int (int min, int max) |
This helper method provides a random int from the underlying generator, using results of next_random in a manner guaranteed to be cross platform. More... | |
Protected Member Functions | |
virtual uint32_t | next_random_impl () |
Private Attributes | |
rand_rng::mt_rng & | generator_ |
Additional Inherited Members | |
Static Public Member Functions inherited from random_new::rng | |
static rng & | default_instance () |
Protected Attributes inherited from random_new::rng | |
unsigned int | random_calls_ |
This rng is used when the normal synced rng is not available this is currently only he case at the very start of the scenario (random generation of starting units traits).
or during the "Deterministic SP mode"
Definition at line 27 of file random_new_deterministic.hpp.
random_new::rng_deterministic::rng_deterministic | ( | rand_rng::mt_rng & | gen | ) |
Definition at line 20 of file random_new_deterministic.cpp.
|
virtual |
Definition at line 26 of file random_new_deterministic.cpp.
|
protectedvirtual |
Implements random_new::rng.
Definition at line 31 of file random_new_deterministic.cpp.
References generator_, and rand_rng::mt_rng::get_next_random().
|
private |
Definition at line 36 of file random_new_deterministic.hpp.
Referenced by next_random_impl().