Skip to content

Commit 866afc4

Browse files
feat: Remove randomness from purchasing strategy
However helpful this seemed at the time, you want predictable behavior, not random behavior when you configure KS. This needs to be removed again.
1 parent f248185 commit 866afc4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/kitten-scientists/source/helper/BulkPurchaseHelper.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { difference, shuffleArray } from "@oliversalzburg/js-utils/data/array.js";
1+
import { difference } from "@oliversalzburg/js-utils/data/array.js";
22
import { isNil, mustExist } from "@oliversalzburg/js-utils/data/nil.js";
33
import { KittenScientists } from "../KittenScientists.js";
44
import { WorkshopManager } from "../WorkshopManager.js";
@@ -249,9 +249,7 @@ export class BulkPurchaseHelper {
249249
let iterations = 0;
250250
const buildsCommitted = new Array<PotentialBuild>();
251251
while (iterations < 1e5) {
252-
// Randomize the potential builds each iteration. This should help evening out
253-
// build requests for buildings that regularly appear first in the list.
254-
const candidatesThisIteration = shuffleArray(difference(potentialBuilds, buildsCommitted));
252+
const candidatesThisIteration = difference(potentialBuilds, buildsCommitted);
255253

256254
let buildThisIteration = 0;
257255
const committedThisIteration = [];

0 commit comments

Comments
 (0)