Hoping to add a few tests for normal operation as a sanity check. The eventual goal is to be able to split the distribution functions from the engine so they can be tested and implemented independently.
This is recommended for GTest and is a requirement to use FRIEND_TEST (see http://google.github.io/googletest/reference/testing.html#FRIEND_TEST). If the random number generator code becomes a class with private attributes this allows us to switch to test fixtures more easily.
Use Point wherever possible
Make some functions static (not exhaustive)
Reduce excessive indentation (not exhaustive)
Declare variables as needed (not exhaustive)
This documents the chosen LCG parameters and the default mapping function used in random number generation.
GetLCGEngineState() is a helper needed for testing because AdvanceRndSeed combines a distribution with a call to progress the engine. I'll split those eventually but this at least shows the current behaviour and should flag any bugs introduced by future changes.
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
Fix for Vita
Update to use free functions
Use std::optional to allow setting empty paths
Change header inclusion order
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
Use std::optional to allow setting empty paths
Apply clang-format
Temporary commit