From 8b6caeb68b696029a8ef2c334edddc15eda1aef1 Mon Sep 17 00:00:00 2001 From: Caldwell <115591472+Caldwell-74@users.noreply.github.com> Date: Sun, 3 Dec 2023 09:45:42 +0100 Subject: [PATCH] STOCKMARKET: Added slight randomization to when stock forecasts can flip (#911) --- src/StockMarket/StockMarket.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/StockMarket/StockMarket.tsx b/src/StockMarket/StockMarket.tsx index e2df7fcde..b6866ed78 100644 --- a/src/StockMarket/StockMarket.tsx +++ b/src/StockMarket/StockMarket.tsx @@ -14,6 +14,7 @@ import { dialogBoxCreate } from "../ui/React/DialogBox"; import { Reviver } from "../utils/JSONReviver"; import { NetscriptContext } from "../Netscript/APIWrapper"; import { helpers } from "../Netscript/NetscriptHelpers"; +import { getRandomInt } from "../utils/helpers/getRandomInt"; export let StockMarket: IStockMarket = { lastUpdate: 0, @@ -167,7 +168,7 @@ export function initStockMarket(): void { StockMarket.storedCycles = 0; StockMarket.lastUpdate = 0; - StockMarket.ticksUntilCycle = StockMarketConstants.TicksPerCycle; + StockMarket.ticksUntilCycle = getRandomInt(1, StockMarketConstants.TicksPerCycle); initSymbolToStockMap(); }