MISC: Rename getRandomArbitrary (#1605)

This commit is contained in:
catloversg
2024-08-22 06:50:51 +07:00
committed by GitHub
parent 995e367432
commit 818d7446be
6 changed files with 13 additions and 13 deletions
+4 -4
View File
@@ -2,7 +2,7 @@ import { currentNodeMults } from "../../../src/BitNode/BitNodeMultipliers";
import { Skill } from "../../../src/Bladeburner/Skill";
import { BladeburnerSkillName } from "../../../src/Enums";
import { PositiveInteger, isPositiveInteger, isPositiveNumber } from "../../../src/types";
import { getRandomArbitrary } from "../../../src/utils/helpers/getRandomArbitrary";
import { randomInRange } from "../../../src/utils/helpers/randomInRange";
import { getRandomIntInclusive } from "../../../src/utils/helpers/getRandomIntInclusive";
const skill = new Skill({
@@ -22,9 +22,9 @@ describe("Test calculateMaxUpgradeCount", function () {
for (let i = 0; i < 10; ++i) {
skill.baseCost = getRandomIntInclusive(1, 1000);
for (let j = 0; j < 10; ++j) {
skill.costInc = getRandomArbitrary(1, 1000);
skill.costInc = randomInRange(1, 1000);
for (let k = 0; k < 10; ++k) {
currentNodeMults.BladeburnerSkillCost = getRandomArbitrary(1, 1000);
currentNodeMults.BladeburnerSkillCost = randomInRange(1, 1000);
for (let m = 0; m < 1e4; ++m) {
const currentLevel = getRandomIntInclusive(0, 1e9);
let count = 0;
@@ -56,7 +56,7 @@ describe("Test calculateMaxUpgradeCount", function () {
// Test 2
++testCaseCount;
const budget = getRandomArbitrary(1e9, 1e50);
const budget = randomInRange(1e9, 1e50);
if (!isPositiveNumber(budget)) {
throw new Error(`Invalid budget: ${budget}`);
}