From a3c1ba7b49e4c5901d7c9dd917049744ad20fc96 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 30 Oct 2024 15:27:59 +0100 Subject: enemy loading kinda works --- backend/RNG.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backend/RNG.cpp') 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 random_dist(lower, upper); + // NOTE: random_dist's upper limit is inclusive + uniform_int_distribution random_dist(lower, upper - 1); return random_dist(rng); } -- cgit v1.2.3