|
stmm-games-doc
0.32.0
|

Public Member Functions | |
| virtual | ~RandomSource () noexcept=default |
| virtual int32_t | random (int32_t nFrom, int32_t nTo) noexcept=0 |
| Return a random value within a range. More... | |
|
virtualdefaultnoexcept |
|
pure virtualnoexcept |
Return a random value within a range.
All entities within the game should use the same implementation of this function to generate random numbers (and not keep a personal generator alongside) so that the sequences can potentially be recorded and reproduced for debugging.
| nFrom | The first of the possible values. |
| nTo | The last of the possible values. |
Implemented in stmg::Game, and stmg::StdRandomSource.
1.8.13