aboutsummaryrefslogtreecommitdiff
path: root/backend/RNG.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-30 15:27:59 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-30 15:27:59 +0100
commita3c1ba7b49e4c5901d7c9dd917049744ad20fc96 (patch)
tree66750c2c740aca751f47c2896985d2b79f6f7806 /backend/RNG.cpp
parent6dfa3fb34fb0a2ea028fd46e77296e26b092fb99 (diff)
enemy loading kinda works
Diffstat (limited to 'backend/RNG.cpp')
-rw-r--r--backend/RNG.cpp3
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);
}