diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-30 15:27:59 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-30 15:27:59 +0100 |
commit | a3c1ba7b49e4c5901d7c9dd917049744ad20fc96 (patch) | |
tree | 66750c2c740aca751f47c2896985d2b79f6f7806 /backend/RNG.cpp | |
parent | 6dfa3fb34fb0a2ea028fd46e77296e26b092fb99 (diff) |
enemy loading kinda works
Diffstat (limited to 'backend/RNG.cpp')
-rw-r--r-- | backend/RNG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/RNG.cpp b/backend/RNG.cpp index bc3e57b..2d7895b 100644 --- a/backend/RNG.cpp +++ b/backend/RNG.cpp @@ -14,7 +14,8 @@ int RNG::rand_int(const int upper) { return this->rand_int(0, upper); } int RNG::rand_int(const int lower, const int upper) { - uniform_int_distribution<int> random_dist(lower, upper); + // NOTE: random_dist's upper limit is inclusive + uniform_int_distribution<int> random_dist(lower, upper - 1); return random_dist(rng); } |