diff --git a/src/js/core/rng.js b/src/js/core/rng.js index 9c5c1c43..7a6766cd 100644 --- a/src/js/core/rng.js +++ b/src/js/core/rng.js @@ -108,17 +108,6 @@ export class RandomNumberGenerator { assert(max > min, "rng: max <= min"); return Math.floor(this.next() * (max - min) + min); } - /** - * @param {number} min - * @param {number} max - * @returns {number} Integer in range [min, max] - */ - nextIntRangeInclusive(min, max) { - assert(Number.isFinite(min), "Minimum is no integer"); - assert(Number.isFinite(max), "Maximum is no integer"); - assert(max > min, "rng: max <= min"); - return Math.round(this.next() * (max - min) + min); - } /** * @param {number} min diff --git a/src/js/game/hub_goals.js b/src/js/game/hub_goals.js index e7a1fea7..c9d9494f 100644 --- a/src/js/game/hub_goals.js +++ b/src/js/game/hub_goals.js @@ -369,7 +369,7 @@ export class HubGoals extends BasicSerializableObject { if (allowUncolored) { universalColors.push(enumColors.uncolored); } - const index = rng.nextIntRangeInclusive(0, colorWheel.length - 3); + const index = rng.nextIntRange(0, colorWheel.length - 2); const pickedColors = colorWheel.slice(index, index + 3); pickedColors.push(rng.choice(universalColors)); return pickedColors;